Skip to content
Snippets Groups Projects
Commit f019a282 authored by Maria Bernard's avatar Maria Bernard
Browse files

add cluster partition resources in IMAGE workflows

parent af575796
No related branches found
No related tags found
No related merge requests found
......@@ -180,7 +180,7 @@ Absolut paths need to be precise in the config.yaml
# Configure workflow and running workflow
- Copy the config.yaml file into your working directory and update it according to the instructions inside the file.
- If necessary update resources_SLURM.yaml to define cpu and memory resources for each rule. The default section is the minimal resources per job. The other section take as name the rules name and define only resources that are different from the default section.
- If necessary update resources_SLURM.yaml to define cpu, memory and cluster partition resources for each rule. The default section is the minimal resources per job. The other section take as name the rules name and define only resources that are different from the default section.
- launch snakemake command as presented in SLURM.sh to launch the workflow.
Resources_SLURM.yaml and SLURM.sh are specific to SLURM cluster. Therefore, if you use another cluster, you need to create other files. However, you can use these files to inspire you.
......
......@@ -17,8 +17,8 @@ snakemake -s $WORKFLOW_DIR/Snakefile --printshellcmds --jobs 200 \
--configfile config.yaml --dryrun
# This is an example of the snakemake command line to launch on a SLURM cluster
# {cluster.cpu} and {cluster.mem} will be replace by value defined in the resources_SLURM.yaml file
# {cluster.cpu}, {cluster.mem} and {cluster.partition} will be replace by value defined in the resources_SLURM.yaml file
snakemake -s $WORKFLOW_DIR/Snakefile --printshellcmds --jobs 200 \
--configfile config.yaml \
--cluster-config $WORKFLOW_DIR/resources_SLURM.yaml \
--cluster "sbatch --cpus-per-task={cluster.cpu} --mem-per-cpu={cluster.mem} --error=logs/%x.stderr --output=logs/%x.stdout " --latency-wait 30
--cluster "sbatch -p {cluster.partition} --cpus-per-task={cluster.cpu} --mem-per-cpu={cluster.mem} --error=logs/%x.stderr --output=logs/%x.stdout " --latency-wait 30
__default__ :
mem : "7G"
cpu : 1
partition : "workq"
fastqc :
cpu : 8
......@@ -38,12 +39,15 @@ AnalyzeCovariates:
HaplotypeCaller :
mem : "30G"
partition : "unlimitq"
CombineGVCFs :
mem : "60G"
partition : "unlimitq"
GenotypeGVCFs :
mem : "60G"
partition : "unlimitq"
freebayes:
mem : "30G"
......
......@@ -140,7 +140,7 @@ For the final step, the python script filter_multi_sample_vcf.py need PyVCF for
## 4. Configure and running workflow
- Copy the config.yaml file into your working directory and update it according to the instructions inside the file.
- If necessary update resources_SLURM.yaml to define cpu and memory resources for each rule. The default section is the minimal resources per job. The other section take as name the rules name and define only resources that are different from the default section.
- If necessary update resources_SLURM.yaml to define cpu memory and cluster partition resources for each rule. The default section is the minimal resources per job. The other section take as name the rules name and define only resources that are different from the default section.
- launch snakemake command as presented in SLURM.sh to launch the workflow.
Resources_SLURM.yaml and SLURM.sh are specific to SLURM cluster. Therefore, if you use another cluster, you need to create other files. However, you can use these files to inspire you.
......
#!/bin/bash
##############################################################################
## launch workflow
# if used on Genologin cluster (INRA Toulouse )
# module load system/Python-3.6.3
# and because we are not using module for all other dependencies, you need to add vcftool librairy in the PERL5LIB environment variable
# export PERL5LIB=/usr/local/bioinfo/src/VCFtools/vcftools-0.1.15/src/perl/:$PERL5LIB
WORKFLOW_DIR=??
mkdir -p logs
# This is an example of the snakemake command line to launch a dryrun
snakemake -s $WORKFLOW_DIR/Snakefile --printshellcmds --jobs 200 \
--configfile config.yaml --dryrun
# This is an example of the snakemake command line to launch on a SLURM cluster
# {cluster.cpu}, {cluster.mem} and {cluster.partition} will be replace by value defined in the resources_SLURM.yaml file
snakemake -s $WORKFLOW_DIR/Snakefile --printshellcmds --jobs 200 \
--configfile config.yaml \
--cluster-config $WORKFLOW_DIR/resources_SLURM.yaml \
--cluster "sbatch -p {cluster.partition} --cpus-per-task={cluster.cpu} --mem-per-cpu={cluster.mem} --error=logs/%x.stderr --output=logs/%x.stdout " --latency-wait 30
__default__:
mem : "20G"
cpu : 1
partition : "workq"
#!/bin/sh
###############
# module load #
###############
# if used on Genologin cluster (INRA Toulouse )
# module load system/Python-3.6.3
# and because we are not using module for all other dependencies, you need to add vcftool librairy in the PERL5LIB environment variable
# export PERL5LIB=/usr/local/bioinfo/src/VCFtools/vcftools-0.1.15/src/perl/:$PERL5LIB
###############
# dryrun #
###############
#~ snakemake -s Snakefile -p --jobs 999 \
#~ --configfile config.yaml \
#~ --cluster-config resources_SLURM.yaml \
#~ --cluster "sbatch --cpus-per-task={cluster.cpu} --mem={cluster.mem} --error=SLURM_logs/%x.stderr --output=SLURM_logs/%x.stdout " --latency-wait 30 --dryrun
###############
# run #
###############
# sbatch -J gatk_variantFiltration_SnakemakeTest_run1 -o SLURM_logs/%x.out -e SLURM_logs/%x.err test_SLURM.sh
mkdir -p SLURM_logs/run1
snakemake -s Snakefile -p --jobs 999 \
--configfile config.yaml \
--cluster-config resources_SLURM.yaml \
--cluster "sbatch --cpus-per-task={cluster.cpu} --mem={cluster.mem} --error=SLURM_logs/run1/%x.stderr --output=SLURM_logs/ruhn1/%x.stdout " --latency-wait 30
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