Skip to content
This repository was archived by the owner on Jan 27, 2020. It is now read-only.

Commit 88921e6

Browse files
authored
Merge pull request #709 from SciLifeLab/dev
Release 2.2.2
2 parents 35e7f70 + 5efafce commit 88921e6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+3267
-383
lines changed

.travis.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,23 @@ env:
1212
- NXF_VER=0.32.0
1313
matrix:
1414
- TEST=SOMATIC
15+
- TEST=GERMLINE
1516
- TEST=ANNOTATEVEP
1617
- TEST=ANNOTATESNPEFF
17-
- TEST=GERMLINE
18+
19+
before_install:
20+
# PRs to master are only ok if coming from dev branch
21+
- '[ $TRAVIS_PULL_REQUEST = "false" ] || [ $TRAVIS_BRANCH != "master" ] || ([ $TRAVIS_PULL_REQUEST_SLUG = $TRAVIS_REPO_SLUG ] && [ $TRAVIS_PULL_REQUEST_BRANCH = "dev" ])'
22+
# Donwload containers
23+
- "travis_retry ./scripts/containers.sh --profile docker --test $TEST"
1824

1925
install:
2026
# Install Nextflow
2127
- curl -fsSL get.nextflow.io | bash
2228
- chmod +x nextflow
2329
- sudo mv nextflow /usr/local/bin/
24-
# Donwload big containers for ANNOTATEVEP and ANNOTATESNPEF tests)
25-
- "travis_retry ./scripts/containers.sh --profile docker --test $TEST"
2630

27-
# Build references when needed
31+
# Build references if needed
2832
before_script: "./scripts/test.sh --profile docker --test $TEST --build"
2933

3034
# Actual tests

CHANGELOG.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,41 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
66
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
77

