diff --git a/README.md b/README.md index 4fd09e1273..3198ed7bab 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![](doc/images/CAW_logo.png "CAW")][caw-site-link] +[![](https://raw.githubusercontent.com/SciLifeLab/CAW/master/doc/images/CAW_logo.png "CAW")][caw-site-link] # Cancer Analysis Workflow @@ -58,9 +58,9 @@ For further information/help contact: maxime.garcia@scilifelab.se, szilveszter.j -------------------------------------------------------------------------------- -[![](doc/images/SciLifeLab_logo.png "SciLifeLab")][scilifelab-link] -[![](doc/images/NGI_logo.png "NGI")][ngi-link] -[![](doc/images/NBIS_logo.png "NBIS")][nbis-link] +[![](https://raw.githubusercontent.com/SciLifeLab/CAW/master/doc/images/SciLifeLab_logo.png "SciLifeLab")][scilifelab-link] +[![](https://raw.githubusercontent.com/SciLifeLab/CAW/master/doc/images/NGI_logo.png "NGI")][ngi-link] +[![](https://raw.githubusercontent.com/SciLifeLab/CAW/master/doc/images/NBIS_logo.png "NBIS")][nbis-link] [ascat-link]: https://github.com/Crick-CancerGenomics/ascat [caw-site-link]: http://opensource.scilifelab.se/projects/caw/ diff --git a/buildContainers.nf b/buildContainers.nf index d4c0042bc6..9f96cc54b6 100644 --- a/buildContainers.nf +++ b/buildContainers.nf @@ -36,9 +36,23 @@ kate: syntax groovy; space-indent on; indent-width 2; ================================================================================ */ -version = '1.2' +version = '1.2.1' + +// Check that Nextflow version is up to date enough +// try / throw / catch works for NF versions < 0.25 when this was implemented +nf_required_version = '0.25.0' +try { + if( ! nextflow.version.matches(">= $nf_required_version") ){ + throw GroovyException('Nextflow version too old') + } +} catch (all) { + log.error "====================================================\n" + + " Nextflow version $nf_required_version required! You are running v$workflow.nextflow.version.\n" + + " Pipeline execution will continue, but things may break.\n" + + " Please update Nextflow.\n" + + "============================================================" +} -if (!nextflow.version.matches('>= 0.25.0')) exit 1, "Nextflow version 0.25.0 or greater is needed to run this workflow" if (params.help) exit 0, helpMessage() if (params.version) exit 0, versionMessage() if (!isAllowedParams(params)) exit 1, "params is unknown, see --help for more information" @@ -222,9 +236,8 @@ def defineContainersList(){ 'mutect1', 'picard', 'qualimap', + 'r-base', 'runallelecount', - 'runascat', - 'runconvertallelecounts', 'snpeff', 'snpeffgrch37', 'snpeffgrch38', @@ -253,9 +266,8 @@ def helpMessage() { log.info " Default: all" log.info " Possible values:" log.info " all, caw, fastqc, freebayes, gatk, igvtools, multiqc" - log.info " mutect1, picard, qualimap, runallelecount, runascat" - log.info " runconvertallelecounts, snpeff, snpeffgrch37, snpeffgrch38" - log.info " vep, vepgrch37, vepgrch38" + log.info " mutect1, picard, qualimap, r-base, runallelecount" + log.info " snpeff, snpeffgrch37, snpeffgrch38, vepgrch37, vepgrch38" log.info " --docker: Build containers using Docker" log.info " --help" log.info " you're reading it" diff --git a/buildReferences.nf b/buildReferences.nf index 136022e049..71a636b887 100644 --- a/buildReferences.nf +++ b/buildReferences.nf @@ -39,9 +39,23 @@ kate: syntax groovy; space-indent on; indent-width 2; ================================================================================ */ -version = '1.2' +version = '1.2.1' + +// Check that Nextflow version is up to date enough +// try / throw / catch works for NF versions < 0.25 when this was implemented +nf_required_version = '0.25.0' +try { + if( ! nextflow.version.matches(">= $nf_required_version") ){ + throw GroovyException('Nextflow version too old') + } +} catch (all) { + log.error "====================================================\n" + + " Nextflow version $nf_required_version required! You are running v$workflow.nextflow.version.\n" + + " Pipeline execution will continue, but things may break.\n" + + " Please update Nextflow.\n" + + "============================================================" +} -if (!nextflow.version.matches('>= 0.25.0')) exit 1, "Nextflow version 0.25.0 or greater is needed to run this workflow" if (params.help) exit 0, helpMessage() if (params.version) exit 0, versionMessage() if (!isAllowedParams(params)) exit 1, "params is unknown, see --help for more information" diff --git a/configuration/docker.config b/configuration/docker.config index 2056c087ef..368e6132fd 100644 --- a/configuration/docker.config +++ b/configuration/docker.config @@ -15,35 +15,35 @@ docker { } process { - $BuildBWAindexes.container = 'maxulysse/caw:1.2' - $BuildPicardIndex.container = 'maxulysse/picard:1.2' - $BuildSAMToolsIndex.container = 'maxulysse/caw:1.2' - $BuildVCFIndex.container = 'maxulysse/igvtools:1.2' - $ConcatVCF.container = 'maxulysse/caw:1.2' - $CreateRecalibrationTable.container = 'maxulysse/gatk:1.2' - $IndelRealigner.container = 'maxulysse/gatk:1.2' - $MapReads.container = 'maxulysse/caw:1.2' - $MarkDuplicates.container = 'maxulysse/picard:1.2' - $MergeBams.container = 'maxulysse/caw:1.2' - $RealignerTargetCreator.container = 'maxulysse/gatk:1.2' - $RecalibrateBam.container = 'maxulysse/gatk:1.2' - $RunAlleleCount.container = 'maxulysse/runallelecount:1.2' - $RunAscat.container = 'maxulysse/runascat:1.2' - $RunBamQC.container = 'maxulysse/qualimap:1.2' - $RunBcftoolsStats.container = 'maxulysse/caw:1.2' - $RunConvertAlleleCounts.container = 'maxulysse/runconvertallelecounts:1.2' - $RunFastQC.container = 'maxulysse/fastqc:1.2' - $RunFreeBayes.container = 'maxulysse/freebayes:1.2' - $RunGenotypeGVCFs.container = 'maxulysse/gatk:1.2' - $RunHaplotypecaller.container = 'maxulysse/gatk:1.2' - $RunManta.container = 'maxulysse/caw:1.2' - $RunMultiQC.container = 'maxulysse/multiqc:1.2' - $RunMutect1.container = 'maxulysse/mutect1:1.2' - $RunMutect2.container = 'maxulysse/gatk:1.2' - $RunSamtoolsStats.container = 'maxulysse/caw:1.2' - $RunSingleManta.container = 'maxulysse/caw:1.2' - $RunSingleStrelka.container = 'maxulysse/caw:1.2' - $RunSnpeff.container = {params.genome == "GRCh38" ? 'maxulysse/snpeffgrch38:1.2' : 'maxulysse/snpeffgrch37:1.2'} - $RunStrelka.container = 'maxulysse/caw:1.2' - $RunVEP.container = {params.genome == "GRCh38" ? 'maxulysse/vepgrch38:1.2' : 'maxulysse/vepgrch37:1.2'} + $BuildBWAindexes.container = 'maxulysse/caw:1.2.1' + $BuildPicardIndex.container = 'maxulysse/picard:1.2.1' + $BuildSAMToolsIndex.container = 'maxulysse/caw:1.2.1' + $BuildVCFIndex.container = 'maxulysse/igvtools:1.2.1' + $ConcatVCF.container = 'maxulysse/caw:1.2.1' + $CreateRecalibrationTable.container = 'maxulysse/gatk:1.2.1' + $IndelRealigner.container = 'maxulysse/gatk:1.2.1' + $MapReads.container = 'maxulysse/caw:1.2.1' + $MarkDuplicates.container = 'maxulysse/picard:1.2.1' + $MergeBams.container = 'maxulysse/caw:1.2.1' + $RealignerTargetCreator.container = 'maxulysse/gatk:1.2.1' + $RecalibrateBam.container = 'maxulysse/gatk:1.2.1' + $RunAlleleCount.container = 'maxulysse/runallelecount:1.2.1' + $RunAscat.container = 'maxulysse/r-base:1.2.1' + $RunBamQC.container = 'maxulysse/qualimap:1.2.1' + $RunBcftoolsStats.container = 'maxulysse/caw:1.2.1' + $RunConvertAlleleCounts.container = 'maxulysse/r-base:1.2.1' + $RunFastQC.container = 'maxulysse/fastqc:1.2.1' + $RunFreeBayes.container = 'maxulysse/freebayes:1.2.1' + $RunGenotypeGVCFs.container = 'maxulysse/gatk:1.2.1' + $RunHaplotypecaller.container = 'maxulysse/gatk:1.2.1' + $RunManta.container = 'maxulysse/caw:1.2.1' + $RunMultiQC.container = 'maxulysse/multiqc:1.2.1' + $RunMutect1.container = 'maxulysse/mutect1:1.2.1' + $RunMutect2.container = 'maxulysse/gatk:1.2.1' + $RunSamtoolsStats.container = 'maxulysse/caw:1.2.1' + $RunSingleManta.container = 'maxulysse/caw:1.2.1' + $RunSingleStrelka.container = 'maxulysse/caw:1.2.1' + $RunSnpeff.container = {params.genome == "GRCh38" ? 'maxulysse/snpeffgrch38:1.2.1' : 'maxulysse/snpeffgrch37:1.2.1'} + $RunStrelka.container = 'maxulysse/caw:1.2.1' + $RunVEP.container = {params.genome == "GRCh38" ? 'maxulysse/vepgrch38:1.2.1' : 'maxulysse/vepgrch37:1.2.1'} } diff --git a/configuration/singularity-path.config b/configuration/singularity-path.config index 50719eaa54..d1b05de5e0 100644 --- a/configuration/singularity-path.config +++ b/configuration/singularity-path.config @@ -15,36 +15,36 @@ singularity { } process { - $BuildBWAindexes.container = 'containers/caw-1.2.img' - $BuildPicardIndex.container = 'containers/picard-1.2.img' - $BuildSAMToolsIndex.container = 'containers/caw-1.2.img' - $BuildVCFIndex.container = 'containers/igvtools-1.2.img' - $ConcatVCF.container = 'containers/caw-1.2.img' - $CreateRecalibrationTable.container = 'containers/gatk-1.2.img' - $GenerateMultiQCconfig.container = 'containers/multiqc-1.2.img' - $IndelRealigner.container = 'containers/gatk-1.2.img' - $MapReads.container = 'containers/caw-1.2.img' - $MarkDuplicates.container = 'containers/picard-1.2.img' - $MergeBams.container = 'containers/caw-1.2.img' - $RealignerTargetCreator.container = 'containers/gatk-1.2.img' - $RecalibrateBam.container = 'containers/gatk-1.2.img' - $RunAlleleCount.container = 'containers/runallelecount-1.2.img' - $RunAscat.container = 'containers/runascat-1.2.img' - $RunBamQC.container = 'containers/qualimap-1.2.img' - $RunBcftoolsStats.container = 'containers/caw-1.2.img' - $RunConvertAlleleCounts.container = 'containers/runconvertallelecounts-1.2.img' - $RunFastQC.container = 'containers/fastqc-1.2.img' - $RunFreeBayes.container = 'containers/freebayes-1.2.img' - $RunGenotypeGVCFs.container = 'containers/gatk-1.2.img' - $RunHaplotypecaller.container = 'containers/gatk-1.2.img' - $RunManta.container = 'containers/caw-1.2.img' - $RunMultiQC.container = 'containers/multiqc-1.2.img' - $RunMutect1.container = 'containers/mutect1-1.2.img' - $RunMutect2.container = 'containers/gatk-1.2.img' - $RunSamtoolsStats.container = 'containers/caw-1.2.img' - $RunSingleManta.container = 'containers/caw-1.2.img' - $RunSingleStrelka.container = 'containers/caw-1.2.img' - $RunSnpeff.container = {params.genome == "GRCh38" ? 'containers/snpeffgrch38-1.2.img' : 'containers/snpeffgrch37-1.2.img'} - $RunStrelka.container = 'containers/caw-1.2.img' - $RunVEP.container = {params.genome == "GRCh38" ? 'containers/vepgrch38-1.2.img' : 'containers/vepgrch37-1.2.img'} + $BuildBWAindexes.container = 'containers/caw-1.2.1.img' + $BuildPicardIndex.container = 'containers/picard-1.2.1.img' + $BuildSAMToolsIndex.container = 'containers/caw-1.2.1.img' + $BuildVCFIndex.container = 'containers/igvtools-1.2.1.img' + $ConcatVCF.container = 'containers/caw-1.2.1.img' + $CreateRecalibrationTable.container = 'containers/gatk-1.2.1.img' + $GenerateMultiQCconfig.container = 'containers/multiqc-1.2.1.img' + $IndelRealigner.container = 'containers/gatk-1.2.1.img' + $MapReads.container = 'containers/caw-1.2.1.img' + $MarkDuplicates.container = 'containers/picard-1.2.1.img' + $MergeBams.container = 'containers/caw-1.2.1.img' + $RealignerTargetCreator.container = 'containers/gatk-1.2.1.img' + $RecalibrateBam.container = 'containers/gatk-1.2.1.img' + $RunAlleleCount.container = 'containers/runallelecount-1.2.1.img' + $RunAscat.container = 'containers/r-base-1.2.1.img' + $RunBamQC.container = 'containers/qualimap-1.2.1.img' + $RunBcftoolsStats.container = 'containers/caw-1.2.1.img' + $RunConvertAlleleCounts.container = 'containers/r-base-1.2.1.img' + $RunFastQC.container = 'containers/fastqc-1.2.1.img' + $RunFreeBayes.container = 'containers/freebayes-1.2.1.img' + $RunGenotypeGVCFs.container = 'containers/gatk-1.2.1.img' + $RunHaplotypecaller.container = 'containers/gatk-1.2.1.img' + $RunManta.container = 'containers/caw-1.2.1.img' + $RunMultiQC.container = 'containers/multiqc-1.2.1.img' + $RunMutect1.container = 'containers/mutect1-1.2.1.img' + $RunMutect2.container = 'containers/gatk-1.2.1.img' + $RunSamtoolsStats.container = 'containers/caw-1.2.1.img' + $RunSingleManta.container = 'containers/caw-1.2.1.img' + $RunSingleStrelka.container = 'containers/caw-1.2.1.img' + $RunSnpeff.container = {params.genome == "GRCh38" ? 'containers/snpeffgrch38-1.2.1.img' : 'containers/snpeffgrch37-1.2.1.img'} + $RunStrelka.container = 'containers/caw-1.2.1.img' + $RunVEP.container = {params.genome == "GRCh38" ? 'containers/vepgrch38-1.2.1.img' : 'containers/vepgrch37-1.2.1.img'} } diff --git a/configuration/singularity.config b/configuration/singularity.config index 03cfb62d3e..496d8fb7c9 100644 --- a/configuration/singularity.config +++ b/configuration/singularity.config @@ -14,35 +14,35 @@ singularity { } process { - $BuildBWAindexes.container = 'docker://maxulysse/caw:1.2' - $BuildPicardIndex.container = 'docker://maxulysse/picard:1.2' - $BuildSAMToolsIndex.container = 'docker://maxulysse/caw:1.2' - $BuildVCFIndex.container = 'docker://maxulysse/igvtools:1.2' - $ConcatVCF.container = 'docker://maxulysse/caw:1.2' - $CreateRecalibrationTable.container = 'docker://maxulysse/gatk:1.2' - $IndelRealigner.container = 'docker://maxulysse/gatk:1.2' - $MapReads.container = 'docker://maxulysse/caw:1.2' - $MarkDuplicates.container = 'docker://maxulysse/picard:1.2' - $MergeBams.container = 'docker://maxulysse/caw:1.2' - $RealignerTargetCreator.container = 'docker://maxulysse/gatk:1.2' - $RecalibrateBam.container = 'docker://maxulysse/gatk:1.2' - $RunAlleleCount.container = 'docker://maxulysse/runallelecount:1.2' - $RunAscat.container = 'docker://maxulysse/runascat:1.2' - $RunBamQC.container = 'docker://maxulysse/qualimap:1.2' - $RunBcftoolsStats.container = 'docker://maxulysse/caw:1.2' - $RunConvertAlleleCounts.container = 'docker://maxulysse/runconvertallelecounts:1.2' - $RunFastQC.container = 'docker://maxulysse/fastqc:1.2' - $RunFreeBayes.container = 'docker://maxulysse/freebayes:1.2' - $RunGenotypeGVCFs.container = 'docker://maxulysse/gatk:1.2' - $RunHaplotypecaller.container = 'docker://maxulysse/gatk:1.2' - $RunManta.container = 'docker://maxulysse/caw:1.2' - $RunMultiQC.container = 'docker://maxulysse/multiqc:1.2' - $RunMutect1.container = 'docker://maxulysse/mutect1:1.2' - $RunMutect2.container = 'docker://maxulysse/gatk:1.2' - $RunSamtoolsStats.container = 'docker://maxulysse/caw:1.2' - $RunSingleManta.container = 'docker://maxulysse/caw:1.2' - $RunSingleStrelka.container = 'docker://maxulysse/caw:1.2' - $RunSnpeff.container = {params.genome == "GRCh38" ? 'docker://maxulysse/snpeffgrch38:1.2' : 'docker://maxulysse/snpeffgrch37:1.2'} - $RunStrelka.container = 'docker://maxulysse/caw:1.2' - $RunVEP.container = {params.genome == "GRCh38" ? 'docker://maxulysse/vepgrch38:1.2' : 'docker://maxulysse/vepgrch37:1.2'} + $BuildBWAindexes.container = 'docker://maxulysse/caw:1.2.1' + $BuildPicardIndex.container = 'docker://maxulysse/picard:1.2.1' + $BuildSAMToolsIndex.container = 'docker://maxulysse/caw:1.2.1' + $BuildVCFIndex.container = 'docker://maxulysse/igvtools:1.2.1' + $ConcatVCF.container = 'docker://maxulysse/caw:1.2.1' + $CreateRecalibrationTable.container = 'docker://maxulysse/gatk:1.2.1' + $IndelRealigner.container = 'docker://maxulysse/gatk:1.2.1' + $MapReads.container = 'docker://maxulysse/caw:1.2.1' + $MarkDuplicates.container = 'docker://maxulysse/picard:1.2.1' + $MergeBams.container = 'docker://maxulysse/caw:1.2.1' + $RealignerTargetCreator.container = 'docker://maxulysse/gatk:1.2.1' + $RecalibrateBam.container = 'docker://maxulysse/gatk:1.2.1' + $RunAlleleCount.container = 'docker://maxulysse/runallelecount:1.2.1' + $RunAscat.container = 'docker://maxulysse/r-base:1.2.1' + $RunBamQC.container = 'docker://maxulysse/qualimap:1.2.1' + $RunBcftoolsStats.container = 'docker://maxulysse/caw:1.2.1' + $RunConvertAlleleCounts.container = 'docker://maxulysse/r-base:1.2.1' + $RunFastQC.container = 'docker://maxulysse/fastqc:1.2.1' + $RunFreeBayes.container = 'docker://maxulysse/freebayes:1.2.1' + $RunGenotypeGVCFs.container = 'docker://maxulysse/gatk:1.2.1' + $RunHaplotypecaller.container = 'docker://maxulysse/gatk:1.2.1' + $RunManta.container = 'docker://maxulysse/caw:1.2.1' + $RunMultiQC.container = 'docker://maxulysse/multiqc:1.2.1' + $RunMutect1.container = 'docker://maxulysse/mutect1:1.2.1' + $RunMutect2.container = 'docker://maxulysse/gatk:1.2.1' + $RunSamtoolsStats.container = 'docker://maxulysse/caw:1.2.1' + $RunSingleManta.container = 'docker://maxulysse/caw:1.2.1' + $RunSingleStrelka.container = 'docker://maxulysse/caw:1.2.1' + $RunSnpeff.container = {params.genome == "GRCh38" ? 'docker://maxulysse/snpeffgrch38:1.2.1' : 'docker://maxulysse/snpeffgrch37:1.2.1'} + $RunStrelka.container = 'docker://maxulysse/caw:1.2.1' + $RunVEP.container = {params.genome == "GRCh38" ? 'docker://maxulysse/vepgrch38:1.2.1' : 'docker://maxulysse/vepgrch37:1.2.1'} } diff --git a/configuration/strelka_config.ini b/configuration/strelka_config.ini deleted file mode 100644 index 06c7948db3..0000000000 --- a/configuration/strelka_config.ini +++ /dev/null @@ -1,139 +0,0 @@ - -; -; User configuration options for Strelka somatic small-variant caller -; workflow: -; - -[user] - -; -; isSkipDepthFilters should be set to 1 to skip depth filtration for -; whole exome or other targeted sequencing data -; -isSkipDepthFilters = 0 - -; -; strelka will not accept input reads above this depth (they will be skipped -; until the depth drops below this value). Set this value <= 0 to disable -; this feature. Using this filter will bound memory usage given extremely high -; depth input, but may be problematic in high-depth targeted sequencing -; applications. -; -maxInputDepth = 10000 - -; -; If the depth filter is not skipped, all variants which occur at a -; depth greater than depthFilterMultiple*chromosome mean depth will be -; filtered out. -; -depthFilterMultiple = 3.0 - -; -; Somatic SNV calls are filtered at sites where greater than this -; fraction of basecalls have been removed by the mismatch density -; filter in either sample. -; -snvMaxFilteredBasecallFrac = 0.4 - -; -; Somatic SNV calls are filtered at sites where greater than this -; fraction of overlapping reads contain deletions which span the SNV -; call site. -; -snvMaxSpanningDeletionFrac = 0.75 - -; -; Somatic indel calls are filtered if they represent an expansion or -; contraction of a repeated pattern with a repeat count greater than -; indelMaxRefRepeat in the reference (ie. if indelMaxRefRepeat is 8, -; then the indel is filtered when it is an expansion/contraction of a -; homopolymer longer than 8 bases, a dinucleotide repeat longer than -; 16 bases, etc.) -; -indelMaxRefRepeat = 8 - -; -; Somatic indel calls are filtered if greater than this fraction of -; basecalls in a window extending 50 bases to each side of an indel's -; call position have been removed by the mismatch density filter. -; -indelMaxWindowFilteredBasecallFrac = 0.3 - -; -; Somatic indels are filtered if they overlap ’interrupted -; homopolymers’ greater than this length. The term 'interrupted -; homopolymer' is used to indicate the longest homopolymer which can -; be found intersecting or adjacent to the called indel when a single -; non-homopolymer base is allowed. -; -indelMaxIntHpolLength = 14 - -; -; prior probability of a somatic snv or indel -; -ssnvPrior = 0.000001 -sindelPrior = 0.000001 - -; -; probability of an snv or indel noise allele -; -; NB: in the calling model a noise allele is shared in tumor and -; normal samples, but occurs at any frequency. -; -ssnvNoise = 0.0000005 -sindelNoise = 0.000001 - -; -; Fraction of snv noise attributed to strand-bias. -; -; It is not recommended to change this setting. However, if it is -; essential to turn the strand bias penalization off, the following is -; recommended: -; Assuming the current value of ssnvNoiseStrandBiasFrac is 0.5, -; (1) set ssnvNoiseStrandBiasFrac = 0 -; (2) divide the current ssnvNoise value by 2 -; -ssnvNoiseStrandBiasFrac = 0.5 - -; -; minimum MAPQ score for PE reads at tier1: -; -minTier1Mapq = 20 - -; -; minimum MAPQ score for PE and SE reads at tier2: -; -minTier2Mapq = 5 - -; -; Somatic quality score (QSS_NT, NT=ref) below which somatic SNVs are -; marked as filtered: -; -ssnvQuality_LowerBound = 15 - -; -; Somatic quality score (QSI_NT, NT=ref) below which somatic indels -; are marked as filtered: -; -sindelQuality_LowerBound = 30 - -; -; Optionally write out read alignments which were altered during the -; realignment step. At the completion of the workflow run, the -; realigned reads can be found in: -; -; ${ANALYSIS_DIR}/realigned/{normal,tumor}.realigned.bam -; -isWriteRealignedBam = 0 - -; -; Jobs are parallelized over segments of the reference genome no larger -; than this size: -; -binSize = 25000000 - -; -; Additional arguments passed to strelka. -; -extraStrelkaArguments = - diff --git a/configuration/uppmax-localhost.config b/configuration/uppmax-localhost.config index 3ab753f4e6..1fc42a9e9c 100644 --- a/configuration/uppmax-localhost.config +++ b/configuration/uppmax-localhost.config @@ -60,14 +60,14 @@ process { memory = {params.totalMemory} } $IndelRealigner { - memory = {returnMin(params.singleCPUMem * 2 * task.attempt, params.totalMemory)} + memory = params.singleCPUMem * 2 * task.attempt } $MapReads { cpus = 16 memory = {params.totalMemory} } $MarkDuplicates { - memory = {returnMin(params.singleCPUMem * 2 * task.attempt, params.totalMemory)} + memory = params.singleCPUMem * 2 * task.attempt } $MergeBams { cpus = 16 @@ -75,16 +75,16 @@ process { } $RealignerTargetCreator { cpus = 4 - memory = {returnMin(params.singleCPUMem * 4 * task.attempt, params.totalMemory)} + memory = params.singleCPUMem * 4 * task.attempt } $RecalibrateBam { memory = {params.singleCPUMem * task.attempt} } $RunAlleleCount { - memory = {returnMin(params.singleCPUMem * 2 * task.attempt, params.totalMemory)} + memory = params.singleCPUMem * 2 * task.attempt } $RunAscat { - memory = {returnMin(params.singleCPUMem * 2 * task.attempt, params.totalMemory)} + memory = params.singleCPUMem * 2 * task.attempt } $RunBamQC { cpus = 16 @@ -93,7 +93,7 @@ process { $RunBcftoolsStats { } $RunConvertAlleleCounts { - memory = {returnMin(params.singleCPUMem * 2 * task.attempt, params.totalMemory)} + memory = params.singleCPUMem * 2 * task.attempt } $RunFastQC { errorStrategy = { task.exitStatus == 143 ? 'retry' : 'ignore' } @@ -104,7 +104,7 @@ process { } $RunHaplotypecaller { // Increase memory quadratically - memory = {returnMin(params.singleCPUMem * task.attempt * task.attempt, params.totalMemory)} + memory = params.singleCPUMem * task.attempt * task.attempt } $RunGenotypeGVCFs { } diff --git a/containers/caw/build.sh b/containers/caw/build.sh index 762b9f8f50..67aa36275d 100755 --- a/containers/caw/build.sh +++ b/containers/caw/build.sh @@ -11,35 +11,38 @@ STRELKA_VERSION=2.8.2 # Install libraries apt-get update && apt-get install -y --no-install-recommends \ -build-essential \ -bzip2 \ -ca-certificates \ -g++ \ -gcc \ -git \ -libbz2-dev \ -liblzma-dev \ -libncurses5-dev \ -libncursesw5-dev \ -make \ -python \ -unzip \ -wget \ -zlib1g-dev + build-essential \ + bzip2 \ + ca-certificates \ + g++ \ + gcc \ + git \ + libbz2-dev \ + liblzma-dev \ + libncurses5-dev \ + libncursesw5-dev \ + make \ + python \ + python3 \ + unzip \ + wget \ + zlib1g-dev # Install tools mkdir /build # Install BWA cd /build -git clone http://github.com/lh3/bwa.git bwa --branch v${BWA_VERSION} +git clone http://github.com/lh3/bwa.git bwa \ + --branch v${BWA_VERSION} cd bwa make cp bwa /usr/local/bin/bwa # Install HTSlib cd /build -wget --quiet -O htslib-${HTSLIB_VERSION}.tar.bz2 https://github.com/samtools/htslib/releases/download/${HTSLIB_VERSION}/htslib-${HTSLIB_VERSION}.tar.bz2 +wget --quiet -O htslib-${HTSLIB_VERSION}.tar.bz2 \ + https://github.com/samtools/htslib/releases/download/${HTSLIB_VERSION}/htslib-${HTSLIB_VERSION}.tar.bz2 tar xfj htslib-${HTSLIB_VERSION}.tar.bz2 rm htslib-${HTSLIB_VERSION}.tar.bz2 cd htslib-${HTSLIB_VERSION} @@ -48,7 +51,8 @@ make && make install # Install BCFtools cd /build -wget --quiet -O bcftools-${BCFTOOLS_VERSION}.tar.bz2 https://github.com/samtools/bcftools/releases/download/${BCFTOOLS_VERSION}/bcftools-${BCFTOOLS_VERSION}.tar.bz2 +wget --quiet -O bcftools-${BCFTOOLS_VERSION}.tar.bz2 \ + https://github.com/samtools/bcftools/releases/download/${BCFTOOLS_VERSION}/bcftools-${BCFTOOLS_VERSION}.tar.bz2 tar xfj bcftools-${BCFTOOLS_VERSION}.tar.bz2 rm bcftools-${BCFTOOLS_VERSION}.tar.bz2 cd bcftools-${BCFTOOLS_VERSION} @@ -57,7 +61,8 @@ make && make install # Install Samtools cd /build -wget --quiet -O samtools-${SAMTOOLS_VERSION}.tar.bz2 https://github.com/samtools/samtools/releases/download/${SAMTOOLS_VERSION}/samtools-${SAMTOOLS_VERSION}.tar.bz2 +wget --quiet -O samtools-${SAMTOOLS_VERSION}.tar.bz2 \ + https://github.com/samtools/samtools/releases/download/${SAMTOOLS_VERSION}/samtools-${SAMTOOLS_VERSION}.tar.bz2 tar xfj samtools-${SAMTOOLS_VERSION}.tar.bz2 rm samtools-${SAMTOOLS_VERSION}.tar.bz2 cd samtools-${SAMTOOLS_VERSION} @@ -66,14 +71,16 @@ make && make install # Install Manta cd /build -wget --quiet -O manta-${MANTA_VERSION}.centos5_x86_64.tar.bz2 https://github.com/Illumina/manta/releases/download/v${MANTA_VERSION}/manta-${MANTA_VERSION}.centos5_x86_64.tar.bz2 +wget --quiet -O manta-${MANTA_VERSION}.centos5_x86_64.tar.bz2 \ + https://github.com/Illumina/manta/releases/download/v${MANTA_VERSION}/manta-${MANTA_VERSION}.centos5_x86_64.tar.bz2 tar xvjf manta-${MANTA_VERSION}.centos5_x86_64.tar.bz2 mv manta-${MANTA_VERSION}.centos5_x86_64 $MANTA_INSTALL_PATH rm manta-${MANTA_VERSION}.centos5_x86_64.tar.bz2 # Install Strelka cd /build -wget --quiet -O strelka-${STRELKA_VERSION}.centos5_x86_64.tar.bz2 https://github.com/Illumina/strelka/releases/download/v${STRELKA_VERSION}/strelka-${STRELKA_VERSION}.centos5_x86_64.tar.bz2 +wget --quiet -O strelka-${STRELKA_VERSION}.centos5_x86_64.tar.bz2 \ + https://github.com/Illumina/strelka/releases/download/v${STRELKA_VERSION}/strelka-${STRELKA_VERSION}.centos5_x86_64.tar.bz2 tar xvjf strelka-${STRELKA_VERSION}.centos5_x86_64.tar.bz2 mv strelka-${STRELKA_VERSION}.centos5_x86_64 $STRELKA_INSTALL_PATH rm strelka-${STRELKA_VERSION}.centos5_x86_64.tar.bz2 @@ -81,19 +88,19 @@ rm strelka-${STRELKA_VERSION}.centos5_x86_64.tar.bz2 # Clean up install cd / apt-get remove -y \ -build-essential \ -ca-certificates \ -gcc \ -git \ -libbz2-dev \ -liblzma-dev \ -libncurses5-dev \ -libncursesw5-dev \ -unzip \ -wget \ -zlib1g-dev + build-essential \ + ca-certificates \ + gcc \ + git \ + libbz2-dev \ + liblzma-dev \ + libncurses5-dev \ + libncursesw5-dev \ + unzip \ + wget \ + zlib1g-dev apt-get clean rm -rf /build /var/lib/apt/lists/* /opt/get-pip.py # Create UPPMAX directories -mkdir /pica /proj /sw +mkdir /pica /proj /scratch /sw diff --git a/containers/fastqc/Dockerfile b/containers/fastqc/Dockerfile index 778e77286f..ad746292fd 100644 --- a/containers/fastqc/Dockerfile +++ b/containers/fastqc/Dockerfile @@ -1,18 +1,29 @@ FROM openjdk:8 -LABEL author="Maxime Garcia" \ -description="FastQC 0.11.5 image for use in CAW" \ -maintainer="maxime.garcia@scilifelab.se" +LABEL \ + author="Maxime Garcia" \ + description="FastQC image for use in CAW" \ + maintainer="maxime.garcia@scilifelab.se" + +# Install libraries +RUN \ + apt-get update && apt-get install -y --no-install-recommends \ + cpanminus \ + wget \ + && rm -rf /var/lib/apt/lists/* \ + && cpanm FindBin # Setup ENV variables -ENV FASTQC_BIN="fastqc_v0.11.5.zip" +ENV FASTQC_VERSION=0.11.5 # Install FastQC -RUN curl -fsSL http://www.bioinformatics.babraham.ac.uk/projects/fastqc/$FASTQC_BIN -o /opt/$FASTQC_BIN \ -&& unzip /opt/$FASTQC_BIN -d /opt/ \ -&& chmod 755 /opt/FastQC/fastqc \ -&& ln -s /opt/FastQC/fastqc /usr/local/bin/fastqc \ -&& rm /opt/$FASTQC_BIN +RUN \ + wget --quiet -O fastqc_v${FASTQC_VERSION}.zip \ + http://www.bioinformatics.babraham.ac.uk/projects/fastqc/fastqc_v${FASTQC_VERSION}.zip \ + && unzip fastqc_v${FASTQC_VERSION}.zip -d /opt/ \ + && chmod 755 /opt/FastQC/fastqc \ + && ln -s /opt/FastQC/fastqc /usr/local/bin/fastqc \ + && rm fastqc_v${FASTQC_VERSION}.zip # Create UPPMAX directories -RUN mkdir /pica /proj /sw +RUN mkdir /pica /proj /scratch /sw diff --git a/containers/freebayes/Dockerfile b/containers/freebayes/Dockerfile index 95f6273919..5f4ac0be36 100644 --- a/containers/freebayes/Dockerfile +++ b/containers/freebayes/Dockerfile @@ -1,31 +1,33 @@ -FROM debian:8.6 +FROM debian:8.9 -LABEL author="Maxime Garcia" \ -description="FreeBayes 1.1.0 image for use in CAW" \ -maintainer="maxime.garcia@scilifelab.se" +LABEL \ + author="Maxime Garcia" \ + description="FreeBayes image for use in CAW" \ + maintainer="maxime.garcia@scilifelab.se" # Install libraries -RUN apt-get update && apt-get install -y --no-install-recommends \ -build-essential \ -ca-certificates \ -cmake \ -git \ -wget \ -zlib1g-dev \ -&& rm -rf /var/lib/apt/lists/* +RUN \ + apt-get update && apt-get install -y --no-install-recommends \ + build-essential \ + ca-certificates \ + cmake \ + git \ + wget \ + zlib1g-dev \ + && rm -rf /var/lib/apt/lists/* # Setup ENV variables -ENV FREEBAYES_BIN="v1.1.0.zip" \ -FREEBAYES_VERSION="v1.1.0" +ENV FREEBAYES_VERSION="1.1.0" # Install BCFTools -RUN git clone --recursive git://github.com/ekg/freebayes.git freebayes \ ---branch $FREEBAYES_VERSION \ -&& cd freebayes \ -&& make \ -&& make install \ -&& cd .. \ +RUN \ + git clone --recursive git://github.com/ekg/freebayes.git freebayes \ + --branch v${FREEBAYES_VERSION} \ + && cd freebayes \ + && make \ + && make install \ + && cd .. \ && rm -rf freebayes # Create UPPMAX directories -RUN mkdir /pica /proj /sw +RUN mkdir /pica /proj /scratch /sw diff --git a/containers/gatk/Dockerfile b/containers/gatk/Dockerfile index a0c6af48b2..97864cd0cf 100644 --- a/containers/gatk/Dockerfile +++ b/containers/gatk/Dockerfile @@ -2,11 +2,11 @@ FROM broadinstitute/gatk3:3.8-0 LABEL \ author="Maxime Garcia" \ - description="GATK 3.8 image for use in CAW" \ + description="GATK image for use in CAW" \ maintainer="maxime.garcia@scilifelab.se" ENV \ - GATK_HOME=/usr +GATK_HOME=/usr # Create UPPMAX directories -RUN mkdir /pica /proj /sw +RUN mkdir /pica /proj /scratch /sw diff --git a/containers/igvtools/Dockerfile b/containers/igvtools/Dockerfile index aa1deca8c3..2c5b8cbedb 100644 --- a/containers/igvtools/Dockerfile +++ b/containers/igvtools/Dockerfile @@ -1,13 +1,15 @@ FROM openjdk:8-slim -LABEL author="Maxime Garcia" \ -description="IGVtools 2.3.98 image for use in CAW" \ -maintainer="maxime.garcia@scilifelab.se" +LABEL \ + author="Maxime Garcia" \ + description="IGVtools 2.3.98 image for use in CAW" \ + maintainer="maxime.garcia@scilifelab.se" # Install libraries -RUN apt-get update && apt-get install -y --no-install-recommends \ -curl \ -&& rm -rf /var/lib/apt/lists/* +RUN \ + apt-get update && apt-get install -y --no-install-recommends \ + wget \ + && rm -rf /var/lib/apt/lists/* # Setup ENV variables ENV \ @@ -15,12 +17,12 @@ ENV \ IGVTOOLS_VERSION=2.3.98 # Install IGVTools -RUN curl -fsSL http://data.broadinstitute.org/igv/projects/downloads/2.3/igvtools_${IGVTOOLS_VERSION}.zip -o igvtools_${IGVTOOLS_VERSION}.zip \ -&& unzip igvtools_${IGVTOOLS_VERSION}.zip \ -&& rm igvtools_${IGVTOOLS_VERSION}.zip \ -&& mv IGVTools $IGVTOOLS_HOME - -RUN ls -l $IGVTOOLS_HOME +RUN \ + wget --quiet -O igvtools_${IGVTOOLS_VERSION}.zip \ + http://data.broadinstitute.org/igv/projects/downloads/2.3/igvtools_${IGVTOOLS_VERSION}.zip \ + && unzip igvtools_${IGVTOOLS_VERSION}.zip \ + && rm igvtools_${IGVTOOLS_VERSION}.zip \ + && mv IGVTools $IGVTOOLS_HOME # Create UPPMAX directories -RUN mkdir /pica /proj /sw +RUN mkdir /pica /proj /scratch /sw diff --git a/containers/multiqc/Dockerfile b/containers/multiqc/Dockerfile index 028750642f..42f7e99e15 100644 --- a/containers/multiqc/Dockerfile +++ b/containers/multiqc/Dockerfile @@ -2,11 +2,11 @@ FROM python:2.7-slim LABEL \ author="Maxime Garcia" \ - description="MultiQC 1.1 image used in CAW" \ + description="MultiQC image used in CAW" \ maintainer="maxime.garcia@scilifelab.se" # Build container ADD \ build.sh /usr/bin/ RUN \ - build.sh \ No newline at end of file + build.sh diff --git a/containers/multiqc/build.sh b/containers/multiqc/build.sh index 61d8162114..4c6bf899d6 100755 --- a/containers/multiqc/build.sh +++ b/containers/multiqc/build.sh @@ -6,9 +6,9 @@ MULTIQC_VERSION=1.1 # Install libraries apt-get update && apt-get install -y --no-install-recommends \ -g++ \ -git \ -wget + g++ \ + git \ + wget # Install pip wget --quiet -O /opt/get-pip.py https://bootstrap.pypa.io/get-pip.py @@ -21,10 +21,10 @@ pip install git+git://github.com/ewels/MultiQC.git@v${MULTIQC_VERSION} # Clean up install cd / apt-get remove -y \ -g++ \ -git \ -wget + g++ \ + git \ + wget rm -rf /build /var/lib/apt/lists/* /opt/get-pip.py # Create UPPMAX directories -mkdir /pica /proj /sw +mkdir /pica /proj /scratch /sw diff --git a/containers/mutect1/Dockerfile b/containers/mutect1/Dockerfile index 3e8a4eb72a..ae0f3ca4dd 100644 --- a/containers/mutect1/Dockerfile +++ b/containers/mutect1/Dockerfile @@ -1,24 +1,27 @@ FROM openjdk:7-slim -LABEL author="Maxime Garcia" \ -description="MuTect 1.1.5 image for use in CAW" \ -maintainer="maxime.garcia@scilifelab.se" +LABEL \ + author="Maxime Garcia" \ + description="MuTect 1.1.5 image for use in CAW" \ + maintainer="maxime.garcia@scilifelab.se" # Install libraries -RUN apt-get update && apt-get install -y --no-install-recommends \ -curl \ -&& rm -rf /var/lib/apt/lists/* +RUN \ + apt-get update && apt-get install -y --no-install-recommends \ + wget \ + && rm -rf /var/lib/apt/lists/* # Setup ENV variables -ENV MUTECT_BIN="muTect-1.1.5-bin.zip" \ -MUTECT_HOME="/opt/mutect-1.1.5" \ -MUTECT_VERSION="1.1.5" +ENV \ + MUTECT_HOME="/opt/mutect-1.1.5" \ + MUTECT_VERSION="1.1.5" # Install MuTect1 -RUN curl -fsSL https://github.com/broadinstitute/mutect/releases/download/$MUTECT_VERSION/$MUTECT_BIN -o /opt/$MUTECT_BIN \ -&& unzip /opt/$MUTECT_BIN -d $MUTECT_HOME \ -&& rm /opt/$MUTECT_BIN \ +RUN \ + wget --quiet -O muTect-${MUTECT_VERSION}-bin.zip \ + https://github.com/broadinstitute/mutect/releases/download/${MUTECT_VERSION}/muTect-${MUTECT_VERSION}-bin.zip \ + && unzip muTect-${MUTECT_VERSION}-bin.zip -d $MUTECT_HOME \ + && rm muTect-${MUTECT_VERSION}-bin.zip \ && mv $MUTECT_HOME/muTect-$MUTECT_VERSION.jar $MUTECT_HOME/muTect.jar - # Create UPPMAX directories -RUN mkdir /pica /proj /sw +RUN mkdir /pica /proj /scratch /sw diff --git a/containers/picard/Dockerfile b/containers/picard/Dockerfile index 0b02a1a7a7..760240fc6c 100644 --- a/containers/picard/Dockerfile +++ b/containers/picard/Dockerfile @@ -1,23 +1,28 @@ FROM openjdk:8-slim -LABEL author="Maxime Garcia" \ -description="Picard 2.0.1 image for use in CAW" \ -maintainer="maxime.garcia@scilifelab.se" +LABEL \ + author="Maxime Garcia" \ + description="Picard image for use in CAW" \ + maintainer="maxime.garcia@scilifelab.se" # Install libraries -RUN apt-get update && apt-get install -y --no-install-recommends \ -curl \ -&& rm -rf /var/lib/apt/lists/* +RUN \ + apt-get update && apt-get install -y --no-install-recommends \ + wget \ + && rm -rf /var/lib/apt/lists/* # Setup ENV variables -ENV PICARD_BIN="picard-tools-2.0.1.zip" \ -PICARD_HOME="/opt/picard-tools-2.0.1" \ -PICARD_VERSION="2.0.1" +ENV \ + PICARD_HOME=/opt/picard \ + PICARD_VERSION=2.0.1 -# Install PicardTools 2.0.1 -RUN curl -fsSL https://github.com/broadinstitute/picard/releases/download/$PICARD_VERSION/$PICARD_BIN -o /opt/$PICARD_BIN \ -&& unzip /opt/$PICARD_BIN -d /opt/ \ -&& rm /opt/$PICARD_BIN +# Install PicardTools +RUN \ + wget --quiet -O picard-tools-${PICARD_VERSION}.zip \ + https://github.com/broadinstitute/picard/releases/download/${PICARD_VERSION}/picard-tools-${PICARD_VERSION}.zip \ + && unzip picard-tools-${PICARD_VERSION}.zip \ + && mv picard-tools-${PICARD_VERSION} ${PICARD_HOME} \ + && rm picard-tools-${PICARD_VERSION}.zip # Create UPPMAX directories -RUN mkdir /pica /proj /sw +RUN mkdir /pica /proj /scratch /sw diff --git a/containers/qualimap/Dockerfile b/containers/qualimap/Dockerfile index ff3c9cd31b..1ed69957b9 100644 --- a/containers/qualimap/Dockerfile +++ b/containers/qualimap/Dockerfile @@ -1,18 +1,28 @@ FROM openjdk:8 -LABEL author="Maxime Garcia" \ -description="Qualimap 2.2.1 image for use in CAW" \ -maintainer="maxime.garcia@scilifelab.se" +LABEL \ + author="Maxime Garcia" \ + description="Qualimap image for use in CAW" \ + maintainer="maxime.garcia@scilifelab.se" + +# Install libraries +RUN \ + apt-get update && apt-get install -y --no-install-recommends \ + wget \ + && rm -rf /var/lib/apt/lists/* # Setup ENV variables -ENV QUALIMAP_BIN="qualimap_v2.2.1.zip" \ -QUALIMAP_VERSION="v2.2.1" \ -PATH="$PATH:/opt/qualimap" +ENV \ + PATH=$PATH:/opt/qualimap \ + QUALIMAP_VERSION=2.2.1 # Install BamQC -RUN curl -fsSL https://bitbucket.org/kokonech/qualimap/downloads/$QUALIMAP_BIN -o /opt/$QUALIMAP_BIN \ -&& unzip /opt/$QUALIMAP_BIN -d /opt/ \ -&& mv /opt/qualimap_$QUALIMAP_VERSION /opt/qualimap +RUN \ + wget --quiet -O qualimap_v${QUALIMAP_VERSION}.zip \ + https://bitbucket.org/kokonech/qualimap/downloads/qualimap_v${QUALIMAP_VERSION}.zip \ + && unzip qualimap_v${QUALIMAP_VERSION}.zip -d /opt/ \ + && rm qualimap_v${QUALIMAP_VERSION}.zip \ + && mv /opt/qualimap_v${QUALIMAP_VERSION} /opt/qualimap # Create UPPMAX directories -RUN mkdir /pica /proj /sw +RUN mkdir /pica /proj /scratch /sw diff --git a/containers/runascat/Dockerfile b/containers/r-base/Dockerfile similarity index 90% rename from containers/runascat/Dockerfile rename to containers/r-base/Dockerfile index 4416a7c259..7f67d17247 100644 --- a/containers/runascat/Dockerfile +++ b/containers/r-base/Dockerfile @@ -9,4 +9,4 @@ RUN echo "r <- getOption('repos'); r['CRAN'] <- 'http://cran.us.r-project.org'; && Rscript -e "install.packages('RColorBrewer')" # Create UPPMAX directories -RUN mkdir /pica /proj /sw +RUN mkdir /pica /proj /scratch /sw diff --git a/containers/runallelecount/Dockerfile b/containers/runallelecount/Dockerfile index 0eacec8b8c..e9d45a9506 100644 --- a/containers/runallelecount/Dockerfile +++ b/containers/runallelecount/Dockerfile @@ -25,8 +25,12 @@ RUN \ # Install alleleCount RUN \ - wget --quiet -O /opt/v${ALLELECOUNT_VERSION}.tar.gz https://github.com/cancerit/alleleCount/archive/v${ALLELECOUNT_VERSION}.tar.gz \ + wget --quiet -O /opt/v${ALLELECOUNT_VERSION}.tar.gz \ + https://github.com/cancerit/alleleCount/archive/v${ALLELECOUNT_VERSION}.tar.gz \ && tar xvzf /opt/v${ALLELECOUNT_VERSION}.tar.gz -C /opt/ \ && cd /opt/alleleCount-${ALLELECOUNT_VERSION} \ && ./setup.sh /opt/ \ && rm /opt/v${ALLELECOUNT_VERSION}.tar.gz + +# Create UPPMAX directories +RUN mkdir /pica /proj /scratch /sw diff --git a/containers/runconvertallelecounts/Dockerfile b/containers/runconvertallelecounts/Dockerfile deleted file mode 100644 index 4116c60ee5..0000000000 --- a/containers/runconvertallelecounts/Dockerfile +++ /dev/null @@ -1,8 +0,0 @@ -FROM r-base:3.3.2 - -LABEL author="Maxime Garcia" \ -description="R 3.3.2 image for use in CAW" \ -maintainer="maxime.garcia@scilifelab.se" - -# Create UPPMAX directories -RUN mkdir /pica /proj /sw diff --git a/containers/snpeff/Dockerfile b/containers/snpeff/Dockerfile index 4ea261c864..3ab0c6d197 100644 --- a/containers/snpeff/Dockerfile +++ b/containers/snpeff/Dockerfile @@ -1,32 +1,32 @@ FROM openjdk:8-slim -LABEL author="Maxime Garcia" \ -description="snpEff 4.3m image for use in CAW" \ -maintainer="maxime.garcia@scilifelab.se" +LABEL \ + author="Maxime Garcia" \ + description="snpEff image for use in CAW" \ + maintainer="maxime.garcia@scilifelab.se" # Install libraries -RUN apt-get update && apt-get install -y --no-install-recommends \ -curl \ -&& rm -rf /var/lib/apt/lists/* - -# Install libraries -RUN apt-get update && apt-get install -y --no-install-recommends \ -build-essential \ -ca-certificates \ -libncurses5-dev \ -libncursesw5-dev \ -wget \ -zlib1g-dev \ -&& rm -rf /var/lib/apt/lists/* +RUN \ + apt-get update && apt-get install -y --no-install-recommends \ + build-essential \ + ca-certificates \ + libncurses5-dev \ + libncursesw5-dev \ + wget \ + zlib1g-dev \ + && rm -rf /var/lib/apt/lists/* # Setup ENV variables -ENV SNPEFF_BIN="snpEff_v4_3m_core.zip" \ -SNPEFF_HOME="/opt/snpEff" +ENV \ + SNPEFF_BIN="snpEff_v4_3r_core.zip" \ + SNPEFF_HOME="/opt/snpEff" # Install snpEff -RUN wget http://downloads.sourceforge.net/project/snpeff/$SNPEFF_BIN -O /opt/$SNPEFF_BIN \ -&& unzip /opt/$SNPEFF_BIN -d /opt/ \ -&& rm /opt/$SNPEFF_BIN +RUN \ + wget --quiet -O $SNPEFF_BIN \ + http://downloads.sourceforge.net/project/snpeff/$SNPEFF_BIN \ + && unzip $SNPEFF_BIN -d /opt/ \ + && rm $SNPEFF_BIN # Create UPPMAX directories -RUN mkdir /pica /proj /sw +RUN mkdir /pica /proj /scratch /sw diff --git a/containers/snpeffgrch37/Dockerfile b/containers/snpeffgrch37/Dockerfile index 40ec174e6f..3be6716077 100644 --- a/containers/snpeffgrch37/Dockerfile +++ b/containers/snpeffgrch37/Dockerfile @@ -1,8 +1,9 @@ FROM maxulysse/snpeff:1.2 -LABEL author="Maxime Garcia" \ -description="snpEff 4.3m image with GRCH37.75 genome for use in CAW" \ -maintainer="maxime.garcia@scilifelab.se" +LABEL \ + author="Maxime Garcia" \ + description="snpEff image with GRCH37.75 genome for use in CAW" \ + maintainer="maxime.garcia@scilifelab.se" # Setup ENV variables ENV GENOME="GRCh37.75" diff --git a/containers/snpeffgrch38/Dockerfile b/containers/snpeffgrch38/Dockerfile index 5e1888f3cc..3b74b86f8f 100644 --- a/containers/snpeffgrch38/Dockerfile +++ b/containers/snpeffgrch38/Dockerfile @@ -1,8 +1,9 @@ FROM maxulysse/snpeff:1.2 -LABEL author="Maxime Garcia" \ -description="snpEff 4.3m image with GRCh38.86 genome for use in CAW" \ -maintainer="maxime.garcia@scilifelab.se" +LABEL \ + author="Maxime Garcia" \ + description="snpEff image with GRCh38.86 genome for use in CAW" \ + maintainer="maxime.garcia@scilifelab.se" # Setup ENV variables ENV GENOME="GRCh38.86" diff --git a/containers/vep/Dockerfile b/containers/vep/Dockerfile deleted file mode 100644 index f28c06e5e4..0000000000 --- a/containers/vep/Dockerfile +++ /dev/null @@ -1,59 +0,0 @@ -FROM ubuntu:16.04 - -LABEL author="Maxime Garcia" \ -description="VEP 90.1 image for use in CAW" \ -maintainer="maxime.garcia@scilifelab.se" - -# Install libraries -RUN apt-get update && apt-get install -y --no-install-recommends \ -apache2 \ -build-essential \ -ca-certificates \ -cpanminus \ -curl \ -git \ -libmysqlclient-dev \ -libpng12-dev \ -libssl-dev \ -manpages \ -mysql-client \ -openssl \ -perl \ -perl-base \ -unzip \ -vim \ -wget \ -&& rm -rf /var/lib/apt/lists/* \ -&& cpanm DBI DBD::mysql - -# Set up ENV variables -ENV CFLAGS="-fPIC" \ -DEPS="/home/vep/src" \ -HOME="/home/vep" \ -HTSLIB_DIR="/home/vep/src/htslib" \ -KENT_SRC="/home/vep/src/kent-335_base/src" \ -MACHTYPE="x86_64" \ -PATH="/home/vep/src/ensembl-vep:$PATH" \ -PERL5LIB="$PERL5LIB:/home/vep/src/bioperl-live-release-1-6-924:/home/vep/src/ensembl/modules/:/home/vep/src/ensembl-vep/modules/:/home/vep/src/ensembl-variation/modules/:/home/vep/src/ensembl-funcgen/modules/:/home/vep/src/ensembl-io/modules/" - -# Preparing install -RUN mkdir -p $DEPS \ -&& cd $DEPS \ -&& git clone https://github.com/Ensembl/ensembl-funcgen ensembl-funcgen \ -&& git clone https://github.com/Ensembl/ensembl-io ensembl-io \ -&& git clone https://github.com/Ensembl/ensembl-variation ensembl-variation \ -&& git clone https://github.com/Ensembl/ensembl-vep ensembl-vep \ -&& git clone https://github.com/Ensembl/ensembl ensembl \ -&& $DEPS/ensembl-vep/travisci/get_dependencies.sh \ -&& $DEPS/ensembl-vep/travisci/build_c.sh \ -&& cd $HTSLIB_DIR \ -&& make install \ -&& cpanm --installdeps --with-recommends --notest --cpanfile $DEPS/ensembl/cpanfile . \ -&& cpanm --installdeps --with-recommends --notest --cpanfile $DEPS/ensembl-vep/cpanfile . - -# Installing VEP -RUN chmod u+x $DEPS/ensembl-vep/*.pl -RUN $DEPS/ensembl-vep/INSTALL.pl -a a -l - -# Create UPPMAX directories -RUN mkdir /pica /proj /sw diff --git a/containers/vepgrch37/Dockerfile b/containers/vepgrch37/Dockerfile index 4de8f9acdb..906fb8e21c 100644 --- a/containers/vepgrch37/Dockerfile +++ b/containers/vepgrch37/Dockerfile @@ -1,15 +1,25 @@ -FROM maxulysse/vep:1.2 +FROM willmclaren/ensembl-vep:release_90.5 -LABEL author="Maxime Garcia" \ -description="VEP 90.1 image with GRCh37 genome for use in CAW" \ -maintainer="maxime.garcia@scilifelab.se" +LABEL \ + author="Maxime Garcia" \ + description="VEP image with GRCh37 genome for use in CAW" \ + maintainer="maxime.garcia@scilifelab.se" # Setup ENV variables -ENV GENOME="GRCh37" +ENV \ + GENOME=GRCh37 \ + VEP_VERSION=90 # Download Genome -RUN mkdir -p $HOME/.vep \ -&& cd $HOME/.vep \ -&& curl -O ftp://ftp.ensembl.org/pub/release-90/variation/VEP/homo_sapiens_vep_90_$GENOME.tar.gz \ -&& tar xzf homo_sapiens_vep_90_$GENOME.tar.gz \ -&& rm homo_sapiens_vep_90_$GENOME.tar.gz +RUN \ + mkdir -p $HOME/.vep \ + && cd $HOME/.vep \ + && wget --quiet -O homo_sapiens_vep_${VEP_VERSION}_${GENOME}.tar.gz \ + ftp://ftp.ensembl.org/pub/release-${VEP_VERSION}/variation/VEP/homo_sapiens_vep_${VEP_VERSION}_${GENOME}.tar.gz \ + && tar xzf homo_sapiens_vep_${VEP_VERSION}_${GENOME}.tar.gz \ + && rm homo_sapiens_vep_${VEP_VERSION}_${GENOME}.tar.gz + +# Create UPPMAX directories +USER root +RUN mkdir /pica /proj /scratch /sw +USER vep diff --git a/containers/vepgrch38/Dockerfile b/containers/vepgrch38/Dockerfile index 51c73fa509..238e17d4eb 100644 --- a/containers/vepgrch38/Dockerfile +++ b/containers/vepgrch38/Dockerfile @@ -1,15 +1,25 @@ -FROM maxulysse/vep:1.2 +FROM willmclaren/ensembl-vep:release_90.5 -LABEL author="Maxime Garcia" \ -description="VEP 90.1 image with GRCh38 genome for use in CAW" \ -maintainer="maxime.garcia@scilifelab.se" +LABEL \ + author="Maxime Garcia" \ + description="VEP image with GRCh38 genome for use in CAW" \ + maintainer="maxime.garcia@scilifelab.se" # Setup ENV variables -ENV GENOME="GRCh38" +ENV \ + GENOME=GRCh38 \ + VEP_VERSION=90 # Download Genome -RUN mkdir -p $HOME/.vep \ -&& cd $HOME/.vep \ -&& curl -O ftp://ftp.ensembl.org/pub/release-90/variation/VEP/homo_sapiens_vep_90_$GENOME.tar.gz \ -&& tar xzf homo_sapiens_vep_90_$GENOME.tar.gz \ -&& rm homo_sapiens_vep_90_$GENOME.tar.gz +RUN \ + mkdir -p $HOME/.vep \ + && cd $HOME/.vep \ + && wget --quiet -O homo_sapiens_vep_${VEP_VERSION}_${GENOME}.tar.gz \ + ftp://ftp.ensembl.org/pub/release-${VEP_VERSION}/variation/VEP/homo_sapiens_vep_${VEP_VERSION}_${GENOME}.tar.gz \ + && tar xzf homo_sapiens_vep_${VEP_VERSION}_${GENOME}.tar.gz \ + && rm homo_sapiens_vep_${VEP_VERSION}_${GENOME}.tar.gz + +# Create UPPMAX directories +USER root +RUN mkdir /pica /proj /scratch /sw +USER vep diff --git a/doc/CONTAINERS.md b/doc/CONTAINERS.md index de3e2ee8ee..5c58c6196e 100644 --- a/doc/CONTAINERS.md +++ b/doc/CONTAINERS.md @@ -83,21 +83,16 @@ A container named after the process is made for each process. If a container can - Contain **[snpEff][snpeff-link]** 4.3i - Contain GRCh38.86 -## vep [![vep-docker status][vep-docker-badge]][vep-docker-link] - -- Based on `ubuntu:16.04` -- Contain **[VEP][vep-link]** 90.1 - ## vepgrch37 [![vepgrch37-docker status][vepgrch37-docker-badge]][vepgrch37-docker-link] -- Based on `maxulysse/vep` -- Contain **[VEP][vep-link]** 90.1 +- Based on `willmclaren/ensembl-vep:release_90.5` +- Contain **[VEP][vep-link]** 90.5 - Contain GRCh37 ## vepgrch38 [![vepgrch38-docker status][vepgrch38-docker-badge]][vepgrch38-docker-link] -- Based on `maxulysse/vep` -- Contain **[VEP][vep-link]** 90.1 +- Based on `willmclaren/ensembl-vep:release_90.5` +- Contain **[VEP][vep-link]** 90.5 - Contain GRCh38 --- diff --git a/main.nf b/main.nf index d03520cbad..4b35746201 100644 --- a/main.nf +++ b/main.nf @@ -63,9 +63,23 @@ kate: syntax groovy; space-indent on; indent-width 2; ================================================================================ */ -version = '1.2' +version = '1.2.1' + +// Check that Nextflow version is up to date enough +// try / throw / catch works for NF versions < 0.25 when this was implemented +nf_required_version = '0.25.0' +try { + if( ! nextflow.version.matches(">= $nf_required_version") ){ + throw GroovyException('Nextflow version too old') + } +} catch (all) { + log.error "====================================================\n" + + " Nextflow version $nf_required_version required! You are running v$workflow.nextflow.version.\n" + + " Pipeline execution will continue, but things may break.\n" + + " Please update Nextflow.\n" + + "============================================================" +} -if (!nextflow.version.matches('>= 0.25.0')) exit 1, "Nextflow version 0.25.0 or greater is needed to run this workflow" if (params.help) exit 0, helpMessage() if (params.version) exit 0, versionMessage() if (!isAllowedParams(params)) exit 1, "params is unknown, see --help for more information" diff --git a/nextflow.config b/nextflow.config index 1c3de38773..1758f219d0 100644 --- a/nextflow.config +++ b/nextflow.config @@ -93,11 +93,3 @@ trace { // Turning on trace tracking by default enabled = true fields = 'process,task_id,hash,name,attempt,status,exit,realtime,%cpu,vmem,rss,submit,start,complete,duration,realtime,rchar,wchar' } - -// Return the minimun of time or memory requirement -def returnMin(obj, objMax) { - if(obj.compareTo(objMax)) - return objMax - else - return obj -} diff --git a/scripts/do_all.sh b/scripts/do_all.sh index c54b3658cb..82a2c5caba 100755 --- a/scripts/do_all.sh +++ b/scripts/do_all.sh @@ -4,41 +4,46 @@ set -xeuo pipefail PROFILE="singularity" PUSH="" REPOSITORY="--repository maxulysse" -TAG="1.2" +TAG="1.2.1" TOOL="docker" -while [[ $# -gt 1 ]] +while [[ $# -gt 0 ]] do key="$1" case $key in -r|--repository) REPOSITORY="--repository $2" - shift + shift # past argument + shift # past value ;; -t|--tag) TAG="--tag $2" - shift + shift # past argument + shift # past value ;; -p|--profile) PROFILE="$2" - shift + shift # past argument + shift # past value ;; --push) PUSH=--push + shift # past argument ;; --pull) TOOL=singularity + shift # past argument ;; *) # unknown option + shift # past argument ;; esac - shift done if [ $TOOL = docker ] then - nextflow run buildContainers.nf -profile ${PROFILE} --verbose --docker ${PUSH} ${REPOSITORY} ${TAG} --containers caw,fastqc,freebayes,gatk,igvtools,multiqc,mutect1,picard,qualimap,runascat,runconvertallelecounts,snpeff,vep - nextflow run buildContainers.nf -profile ${PROFILE} --verbose --docker ${PUSH} ${REPOSITORY} ${TAG} --containers runallelecount,snpeffgrch37,snpeffgrch38,vepgrch37,vepgrch38 + nextflow run buildContainers.nf -profile ${PROFILE} --verbose --docker ${PUSH} ${REPOSITORY} ${TAG} --containers caw,fastqc,freebayes,gatk,igvtools,multiqc,mutect1,picard,qualimap,r-base,runallelecount,snpeff + nextflow run buildContainers.nf -profile ${PROFILE} --verbose --docker ${PUSH} ${REPOSITORY} ${TAG} --containers snpeffgrch37,snpeffgrch38,vepgrch37,vepgrch38 else - nextflow run buildContainers.nf -profile ${PROFILE} --verbose --singularity ${REPOSITORY} ${TAG} --singularityPublishDir containers/ --containers caw,fastqc,freebayes,gatk,igvtools,multiqc,mutect1,picard,qualimap,runallelecount,runascat,runconvertallelecounts,snpeffgrch37,snpeffgrch38,vepgrch37,vepgrch38 + nextflow run buildContainers.nf -profile ${PROFILE} --verbose --singularity ${REPOSITORY} ${TAG} --singularityPublishDir containers/ --containers caw,fastqc,freebayes,gatk,igvtools,multiqc,mutect1,picard,qualimap,r-base,runallelecount,snpeffgrch37,snpeffgrch38,vepgrch37,vepgrch38 fi diff --git a/scripts/install.sh b/scripts/install.sh index bd8224f998..e7523be4e4 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -1,18 +1,19 @@ #!/bin/bash TOOL="all" -while [[ $# -gt 1 ]] +while [[ $# -gt 0 ]] do key="$1" case $key in -t|--tool) TOOL="$2" - shift + shift # past argument + shift # past value ;; *) # unknown option + shift # past argument ;; esac - shift done # Install Nextflow diff --git a/scripts/test.sh b/scripts/test.sh index f3019b2dda..44d8cb023b 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -3,9 +3,10 @@ set -xeuo pipefail GENOME="smallGRCh37" PROFILE="singularity" +SAMPLE="data/tsv/tiny.tsv" +TAG="1.2.1" TEST="ALL" TRAVIS=${TRAVIS:-false} -SAMPLE="data/tsv/tiny.tsv" while [[ $# -gt 0 ]] do @@ -13,24 +14,33 @@ do case $key in -g|--genome) GENOME="$2" - shift + shift # past argument + shift # past value ;; -p|--profile) PROFILE="$2" - shift + shift # past argument + shift # past value ;; -s|--sample) SAMPLE="$2" - shift + shift # past argument + shift # past value ;; -t|--test) TEST="$2" - shift + shift # past argument + shift # past value + ;; + --tag) + TAG="$2" + shift # past argument + shift # past value ;; *) # unknown option + shift # past argument ;; esac - shift done function nf_test() { @@ -45,21 +55,21 @@ then # Remove images only on TRAVIS if [[ "$PROFILE" == "docker" ]] && [[ "$TRAVIS" == true ]] then - docker rmi -f maxulysse/igvtools:1.2 + docker rmi -f maxulysse/igvtools:${TAG} elif [[ "$PROFILE" == singularity ]] && [[ "$TRAVIS" == true ]] then - rm -rf work/singularity/igvtools-1.2.img + rm -rf work/singularity/igvtools-${TAG}.img fi fi -if [[ "$TEST" = "MAPPING" ]] || [[ "$TEST" = "ALL" ]] +if [[ "$TEST" = "MAPPING" ]] then - nf_test . --step preprocessing --sample $SAMPLE + nf_test . --step mapping --sample $SAMPLE fi if [[ "$TEST" = "REALIGN" ]] || [[ "$TEST" = "ALL" ]] then - nf_test . --step preprocessing --sample $SAMPLE + nf_test . --step mapping --sample $SAMPLE nf_test . --step realign --noReports nf_test . --step realign --tools HaplotypeCaller nf_test . --step realign --tools HaplotypeCaller --noReports --noGVCF @@ -67,26 +77,26 @@ fi if [[ "$TEST" = "RECALIBRATE" ]] || [[ "$TEST" = "ALL" ]] then - nf_test . --step preprocessing --sample $SAMPLE + nf_test . --step mapping --sample $SAMPLE nf_test . --step recalibrate --noReports nf_test . --step recalibrate --tools FreeBayes,HaplotypeCaller,MuTect1,MuTect2,Strelka # Test whether restarting from an already recalibrated BAM works - nf_test . --step skipPreprocessing --tools Strelka --noReports + nf_test . --step variantCalling --tools Strelka --noReports fi if [[ "$TEST" = "ANNOTATEVEP" ]] || [[ "$TEST" = "ALL" ]] then - nf_test . --step preprocessing --sample data/tsv/tiny-single-manta.tsv --tools Manta,Strelka - nf_test . --step preprocessing --sample data/tsv/tiny-manta.tsv --tools Manta,Strelka - nf_test . --step preprocessing --sample $SAMPLE --tools MuTect2 + nf_test . --step mapping --sample data/tsv/tiny-single-manta.tsv --tools Manta,Strelka + nf_test . --step mapping --sample data/tsv/tiny-manta.tsv --tools Manta,Strelka + nf_test . --step mapping --sample $SAMPLE --tools MuTect2 # Remove images only on TRAVIS if [[ "$PROFILE" == "docker" ]] && [[ "$TRAVIS" == true ]] then - docker rmi -f maxulysse/fastqc:1.2 maxulysse/gatk:1.2 maxulysse/picard:1.2 maxulysse/caw:1.2 + docker rmi -f maxulysse/caw:${TAG} maxulysse/fastqc:${TAG} maxulysse/gatk:${TAG} maxulysse/picard:${TAG} elif [[ "$PROFILE" == "singularity" ]] && [[ "$TRAVIS" == true ]] then - rm -rf work/singularity/fastqc-1.2.img work/singularity/gatk-1.2.img work/singularity/picard-1.2.img work/singularity/caw-1.2.img + rm -rf work/singularity/caw-${TAG}.img work/singularity/fastqc-${TAG}.img work/singularity/gatk-${TAG}.img work/singularity/picard-${TAG}.img fi nf_test . --step annotate --tools VEP --annotateTools Manta,Strelka nf_test . --step annotate --tools VEP --annotateVCF VariantCalling/Manta/Manta_9876T_vs_1234N.diploidSV.vcf.gz,VariantCalling/Manta/Manta_9876T_vs_1234N.somaticSV.vcf.gz --noReports @@ -95,17 +105,17 @@ fi if [[ "$TEST" = "ANNOTATESNPEFF" ]] || [[ "$TEST" = "ALL" ]] then - nf_test . --step preprocessing --sample data/tsv/tiny-single-manta.tsv --tools Manta,Strelka - nf_test . --step preprocessing --sample data/tsv/tiny-manta.tsv --tools Manta,Strelka - nf_test . --step preprocessing --sample $SAMPLE --tools MuTect2 + nf_test . --step mapping --sample data/tsv/tiny-single-manta.tsv --tools Manta,Strelka + nf_test . --step mapping --sample data/tsv/tiny-manta.tsv --tools Manta,Strelka + nf_test . --step mapping --sample $SAMPLE --tools MuTect2 # Remove images only on TRAVIS if [[ "$PROFILE" == "docker" ]] && [[ "$TRAVIS" == true ]] then - docker rmi -f maxulysse/fastqc:1.2 maxulysse/gatk:1.2 maxulysse/picard:1.2 maxulysse/caw:1.2 + docker rmi -f maxulysse/caw:${TAG} maxulysse/fastqc:${TAG} maxulysse/gatk:${TAG} maxulysse/picard:${TAG} elif [[ "$PROFILE" == "singularity" ]] && [[ "$TRAVIS" == true ]] then - rm -rf work/singularity/fastqc-1.2.img work/singularity/gatk-1.2.img work/singularity/picard-1.2.img work/singularity/caw-1.2.img + rm -rf work/singularity/caw-${TAG}.img work/singularity/fastqc-${TAG}.img work/singularity/gatk-${TAG}.img work/singularity/picard-${TAG}.img fi nf_test . --step annotate --tools snpEff --annotateTools Manta,Strelka nf_test . --step annotate --tools snpEff --annotateVCF VariantCalling/Manta/Manta_9876T_vs_1234N.diploidSV.vcf.gz,VariantCalling/Manta/Manta_9876T_vs_1234N.somaticSV.vcf.gz --noReports @@ -114,5 +124,5 @@ fi if [[ "$TEST" = "BUILDCONTAINERS" ]] || [[ "$TEST" = "ALL" ]] then - nf_test buildContainers.nf --docker --containers caw,fastqc,gatk,igvtools,multiqc,mutect1,picard,qualimap,runallelecount,runascat,runconvertallelecounts,snpeff,vep + nf_test buildContainers.nf --docker --containers caw,fastqc,gatk,igvtools,multiqc,mutect1,picard,qualimap,runallelecount,r-base,snpeff fi