Commit 2bbeb9a7 authored by peguerin's avatar peguerin
Browse files

main snakemake command

parent 774ace31
# arguments
FOLDER_INPUT=$1
REFERENCE_BASE=$2
CORES=$3
# working folders
mkdir -p 01-assembly 02-demultiplex 99-log runs tables
# link base reference
ln -s $REFERENCE_BASE bdr
# link raw sequences data
for i in `ls $FOLDER_INPUT*fastq.gz`;
do name=`basename $i` ;
ln -s $i raw/$name ;
done
# link barcode data
for i in `ls $FOLDER_INPUT*dat`;
do name=`basename $i` ;
ln -s $i barcodes/$name ;
done
# run pipeline
snakemake -s scripts/step1.sf -j $CORES --latency-wait 120
snakemake -s scripts/step2.sf -j $CORES --latency-wait 120
snakemake -s scripts/step3.sf -j $CORES --latency-wait 120
snakemake -s scripts/step4.sf -j $CORES --latency-wait 120
## this work !
mkdir -p 01-assembly 02-demultiplex/02-01-raw 02-demultiplex/02-02-filtered 02-demultiplex/02-03-cleaned 99-log 03-filtered
## assemble & demultiplex
cd 01-assembly
snakemake -s Snakefile -j 8 --use-singularity --singularity-args "--bind /media/superdisk:/media/superdisk" --latency-wait 120
cd ..
## filter sequences
cd 02-demultiplex
snakemake -s Snakefile -j 8 --use-singularity --singularity-args "--bind /media/superdisk:/media/superdisk" --latency-wait 120
snakemake -s Snakefile -j 8 --dry-run --use-singularity --singularity-args "--bind /media/superdisk:/media/superdisk" --latency-wait 120
cd ..
## 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
## taxonomic assignation & format
cd 03-filtered
snakemake -s Snakefile -j 8 --dry-run --use-singularity --singularity-args "--bind /media/superdisk:/media/superdisk" --latency-wait 120
cd ..
## clean
snakemake -s Snakefile --delete-all-output --dry-run
snakemake -s Snakefile --delete-all-output
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment