-
Notifications
You must be signed in to change notification settings - Fork 6
/
Singularity.WGpipeline
150 lines (122 loc) · 4.7 KB
/
Singularity.WGpipeline
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
Bootstrap: shub
From: drneavin/SingularityBaseImages:r363_python368
%environment
export PATH=/opt/DoubletDetection/:/opt/popscle/bin/:/opt:/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=/opt/conda/envs/py36/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
ldconfig
mkdir -p /usr/share/man/man1
yes | apt-get install -y python3-tk
apt-get install -y openjdk-11-jdk
java -version
cd /opt
git clone https://github.com/broadinstitute/picard.git
cd picard/
./gradlew shadowJar
cd /opt
wget https://www.dropbox.com/s/m8u61jn4i1mcktp/TestData4PipelineSmall.tar.gz
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/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
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
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
export PATH=/opt/vartrix-v1.1.3-x86_64-linux:$PATH
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
git clone --single-branch --branch v1.0.0 https://github.com/sc-eQTLgen-consortium/WG1-pipeline-QC.git
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
wget http://ftp.gnu.org/gnu/parallel/parallel-latest.tar.bz2
tar xjf parallel-latest.tar.bz2
cd parallel-*
./configure && make
yes | make install
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
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
##############################
# setup scripts for users
##############################
%apphelp setup
This function copies pipeline scripts to the user systems from the Singularity image.
%appenv setup
SCRIPT_DIR=/opt/WG1-pipeline-QC/Demultiplexing
export SCRIPT_DIR
%apprun setup
exec cp -a ${SCRIPT_DIR}/. "$PWD"
%apphelp test_dataset
This function copies the yaml scripts to the user systems from the Singularity image.
%appenv test_dataset
TAR=/opt/TestData4PipelineSmall.tar.gz
export TAR
%apprun test_dataset
exec cp -a ${TAR} "$@"
%labels
Authors Drew Neavin and Anne Senabouth
Image_version = 1.0.0