-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathSingularity
155 lines (108 loc) · 4.13 KB
/
Singularity
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
Bootstrap: debootstrap
OSVersion: xenial
MirrorURL: http://us.archive.ubuntu.com/ubuntu/
IncludeCmd: yes
Include: bash vim less man-db apt-utils tzdata
%help
This is the container for the VGEA pipeline
%labels
AUTHOR - Paul Eniola Oluniyi - pauleniolaoluniyi@gmail.com
PhD researcher at ACEGID, Redeemer's University
Version - v1.0
%setup
# make sure the "pipeline/" folder exists
mkdir -p ${SINGULARITY_ROOTFS}/pipeline
# make sure the "/data" folder exists and in this folder, place your input files
mkdir ${SINGULARITY_ROOTFS}/data
%environment
PATH="/usr/local/anaconda/bin:$PATH"
%post
echo "The post section is where you can install, and configure the container"
mv /etc/apt/sources.list /etc/apt/sources.list.bak
echo "deb http://us.archive.ubuntu.com/ubuntu/ xenial main restricted universe multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ xenial main restricted universe multiverse
deb http://us.archive.ubuntu.com/ubuntu/ xenial-security main restricted universe multiverse
deb http://us.archive.ubuntu.com/ubuntu/ xenial-updates main restricted universe multiverse
deb http://us.archive.ubuntu.com/ubuntu/ xenial-proposed main restricted universe multiverse
deb http://us.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-security main restricted universe multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-updates main restricted universe multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-proposed main restricted universe multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse" >> /etc/apt/sources.list
# Install wget, git, make
apt-get -y --force-yes update
yes | apt-get install build-essential
yes | apt-get install git
yes | apt-get install wget
yes | apt-get install autoconf autogen libtool
yes | apt install bc
# Install zlib, cmake
yes | apt-get install zlib1g-dev libbz2-dev pkg-config cmake
# Install curl, lzma
yes | apt-get install curl liblzma-dev libncurses5-dev
# Install Anaconda3
if [ ! -d /usr/local/anaconda ]; then
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh \
-O ~/anaconda.sh && \
bash ~/anaconda.sh -b -p /usr/local/anaconda && \
rm ~/anaconda.sh
fi
# set anaconda path
export PATH="/usr/local/anaconda/bin:$PATH"
# Install Python2
conda install -c anaconda python2
# Install Python3
conda install -c anaconda python3
# Install snakemake
conda install -c bioconda -c conda-forge snakemake
# Install fastaq
yes | apt-get install python3-pip
pip3 install pyfastaq
# Install biopython
conda install -c conda-forge biopython
# Install blast
conda install -c bioconda blast
# Install samtools
conda install -c bioconda samtools
# Install mummer
conda install -c bioconda mummer
# Install fastp
conda install -c bioconda fastp
# Install mafft
conda install -c bioconda mafft
# Install smalt
conda install -c bioconda smalt
# Install bwa
conda install -c bioconda bwa
# Install unzip
yes | apt-get install -y unzip zip
# Install bowtie
conda install -c bioconda bowtie2
# Install kmc
conda install -c bioconda kmc
# Install Picard
conda install -c bioconda picard
# Install shiver
conda install -c bioconda shiver
# Install quast
conda install -c bioconda quast
# Install iva
conda install -c bioconda iva
# Install java
yes | apt-get install default-jdk
# add read/write access to data folder
chmod -R o+rwx /data
%files
# Copy input files
{id}_R1.fastq /data
{id}_R2.fastq /data
human_ref_genome.fasta /data
MyRefAlignment.fasta /data
MyAdapters.fasta /data
MyPrimers.fasta /data
quast_refseq.fasta /data
quast_genefeatures.txt /data
# Copy pipeline scripts
Snakefile /pipeline
%runscript
snakemake -q -s /pipeline/Snakefile