-
Notifications
You must be signed in to change notification settings - Fork 0
/
Singularity.DemultiplexingSoftwares
225 lines (196 loc) · 9.05 KB
/
Singularity.DemultiplexingSoftwares
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
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
Bootstrap: docker
From: continuumio/miniconda3
%environment
export PATH=/opt/DoubletDetection/:/opt/popscle/bin/:/opt:/opt/scSplit:/usr/games:/opt/bedtools2/bin:/opt/conda/envs/py36/bin:/opt/souporcell:/opt/souporcell/troublet/target/release:/opt/conda/bin:/opt/minimap2-2.7:/root/.cargo/bin:/opt/vartrix-v1.1.3-x86_64-linux/:/opt/freebayes/scripts:/opt/freebayes:/opt/vcflib/bin:/opt/vcflib/scripts:$PATH
export PYTHONPATH=/usr/local/lib/python3.6/site-packages/
export LC_ALL=C
alias python=python3
%post
#!/bin/bash
eval "$(command conda 'shell.bash' 'hook' 2> /dev/null)"
export PATH=/opt/conda/bin/:$PATH
apt update
yes | apt upgrade
apt full-upgrade
cat /etc/os-release
yes | apt-get install build-essential
apt-get install -y gcc-7 g++-7 gfortran-7 libgfortran-7-dev
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 60 --slave /usr/bin/g++ g++ /usr/bin/g++-7
update-alternatives --config gcc
gcc --version
yes | apt-get install wget
yes | apt-get install curl
apt install -y dirmngr --install-recommends
apt install -y software-properties-common
apt install -y apt-transport-https
add-apt-repository 'deb http://deb.debian.org/debian buster-backports main'
yes | apt-get update
yes | apt-get upgrade
apt install -y ca-certificates gnupg2
apt-key adv --keyserver keys.gnupg.net --recv-key 'E19F5F87128899B192B1A2C2AD5F960A256A04AF'
add-apt-repository 'deb https://cloud.r-project.org/bin/linux/debian buster-cran35/'
apt-get update
apt install -y r-base
apt install -y r-base-dev
apt-get update
yes | /opt/conda/bin/conda create -n py36 python=3.6.8
cd /opt
CARGO_HOME=/opt/.cargo RUSTUP_HOME=/opt/.cargo bash -c 'curl https://sh.rustup.rs -sSf | sh -s -- -y'
. /opt/.cargo/env
which cargo
rustup default stable
yes | apt-get install git
/opt/conda/bin/conda init bash
eval "$(conda shell.bash hook)"
# source /opt/conda/etc/profile.d/conda.sh
conda activate py36
yes | apt-get install libncurses5-dev
yes | apt-get install zlib1g-dev
yes | apt-get install libbz2-dev
yes | apt-get install liblzma-dev
yes | apt-get install cmake
yes | apt-get install zlib1g
yes | apt-get install zlib1g-dev
apt-get install -y pkg-config
apt-get install -y libcurl4-openssl-dev
apt-get install -y graphviz
apt-get install -y graphviz-dev
apt-get install -y libxml2
apt-get install -y libxml2-dev
apt-get install -y bzip2
apt-get install -y libssl-dev
cd /opt
git clone https://github.com/JonathanShor/DoubletDetection.git
cd DoubletDetection
/opt/conda/envs/py36/bin/pip install .
cd /opt
wget https://github.com/vcftools/vcftools/releases/download/v0.1.16/vcftools-0.1.16.tar.gz
tar xvf vcftools-0.1.16.tar.gz
rm vcftools-0.1.16.tar.gz
cd vcftools-0.1.16
./configure
make
make install
cd /opt
wget https://github.com/lh3/minimap2/archive/v2.7.tar.gz
tar -xzvf v2.7.tar.gz
cd minimap2-2.7
make
cd /opt
wget https://github.com/arq5x/bedtools2/releases/download/v2.28.0/bedtools-2.28.0.tar.gz
tar -zxvf bedtools-2.28.0.tar.gz
cd bedtools2
make
cd /opt
git clone https://github.com/wheaton5/souporcell.git
cd souporcell/troublet
cargo build --release
cd /opt/souporcell/souporcell
cargo build --release
cd /opt
wget https://github.com/10XGenomics/vartrix/releases/download/v1.1.3/vartrix-v1.1.3-x86_64-linux.tar.gz
tar xzvf vartrix-v1.1.3-x86_64-linux.tar.gz
rm vartrix-v1.1.3-x86_64-linux.tar.gz
yes | /opt/conda/envs/py36/bin/pip install pysam
/opt/conda/envs/py36/bin/pip install pyvcf
/opt/conda/envs/py36/bin/pip install numpy
/opt/conda/envs/py36/bin/pip install scipy
/opt/conda/envs/py36/bin/pip install pystan==2.17.1.0
/opt/conda/envs/py36/bin/pip install pyfaidx
/opt/conda/envs/py36/bin/pip install scikit-learn
/opt/conda/envs/py36/bin/pip install pandas
/opt/conda/envs/py36/bin/pip install matplotlib==3.2.2
/opt/conda/envs/py36/bin/pip install vireoSNP
/opt/conda/envs/py36/bin/pip install cellSNP
/opt/conda/envs/py36/bin/pip install scikit-image
/opt/conda/envs/py36/bin/pip install numba
/opt/conda/envs/py36/bin/pip install annoy
/opt/conda/envs/py36/bin/pip install umap-learn
/opt/conda/envs/py36/bin/pip install scrublet
/opt/conda/envs/py36/bin/pip install h5py
/opt/conda/envs/py36/bin/pip install snakemake
/opt/conda/envs/py36/bin/pip install Jinja2
/opt/conda/envs/py36/bin/pip install altanalyze
cd /opt
wget --no-check-certificate 'https://docs.google.com/uc?export=download&id=1QVUBY01g7NZSWpdjB6b6ubjBNEcWArcM' -O scrublet_pipeline.py
cd /opt
wget https://github.com/samtools/htslib/releases/download/1.10.2/htslib-1.10.2.tar.bz2
tar xvfj htslib-1.10.2.tar.bz2
cd htslib-1.10.2
./configure
make
make install
cd /opt
wget https://github.com/samtools/samtools/releases/download/1.10/samtools-1.10.tar.bz2
tar xvfj samtools-1.10.tar.bz2
rm samtools-1.10.tar.bz2
cd samtools-1.10
./configure
make
make install
cd /opt
wget https://github.com/samtools/bcftools/releases/download/1.10.2/bcftools-1.10.2.tar.bz2
tar xvfj bcftools-1.10.2.tar.bz2
rm bcftools-1.10.2.tar.bz2
cd bcftools-1.10.2
./configure
make
make install
cd /opt
git clone https://github.com/ekg/freebayes.git
wget https://github.com/ekg/freebayes/releases/download/v1.3.1/freebayes-v1.3.1
mv freebayes-v1.3.1 freebayes/freebayes
chmod 777 freebayes/freebayes
cd /opt
git clone --recursive https://github.com/vcflib/vcflib.git
cd vcflib
make
cd /opt
wget http://ftp.gnu.org/gnu/parallel/parallel-latest.tar.bz2
tar xjf parallel-latest.tar.bz2
cd parallel-*
./configure && make
make install
cd /opt
git clone https://github.com/jon-xu/scSplit
chmod 777 /opt/scSplit/scSplit
echo 'alias scSplit=/opt/scSplit/scSplit' >> $SINGULARITY_ENVIRONMENT
cd /opt
git clone https://github.com/statgen/popscle.git
cd popscle
# sed -i 's/set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -pthread")/set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -pthread --std=c++11")/g' CMakeLists.txt
cat CMakeLists.txt
mkdir build
cd build
cmake ..
make
echo 'alias popscle=/opt/popscle/bin/popscle' >> $SINGULARITY_ENVIRONMENT
cp /opt/conda/lib/libstdc++.so.6.0.26 /usr/lib/x86_64-linux-gnu/
mv /usr/lib/x86_64-linux-gnu/libstdc++.so.6 /usr/lib/x86_64-linux-gnu/libstdc++.so.6.bkp
ln -s /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.26 /usr/lib/x86_64-linux-gnu/libstdc++.so.6
R --slave -e 'install.packages("V8", repos = "http://cran.us.r-project.org")'
R --slave -e 'install.packages("rversions", repos = "http://cran.us.r-project.org")'
R --slave -e 'install.packages("devtools", repos = "http://cran.us.r-project.org")'
R --slave -e 'install.packages("tidyverse", repos = "http://cran.us.r-project.org")'
R --slave -e 'install.packages("data.table", repos = "http://cran.us.r-project.org")'
R --slave -e 'install.packages("Seurat", repos = "http://cran.us.r-project.org")'
R --slave -e 'install.packages("remotes", repos = "http://cran.us.r-project.org")'
R --slave -e 'install.packages("xgboost", repos = "http://cran.us.r-project.org")'
R --slave -e 'devtools::install_github(repo="knausb/vcfR")'
R --slave -e 'devtools::install_github("kostkalab/scds", ref="master")'
R --slave -e 'devtools::install_github("EDePasquale/DoubletDecon", ref="master")'
R --slave -e 'devtools::install_github("chris-mcginnis-ucsf/DoubletFinder", ref="master")'
mkdir ~/.R
touch ~/.R/Makevars
sed -e "\$a#F77 = /usr/bin/gfortran" ~/.R/Makevars
sed -e "\$a#FC = $F77" ~/.R/Makevars
sed -e "\$a#FLIBS = -L/usr/bin/gfortran" ~/.R/Makevars
cat ~/.R/Makevars
sed -i 's/louvain.set_rng_seed(random_state)/partition_kwargs["seed"] = random_state/g' /opt/conda/envs/py36/lib/python3.6/site-packages/scanpy/tools/_louvain.py
%labels
Author Drew Neavin
### Need to run the below locally in R before using sif
# R --vanilla -e 'install.packages("xml2", repos="http://cran.us.r-project.org")'
# R --vanilla -e 'install.packages("openssl", repos="http://cran.us.r-project.org")'
# R --vanilla -e 'install.packages("httr", repos="http://cran.us.r-project.org")'
# R --vanilla -e 'install.packages("rvest", repos="http://cran.us.r-project.org")'