8+
## [2.2.2] - 2018-12-19
9+
10+
### `Added`
11+
12+
- [#671](https://github.com/SciLifeLab/Sarek/pull/671) - New `publishDirMode` param and docs
13+
- [#673](https://github.com/SciLifeLab/Sarek/pull/673), [#675](https://github.com/SciLifeLab/Sarek/pull/675), [#676](https://github.com/SciLifeLab/Sarek/pull/676) - Profiles for BinAC and CFC clusters in Tübingen
14+
- [#679](https://github.com/SciLifeLab/Sarek/pull/679) - Add container for `CreateIntervalBeds`
15+
- [#692](https://github.com/SciLifeLab/Sarek/pull/692), [#697](https://github.com/SciLifeLab/Sarek/pull/697) - Add AWS iGenomes possibilities (within `conf/igenomes.conf`)
16+
- [#694](https://github.com/SciLifeLab/Sarek/pull/694) - Add monochrome and grey logos for light or dark background
17+
- [#698](https://github.com/SciLifeLab/Sarek/pull/698) - Add btb profile for munin server
18+
- [#702](https://github.com/SciLifeLab/Sarek/pull/702) - Add font-ttf-dejavu-sans-mono `2.37` and fontconfig `2.12.6` to container
19+
20+
### `Changed`
21+
22+
- [#678](https://github.com/SciLifeLab/Sarek/pull/678) - Changing VEP to v92 and adjusting CPUs for VEP
23+
- [#663](https://github.com/SciLifeLab/Sarek/pull/663) - Update `do_release.sh` script
24+
- [#671](https://github.com/SciLifeLab/Sarek/pull/671) - publishDir modes are now params
25+
- [#677](https://github.com/SciLifeLab/Sarek/pull/677), [#698](https://github.com/SciLifeLab/Sarek/pull/698), [#703](https://github.com/SciLifeLab/Sarek/pull/703) - Update docs
26+
- [#679](https://github.com/SciLifeLab/Sarek/pull/679) - Update old awsbatch configuration
27+
- [#682](https://github.com/SciLifeLab/Sarek/pull/682) - Specifications for memory and cpus for awsbatch
28+
- [#693](https://github.com/SciLifeLab/Sarek/pull/693) - Qualimap bamQC is now ran after mapping and after recalibration for better QC
29+
- [#700](https://github.com/SciLifeLab/Sarek/pull/700) - Update GATK to `4.0.9.0`
30+
- [#702](https://github.com/SciLifeLab/Sarek/pull/702) - Update FastQC to `0.11.8`
31+
- [#705](https://github.com/SciLifeLab/Sarek/pull/705) - Change `--TMP_DIR` by `--tmp-dir` for GATK `4.0.9.0` BaseRecalibrator
32+
- [#706](https://github.com/SciLifeLab/Sarek/pull/706) - Update TravisCI testing
33+
34+
### `Fixed`
35+
36+
- [#665](https://github.com/SciLifeLab/Sarek/pull/665) - Input bam file now has always the same name (whether it is from a single fastq pair or multiple) in the MarkDuplicates process, so metrics too
37+
- [#672](https://github.com/SciLifeLab/Sarek/pull/672) - process `PullSingularityContainers` from `buildContainers.nf` now expect a file with the correct `.simg` extension for singularity images, and no longer the `.img` one.
38+
- [#679](https://github.com/SciLifeLab/Sarek/pull/679) - Add publishDirMode for `germlineVC.nf`
39+
- [#700](https://github.com/SciLifeLab/Sarek/pull/700) - Fix [#699](https://github.com/SciLifeLab/Sarek/issues/699) missing DP in the FORMAT column VCFs for MuTect2
40+
- [#702](https://github.com/SciLifeLab/Sarek/pull/702) - Fix [#701](https://github.com/SciLifeLab/Sarek/issues/701)
41+
- [#705](https://github.com/SciLifeLab/Sarek/pull/705) - Fix [#704](https://github.com/SciLifeLab/Sarek/issues/704)
42+
843
## [2.2.1] - 2018-10-04
944

1045
### `Changed`

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ LABEL \
77

88
COPY environment.yml /
99
RUN conda env create -f /environment.yml && conda clean -a
10-
ENV PATH /opt/conda/envs/sarek-2.2.1/bin:$PATH
10+
ENV PATH /opt/conda/envs/sarek-2.2.2/bin:$PATH

Singularity

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ Bootstrap:docker
44
%labels
55
MAINTAINER Maxime Garcia <maxime.garcia@scilifelab.se>
66
DESCRIPTION Singularity image containing all requirements for the Sarek pipeline
7-
VERSION 2.1.0
7+
VERSION 2.2.2
88

99
%environment
10-
PATH=/opt/conda/envs/sarek-2.2.1/bin:$PATH
10+
PATH=/opt/conda/envs/sarek-2.2.2/bin:$PATH
1111
export PATH
1212

1313
%files

annotate.nf

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,13 @@ if (params.help) exit 0, helpMessage()
4242
if (!SarekUtils.isAllowedParams(params)) exit 1, "params unknown, see --help for more information"
4343
if (!checkUppmaxProject()) exit 1, "No UPPMAX project ID found! Use --project <UPPMAX Project ID>"
4444

45+
// Check for awsbatch profile configuration
46+
// make sure queue is defined
47+
if (workflow.profile == 'awsbatch') {
48+
if(!params.awsqueue) exit 1, "Provide the job queue for aws batch!"
49+
}
50+
51+
4552
tools = params.tools ? params.tools.split(',').collect{it.trim().toLowerCase()} : []
4653
annotateTools = params.annotateTools ? params.annotateTools.split(',').collect{it.trim().toLowerCase()} : []
4754
annotateVCF = params.annotateVCF ? params.annotateVCF.split(',').collect{it.trim()} : []
@@ -103,7 +110,7 @@ vcfForVep = vcfForVep.map {
103110
process RunBcftoolsStats {
104111
tag {vcf}
105112

106-
publishDir directoryMap.bcftoolsStats, mode: 'link'
113+
publishDir directoryMap.bcftoolsStats, mode: params.publishDirMode
107114

108115
input:
109116
set variantCaller, file(vcf) from vcfForBCFtools
@@ -124,7 +131,7 @@ if (params.verbose) bcfReport = bcfReport.view {
124131
process RunVcftools {
125132
tag {vcf}
126133

127-
publishDir directoryMap.vcftools, mode: 'link'
134+
publishDir directoryMap.vcftools, mode: params.publishDirMode
128135

129136
input:
130137
set variantCaller, file(vcf) from vcfForVCFtools
@@ -145,10 +152,10 @@ if (params.verbose) vcfReport = vcfReport.view {
145152
process RunSnpeff {
146153
tag {"${variantCaller} - ${vcf}"}
147154

148-
publishDir params.outDir, mode: 'link', saveAs: {
149-
if (it == "${vcf.simpleName}_snpEff.csv") "${directoryMap.snpeffReports}/${it}"
155+
publishDir params.outDir, mode: params.publishDirMode, saveAs: {
156+
if (it == "${vcf.simpleName}_snpEff.csv") "${directoryMap.snpeffReports.minus(params.outDir+'/')}/${it}"
150157
else if (it == "${vcf.simpleName}_snpEff.ann.vcf") null
151-
else "${directoryMap.snpeff}/${it}"
158+
else "${directoryMap.snpeff.minus(params.outDir+'/')}/${it}"
152159
}
153160

154161
input:
@@ -198,8 +205,8 @@ if('merge' in tools) {
198205
process RunVEP {
199206
tag {"${variantCaller} - ${vcf}"}
200207

201-
publishDir params.outDir, mode: 'link', saveAs: {
202-
if (it == "${vcf.simpleName}_VEP.summary.html") "${directoryMap.vep}/${it}"
208+
publishDir params.outDir, mode: params.publishDirMode, saveAs: {
209+
if (it == "${vcf.simpleName}_VEP.summary.html") "${directoryMap.vep.minus(params.outDir+'/')}/${it}"
203210
else null
204211
}
205212

@@ -215,13 +222,14 @@ process RunVEP {
215222
script:
216223
finalannotator = annotator == "snpeff" ? 'merge' : 'vep'
217224
genome = params.genome == 'smallGRCh37' ? 'GRCh37' : params.genome
225+
cache_version = params.genome == 'GRCh38' || params.genome == 'iGRCh38' ? 92 : 91
218226
"""
219227
/opt/vep/src/ensembl-vep/vep --dir /opt/vep/.vep/ \
220228
-i ${vcf} \
221229
-o ${vcf.simpleName}_VEP.ann.vcf \
222230
--assembly ${genome} \
223231
--cache \
224-
--cache_version 91 \
232+
--cache_version ${cache_version} \
225233
--database \
226234
--everything \
227235
--filter_common \
@@ -245,7 +253,7 @@ vcfToCompress = snpeffVCF.mix(vepVCF)
245253
process CompressVCF {
246254
tag {"${annotator} - ${vcf}"}
247255

248-
publishDir "${directoryMap."$finalannotator"}", mode: 'link'
256+
publishDir "${directoryMap."$finalannotator"}", mode: params.publishDirMode
249257

250258
input:
251259
set annotator, variantCaller, file(vcf) from vcfToCompress
@@ -268,14 +276,14 @@ if (params.verbose) vcfCompressedoutput = vcfCompressedoutput.view {
268276
}
269277

270278
process GetVersionSnpeff {
271-
publishDir directoryMap.version, mode: 'link'
279+
publishDir directoryMap.version, mode: params.publishDirMode
272280
output: file("v_*.txt")
273281
when: 'snpeff' in tools || 'merge' in tools
274282
script: QC.getVersionSnpEFF()
275283
}
276284

277285
process GetVersionVEP {
278-
publishDir directoryMap.version, mode: 'link'
286+
publishDir directoryMap.version, mode: params.publishDirMode
279287
output: file("v_*.txt")
280288
when: 'vep' in tools || 'merge' in tools
281289
script: QC.getVersionVEP()

buildContainers.nf

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,12 @@ if (params.help) exit 0, helpMessage()
3838
if (!SarekUtils.isAllowedParams(params)) exit 1, "params unknown, see --help for more information"
3939
if (!checkUppmaxProject()) exit 1, "No UPPMAX project ID found! Use --project <UPPMAX Project ID>"
4040

41+
// Check for awsbatch profile configuration
42+
// make sure queue is defined
43+
if (workflow.profile == 'awsbatch') {
44+
if(!params.awsqueue) exit 1, "Provide the job queue for aws batch!"
45+
}
46+
4147
// Define containers to handle (build/push or pull)
4248
containersList = defineContainersList()
4349
containers = params.containers.split(',').collect {it.trim()}
@@ -86,13 +92,13 @@ if (params.verbose) containersBuilt = containersBuilt.view {
8692
process PullSingularityContainers {
8793
tag {"${params.repository}/${container}:${params.tag}"}
8894

89-
publishDir "${params.containerPath}", mode: 'move'
95+
publishDir "${params.containerPath}", mode: params.publishDirMode
9096

9197
input:
9298
val container from singularityContainers
9399

94100
output:
95-
file("${container}-${params.tag}.img") into imagePulled
101+
file("${container}-${params.tag}.simg") into imagePulled
96102

97103
when: params.singularity
98104

buildReferences.nf

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,12 @@ if (params.help) exit 0, helpMessage()
4040
if (!SarekUtils.isAllowedParams(params)) exit 1, "params unknown, see --help for more information"
4141
if (!checkUppmaxProject()) exit 1, "No UPPMAX project ID found! Use --project <UPPMAX Project ID>"
4242

43+
// Check for awsbatch profile configuration
44+
// make sure queue is defined
45+
if (workflow.profile == 'awsbatch') {
46+
if(!params.awsqueue) exit 1, "Provide the job queue for aws batch!"
47+
}
48+
4349
ch_referencesFiles = Channel.fromPath("${params.refDir}/*")
4450

4551
/*
@@ -103,7 +109,7 @@ ch_notCompressedfiles
103109
process BuildBWAindexes {
104110
tag {f_reference}
105111

106-
publishDir params.outDir, mode: 'link'
112+
publishDir params.outDir, mode: params.publishDirMode
107113

108114
input:
109115
file(f_reference) from ch_fastaForBWA
@@ -125,7 +131,7 @@ if (params.verbose) bwaIndexes.flatten().view {
125131
process BuildReferenceIndex {
126132
tag {f_reference}
127133

128-
publishDir params.outDir, mode: 'link'
134+
publishDir params.outDir, mode: params.publishDirMode
129135

130136
input:
131137
file(f_reference) from ch_fastaReference
@@ -149,7 +155,7 @@ if (params.verbose) ch_referenceIndex.view {
149155
process BuildSAMToolsIndex {
150156
tag {f_reference}
151157

152-
publishDir params.outDir, mode: 'link'
158+
publishDir params.outDir, mode: params.publishDirMode
153159

154160
input:
155161
file(f_reference) from ch_fastaForSAMTools
@@ -170,7 +176,7 @@ if (params.verbose) ch_samtoolsIndex.view {
170176
process BuildVCFIndex {
171177
tag {f_reference}
172178

173-
publishDir params.outDir, mode: 'link'
179+
publishDir params.outDir, mode: params.publishDirMode
174180

175181
input:
176182
file(f_reference) from ch_vcfFile

conf/aws-batch.config

Lines changed: 43 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,55 @@
88
*/
99

1010
params {
11-
genome_base = params.genome == 'GRCh37' ? "s3://caw-references/grch37" : params.genome == 'GRCh38' ? "s3://caw-references/grch38" : "s3://caw-references/smallgrch37"
11+
genome_base = params.genome == 'GRCh37' ? "s3://ngi-igenomes/igenomes/Homo_sapiens/GATK/GRCh37" : params.genome == 'GRCh38' ? "s3://ngi-igenomes/igenomes/Homo_sapiens/GATK/GRCh38" : "s3://sarek-references/small"
12+
publishDirMode = 'copy'
13+
singleCPUMem = 7.GB // To make the uppmax slurm copy paste work.
14+
localReportDir = 'Reports'
1215
}
1316

14-
executor.name = 'awsbatch'
15-
executor.awscli = '/home/ec2-user/miniconda/bin/aws'
17+
executor {
18+
name = 'awsbatch'
19+
awscli = '/home/ec2-user/miniconda/bin/aws'
20+
}
21+
22+
/* Rolling files are currently not supported on s3 */
23+
report.file = "${params.localReportDir}/Sarek_report.html"
24+
timeline.file = "${params.localReportDir}/Sarek_timeline.html"
25+
dag.file = "${params.localReportDir}/Sarek_DAG.svg"
26+
trace.file = "${params.localReportDir}/Sarek_trace.txt"
1627

1728
process {
18-
executor = 'awsbatch'
19-
queue = 'caw-job-queue'
29+
queue = params.awsqueue
2030

2131
errorStrategy = {task.exitStatus == 143 ? 'retry' : 'terminate'}
2232
maxErrors = '-1'
23-
maxRetries = 2
33+
maxRetries = 4
2434
cpus = 2
25-
memory = 7.GB
35+
memory = 8.GB
36+
37+
withName:RunBcftoolsStats {
38+
cpus = 1
39+
memory = {params.singleCPUMem * 2} // Memory is doubled so that it won't run two on the same instance
40+
// Use a tiny queue for this one, so storage doesn't run out
41+
queue = params.awsqueue_tiny
42+
}
43+
withName:RunVcftools {
44+
cpus = 1
45+
memory = {params.singleCPUMem * 2} // Memory is doubled so that it won't run two on the same instance
46+
// Use a tiny queue for this one, so storage doesn't run out
47+
queue = params.awsqueue_tiny
48+
}
49+
withName:RunHaplotypecaller {
50+
cpus = 1
51+
// Increase memory quadratically
52+
memory = {params.singleCPUMem * 2} // Memory is doubled so that it won't run two on the same instance
53+
// Use a tiny queue for this one, so storage doesn't run out
54+
queue = params.awsqueue_tiny
55+
}
56+
withName:RunGenotypeGVCFs {
57+
cpus = 1
58+
memory = {params.singleCPUMem * 2} // Memory is doubled so that it won't run two on the same instance
59+
// Use a tiny queue for this one, so storage doesn't run out
60+
queue = params.awsqueue_tiny
61+
}
2662
}

0 commit comments

Comments
 (0)