-
Notifications
You must be signed in to change notification settings - Fork 4
/
snakemake_tutorial.scif
74 lines (70 loc) · 2.2 KB
/
snakemake_tutorial.scif
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
%appinstall bwa
# Dependencies of bwa
apt-get -y install wget libbz2-dev zlib1g-dev
# bwa itself
wget https://sourceforge.net/projects/bio-bwa/files/bwa-0.7.17.tar.bz2
tar xvjf bwa-0.7.17.tar.bz2
cp -r bwa-0.7.17/* lib
rm -r bwa-0.7.17
rm bwa-0.7.17.tar.bz2
cd lib
make
mv bwa ../bin
%apphelp bwa
Burrows-Wheeler Aligner
%apprun bwa
cd $SCIF_DATA
exec bwa "$@"
%applabels bwa
VERSION 0.7.17
%apptest bwa
bwa "$@"
%appinstall samtools
apt-get -y install wget libbz2-dev zlib1g-dev xz-utils liblzma-dev
apt-get -y install libncurses5-dev
# samtools
wget https://github.com/samtools/samtools/releases/download/1.6/samtools-1.6.tar.bz2
tar xvjf samtools-1.6.tar.bz2
cd samtools-1.6
./configure --without-curses --prefix=$SCIF_APPROOT
make
make install
cd ..
rm -r samtools-1.6
rm samtools-1.6.tar.bz2
# bcftools
wget https://github.com/samtools/bcftools/releases/download/1.6/bcftools-1.6.tar.bz2
tar xvjf bcftools-1.6.tar.bz2
cd bcftools-1.6
./configure --without-curses --prefix=$SCIF_APPROOT
make
make install
cd ..
rm -r bcftools-1.6
rm bcftools-1.6.tar.bz2
%apphelp samtools
This app provides Samtools suite, consisting of Samtools and BCFtools
%apprun samtools
cd $SCIF_DATA
exec samtools "$@"
%applabels samtools
VERSION 1.6
URL http://www.htslib.org/
%apptest samtools
exec samtools
%appinstall snakemake
%apphelp snakemake
Run snakemake. The workflow is defined by a Snakefile that should be located in the $SCIF_APPDATA folder.
This app does not provide snakemake itself, because it is already installed in the Singularity/Docker container.
But it would be easy to install snakemake also in the app context.
%apprun snakemake
cd $SCIF_APPDATA
exec snakemake "$@"
%appinstall graphviz_create_dag
apt-get -y install graphviz
%apphelp graphviz_create_dag
This app creates a directed acyclic graph representation of a Snakemake workflow execution.
The app takes three arguments: The directory of the Snakefile, the target file and the output filename.
%apprun graphviz_create_dag
cd $1
snakemake --dag $2 | dot -Tsvg > $SCIF_DATA/$3