main.sh 2 KB
Newer Older
peguerin's avatar
peguerin committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

###############################################################################
## Here, we reproduce the bioinformatics workflow used by SPYGEN 
## We improve its performance by adding parallelization and containerazition features.
##
## This workflow generates species environmental presence from raw eDNA data. 
##
## This workflow use the workflow management system SNAKEMAKE.
## 
##
## Author : GUERIN Pierre-Edouard
## Montpellier 2019-2020
## 
###############################################################################
## Usage:
peguerin's avatar
peguerin committed
16
17
##    CORE=16
##    bash main.sh $CORES
peguerin's avatar
peguerin committed
18
19
20
##
##
###############################################################################
peguerin's avatar
peguerin committed
21
CORES=$1
peguerin's avatar
peguerin committed
22
23

###############################################################################
peguerin's avatar
peguerin committed
24
## assemble & demultiplex
peguerin's avatar
peguerin committed
25
cd 01-assembly
peguerin's avatar
peguerin committed
26
snakemake -s Snakefile -j $CORES --use-singularity --singularity-args "--bind /media/superdisk:/media/superdisk" --latency-wait 120
peguerin's avatar
peguerin committed
27
cd ..
peguerin's avatar
peguerin committed
28
###############################################################################
peguerin's avatar
peguerin committed
29
## filter sequences
peguerin's avatar
peguerin committed
30
cd 02-demultiplex
peguerin's avatar
peguerin committed
31
snakemake -s Snakefile -j $CORES --use-singularity --singularity-args "--bind /media/superdisk:/media/superdisk" --latency-wait 120
peguerin's avatar
peguerin committed
32
cd ..
peguerin's avatar
peguerin committed
33
###############################################################################
peguerin's avatar
peguerin committed
34
35
36
37
## concatenate samples into run
for run in `ls 02-demultiplex/03-cleaned/`;
do cat 02-demultiplex/03-cleaned/${run}/*.c.r.l.u.fasta > 03-filtered/01-runs/${run}_run.fasta ;
done
peguerin's avatar
peguerin committed
38
###############################################################################
peguerin's avatar
peguerin committed
39
40
## taxonomic assignation & format
cd 03-filtered
peguerin's avatar
peguerin committed
41
#snakemake -s Snakefile -j 8 --dry-run --use-singularity --singularity-args "--bind /media/superdisk:/media/superdisk" --latency-wait 120
peguerin's avatar
peguerin committed
42
snakemake -s Snakefile -j $CORES --use-singularity --singularity-args "--bind /media/superdisk:/media/superdisk" --latency-wait 120
peguerin's avatar
peguerin committed
43
cd ..
peguerin's avatar
peguerin committed
44

peguerin's avatar
peguerin committed
45
###############################################################################
peguerin's avatar
peguerin committed
46
## clean
peguerin's avatar
peguerin committed
47
48
#snakemake -s Snakefile --delete-all-output --dry-run
#snakemake -s Snakefile --delete-all-output
peguerin's avatar
peguerin committed
49