Skip to content
Snippets Groups Projects
Commit 019b28fe authored by Nicolas FERNANDEZ NUÑEZ's avatar Nicolas FERNANDEZ NUÑEZ
Browse files

Passing tests

parent 23e564da
No related branches found
No related tags found
No related merge requests found
#!/bin/bash
##### colors ######
red="\033[1;31m" # red
green="\033[1;32m" # green
ylo="\033[1;33m" # yellow
blue="\033[1;34m" # blue
nc="\033[0m" # no color
###### About ######
echo ""
echo "##### ABOUT #####"
......@@ -10,7 +17,7 @@ echo "Author: Nicolas Fernandez"
echo "Affiliation: IRD_U233_TransVIHMI"
echo "Aim: Bash script for RQC pipeline"
echo "Date: 2021.04.30"
echo "Run: snakemake --snakemake rqc.smk --cores --use-conda"
echo "Run: snakemake --snakemake reads_quality_control.smk --cores --use-conda"
echo "Latest modification: 2022.01.27"
echo "Todo: done"
echo "________________________________________________________________________"
......@@ -76,13 +83,23 @@ echo "##### SNAKEMAKE PIPELINE #####"
echo "-----------------------------"
echo ""
echo "Unlocking working directory:"
# Specify working directory (relative paths in the snakefile will use this as their origin).
# The workflow definition in form of a snakefile.
# Remove a lock on the working directory.
snakemake \
--directory ${workdir} \
--snakefile ${workdir}/workflow/rules/reads_quality_control.smk \
--unlock
echo ""
echo "Conda environments list:"
# Specify working directory (relative paths in the snakefile will use this as their origin).
# The workflow definition in form of a snakefile.
# List all conda environments and their location on disk.
snakemake \
--directory ${workdir}/ \
--snakefile ${workdir}/workflow/rules/rqc.smk \
--snakefile ${workdir}/workflow/rules/reads_quality_control.smk \
--list-conda-envs
echo ""
......@@ -93,7 +110,7 @@ echo "Conda environments update:"
# Cleanup unused conda environments.
snakemake \
--directory ${workdir}/ \
--snakefile ${workdir}/workflow/rules/rqc.smk \
--snakefile ${workdir}/workflow/rules/reads_quality_control.smk \
--cores \
--conda-cleanup-envs
......@@ -107,23 +124,12 @@ echo "Conda environments setup:"
# If mamba package manager is not available, or if you still prefer to use conda, you can enforce that with this setting (default: 'mamba').
snakemake \
--directory ${workdir}/ \
--snakefile ${workdir}/workflow/rules/rqc.smk \
--snakefile ${workdir}/workflow/rules/reads_quality_control.smk \
--cores \
--use-conda \
--conda-create-envs-only \
--conda-frontend mamba
echo ""
echo "Unlocking working directory:"
# Specify working directory (relative paths in the snakefile will use this as their origin).
# The workflow definition in form of a snakefile.
# Remove a lock on the working directory.
snakemake \
--directory ${workdir} \
--snakefile ${workdir}/workflow/rules/rqc.smk \
--unlock
echo ""
echo "Dry run:"
# Specify working directory (relative paths in the snakefile will use this as their origin).
......@@ -134,7 +140,7 @@ echo "Dry run:"
# Do not execute anything, and display what would be done. If you have a very large workflow, use –dry-run –quiet to just print a summary of the DAG of jobs.
snakemake \
--directory ${workdir} \
--snakefile ${workdir}/workflow/rules/rqc.smk \
--snakefile ${workdir}/workflow/rules/reads_quality_control.smk \
--cores 1 \
--use-conda \
--dryrun \
......@@ -153,7 +159,7 @@ echo "Let's go!"
# Tell the scheduler to assign creation of given targets (and all their dependencies) highest priority.
snakemake \
--directory ${workdir} \
--snakefile ${workdir}/workflow/rules/rqc.smk \
--snakefile ${workdir}/workflow/rules/reads_quality_control.smk \
--cores \
--use-conda \
--printshellcmds \
......@@ -168,7 +174,7 @@ echo "##### SNAKEMAKE PIPELINE GRAPHS ######"
echo "--------------------------------------"
echo ""
mkdir ${workdir}/results/summary/ 2> /dev/null
mkdir ${workdir}/results/reports/graphs/ 2> /dev/null
graphList="dag rulegraph filegraph"
extentionList="pdf png"
......@@ -177,17 +183,17 @@ for graph in ${graphList} ; do
for extention in ${extentionList} ; do
snakemake \
--directory ${workdir}/ \
--snakefile ${workdir}/workflow/rules/rqc.smk \
--snakefile ${workdir}/workflow/rules/reads_quality_control.smk \
--${graph} | \
dot -T${extention} > \
${workdir}/results/summary/${graph}.${extention} ;
${workdir}/results/reports/graphs/${graph}.${extention} ;
done ;
done
snakemake \
--directory ${workdir} \
--snakefile ${workdir}/workflow/rules/rqc.smk \
--summary > ${workdir}/results/summary/files_summary.txt
--snakefile ${workdir}/workflow/rules/reads_quality_control.smk \
--summary > ${workdir}/results/reports/files_summary.txt
echo "________________________________________________________________________"
......
###############################################################################
# Name: RQC pipeline
# Name: reads_quality_control.smk
# Author: Nicolas Fernandez
# Affiliation: IRD_U233_TransVIHMI
# Aim: Snakefile for RQC pipeline
# Aim: Snakefile for Reads Quality Control pipeline
# Date: 2021.04.30
# Run: snakemake --snakefile rqc.smk --cores --use-conda
# Run: snakemake --snakefile reads_quality_control.smk --cores --use-conda
# Latest modification: 2022.01.25
# Todo: done
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment