From 527f6d896e17e098dfd3790e98bc5b609f35ac7f Mon Sep 17 00:00:00 2001 From: Maxime Garcia Date: Tue, 10 Apr 2018 14:33:18 +0200 Subject: [PATCH 1/2] no need to build containers for both genome versions --- scripts/do_all.sh | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/scripts/do_all.sh b/scripts/do_all.sh index 56f42821c3..597c11e21a 100755 --- a/scripts/do_all.sh +++ b/scripts/do_all.sh @@ -4,6 +4,7 @@ set -xeuo pipefail PROFILE=singularity PUSH='' REPOSITORY=maxulysse +GENOME=GRCh38 TAG=latest TOOL=docker @@ -11,6 +12,11 @@ while [[ $# -gt 0 ]] do key=$1 case $key in + --genome) + GENOME=$2 + shift # past argument + shift # past value + ;; -p|--profile) PROFILE=$2 shift # past argument @@ -40,10 +46,19 @@ do esac done -if [ $TOOL = docker ] +if [ $GENOME = smallGRCh37 ] +then + $GENOME = GRCh37 +fi + +function toLower() { + echo $1 | tr '[:upper:]' '[:lower:]' +} + +if [ $TOOL = docker ] && [ GRCh37,GRCh38 =~ $GENOME ] then - nextflow run buildContainers.nf -profile ${PROFILE} --verbose --docker ${PUSH} --repository ${REPOSITORY} --tag ${TAG} --containers fastqc,freebayes,gatk,igvtools,multiqc,mutect1,picard,qualimap,r-base,runallelecount,sarek,snpeff - nextflow run buildContainers.nf -profile ${PROFILE} --verbose --docker ${PUSH} --repository ${REPOSITORY} --tag ${TAG} --containers snpeffgrch37,snpeffgrch38,vepgrch37,vepgrch38 + nextflow run buildContainers.nf -profile ${PROFILE} --verbose --docker ${PUSH} --repository ${REPOSITORY} --tag ${TAG} --containers controlfreec,fastqc,freebayes,gatk,igvtools,multiqc,mutect1,picard,qualimap,r-base,runallelecount,sarek,snpeff,vcftools,vep + nextflow run buildContainers.nf -profile ${PROFILE} --verbose --docker ${PUSH} --repository ${REPOSITORY} --tag ${TAG} --containers snpeff$(toLower ${GENOME}),vep$(toLower ${GENOME}) else - nextflow run buildContainers.nf -profile ${PROFILE} --verbose --singularity --repository ${REPOSITORY} --tag ${TAG} --containerPath containers/ --containers fastqc,freebayes,gatk,igvtools,multiqc,mutect1,picard,qualimap,r-base,runallelecount,sarek,snpeffgrch37,snpeffgrch38,vepgrch37,vepgrch38 + nextflow run buildContainers.nf -profile ${PROFILE} --verbose --singularity --repository ${REPOSITORY} --tag ${TAG} --containerPath containers/ --containers controlfreec,fastqc,freebayes,gatk,igvtools,multiqc,mutect1,picard,qualimap,r-base,runallelecount,sarek,snpeff$(toLower ${GENOME}),vcftools,vep$(toLower ${GENOME}) fi From d38420e8d524ae1b661cafaa46caa76c2001a98c Mon Sep 17 00:00:00 2001 From: Maxime Garcia Date: Tue, 10 Apr 2018 16:00:29 +0200 Subject: [PATCH 2/2] remove containers that does not exist yet --- scripts/do_all.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/do_all.sh b/scripts/do_all.sh index 597c11e21a..e53acc23c5 100755 --- a/scripts/do_all.sh +++ b/scripts/do_all.sh @@ -57,8 +57,8 @@ function toLower() { if [ $TOOL = docker ] && [ GRCh37,GRCh38 =~ $GENOME ] then - nextflow run buildContainers.nf -profile ${PROFILE} --verbose --docker ${PUSH} --repository ${REPOSITORY} --tag ${TAG} --containers controlfreec,fastqc,freebayes,gatk,igvtools,multiqc,mutect1,picard,qualimap,r-base,runallelecount,sarek,snpeff,vcftools,vep + nextflow run buildContainers.nf -profile ${PROFILE} --verbose --docker ${PUSH} --repository ${REPOSITORY} --tag ${TAG} --containers fastqc,freebayes,gatk,igvtools,multiqc,mutect1,picard,qualimap,r-base,runallelecount,sarek,snpeff nextflow run buildContainers.nf -profile ${PROFILE} --verbose --docker ${PUSH} --repository ${REPOSITORY} --tag ${TAG} --containers snpeff$(toLower ${GENOME}),vep$(toLower ${GENOME}) else - nextflow run buildContainers.nf -profile ${PROFILE} --verbose --singularity --repository ${REPOSITORY} --tag ${TAG} --containerPath containers/ --containers controlfreec,fastqc,freebayes,gatk,igvtools,multiqc,mutect1,picard,qualimap,r-base,runallelecount,sarek,snpeff$(toLower ${GENOME}),vcftools,vep$(toLower ${GENOME}) + nextflow run buildContainers.nf -profile ${PROFILE} --verbose --singularity --repository ${REPOSITORY} --tag ${TAG} --containerPath containers/ --containers fastqc,freebayes,gatk,igvtools,multiqc,mutect1,picard,qualimap,r-base,runallelecount,sarek,snpeff$(toLower ${GENOME}),vep$(toLower ${GENOME}) fi