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

Commit e53b2ba

Browse files
authored
Merge pull request #679 from MaxUlysse/awsbatch
Awsbatch modifications
2 parents 436cf23 + 9364d2a commit e53b2ba

9 files changed

Lines changed: 40 additions & 29 deletions

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,22 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
1010
### `Added`
1111

1212
- [#671](https://github.com/SciLifeLab/Sarek/pull/671) - New `publishDirMode` param and docs
13-
- [#673](https://github.com/SciLifeLab/Sarek/pull/673) - Profiles for BinAC and CFC clusters in Tübingen
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`
1415

1516
### `Changed`
1617

1718
- [#678](https://github.com/SciLifeLab/Sarek/pull/678) - Changing VEP to v92 and adjusting CPUs for VEP
1819
- [#663](https://github.com/SciLifeLab/Sarek/pull/663) - Update `do_release.sh` script
1920
- [#671](https://github.com/SciLifeLab/Sarek/pull/671) - publishDir modes are now params
21+
- [#677](https://github.com/SciLifeLab/Sarek/pull/677) - Update docs
22+
- [#679](https://github.com/SciLifeLab/Sarek/pull/679) - Update old awsbatch configuration
2023

2124
### `Fixed`
2225

2326
- [#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
2427
- [#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.
28+
- [#679](https://github.com/SciLifeLab/Sarek/pull/679) - Add publishDirMode for `germlineVC.nf`
2529

2630
## [2.2.1] - 2018-10-04
2731

annotate.nf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ process RunVEP {
215215
script:
216216
finalannotator = annotator == "snpeff" ? 'merge' : 'vep'
217217
genome = params.genome == 'smallGRCh37' ? 'GRCh37' : params.genome
218-
cache_version = params.genome == 'GRCh38' ? 92 : 91
218+
cache_version = params.genome == 'GRCh38' || params.genome == 'iGRCh38' ? 92 : 91
219219
"""
220220
/opt/vep/src/ensembl-vep/vep --dir /opt/vep/.vep/ \
221221
-i ${vcf} \

conf/aws-batch.config

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,16 @@
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://sarek-references/Homo_sapiens/GATK/GRCh37" : params.genome == 'iGRCh38' ? "s3://sarek-references/Homo_sapiens/GATK/GRCh38" : "s3://sarek-references/small"
12+
publishDirMode = 'copy'
1213
}
1314

1415
executor.name = 'awsbatch'
1516
executor.awscli = '/home/ec2-user/miniconda/bin/aws'
1617

1718
process {
1819
executor = 'awsbatch'
19-
queue = 'caw-job-queue'
20+
queue = 'Sarek-queue'
2021

2122
errorStrategy = {task.exitStatus == 143 ? 'retry' : 'terminate'}
2223
maxErrors = '-1'

conf/containers.config

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ process {
2626
withName:ConcatVCF {
2727
container = "${params.repository}/sarek:${params.tag}"
2828
}
29+
withName:CreateIntervalBeds {
30+
container = "${params.repository}/sarek:${params.tag}"
31+
}
2932
withName:CreateRecalibrationTable {
3033
container = "${params.repository}/sarek:${params.tag}"
3134
}

conf/genomes.config

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ params {
1515
genomes {
1616
'GRCh37' {
1717
acLoci = "${params.genome_base}/1000G_phase3_20130502_SNP_maf0.3.loci"
18-
cosmic = "${params.genome_base}/GRCh37_Cosmic_v83.vcf"
19-
cosmicIndex = "${cosmic}.idx"
2018
dbsnp = "${params.genome_base}/dbsnp_138.b37.vcf"
2119
dbsnpIndex = "${dbsnp}.idx"
2220
genomeFile = "${params.genome_base}/human_g1k_v37_decoy.fasta"
@@ -30,8 +28,6 @@ params {
3028
}
3129
'GRCh38' {
3230
acLoci = "${params.genome_base}/1000G_phase3_GRCh38_maf0.3.loci"
33-
cosmic = "${params.genome_base}/COSMICv80.vcf"
34-
cosmicIndex = "${cosmic}.idx"
3531
dbsnp = "${params.genome_base}/dbsnp_146.hg38.vcf.gz"
3632
dbsnpIndex = "${dbsnp}.tbi"
3733
genomeFile = "${params.genome_base}/Homo_sapiens_assembly38.fasta"
@@ -43,13 +39,24 @@ params {
4339
knownIndelsIndex = "${params.genome_base}/{Mills_and_1000G_gold_standard.indels.hg38,beta/Homo_sapiens_assembly38.known_indels}.vcf.gz.tbi"
4440
snpeffDb = "GRCh38.86"
4541
// This a nasty-looking list of allele-frequencies files. Add/remove files to match to your sets
46-
//AF_files = "${params.genome_base}/{00-All.dbsnp_151.hg38.CAF.TOPMED.alternate.allele.freq,hapmap_3.3_grch38_pop_stratified_af.HMAF,SweGen_hg38_stratified.SWAF}.vcf"
47-
//AF_indexes = "${params.genome_base}/{00-All.dbsnp_151.hg38.CAF.TOPMED.alternate.allele.freq,hapmap_3.3_grch38_pop_stratified_af.HMAF,SweGen_hg38_stratified.SWAF}.vcf.idx"
42+
//AF_files = "${params.genome_base}/{00-All.dbsnp_151.hg38.CAF.TOPMED.alternate.allele.freq,hapmap_3.3_grch38_pop_stratified_af.HMAF,SweGen_hg38_stratified.SWAF}.vcf"
43+
//AF_indexes = "${params.genome_base}/{00-All.dbsnp_151.hg38.CAF.TOPMED.alternate.allele.freq,hapmap_3.3_grch38_pop_stratified_af.HMAF,SweGen_hg38_stratified.SWAF}.vcf.idx"
44+
}
45+
'iGRCh38' {
46+
acLoci = "${params.genome_base}/Annotation/ASCAT/1000G_phase3_GRCh38_maf0.3.loci"
47+
dbsnp = "${params.genome_base}/Annotation/GATKBundle/dbsnp_146.hg38.vcf.gz"
48+
dbsnpIndex = "${params.genome_base}/Annotation/GATKBundle/dbsnp_146.hg38.vcf.gz.tbi"
49+
genomeFile = "${params.genome_base}/Sequence/WholeGenomeFasta/Homo_sapiens_assembly38.fasta"
50+
genomeDict = "${params.genome_base}/Sequence/WholeGenomeFasta/Homo_sapiens_assembly38.dict"
51+
genomeIndex = "${params.genome_base}/Sequence/WholeGenomeFasta/Homo_sapiens_assembly38.fasta.fai"
52+
bwaIndex = "${params.genome_base}/Sequence/BWAIndex/Homo_sapiens_assembly38.fasta.64.{alt,amb,ann,bwt,pac,sa}"
53+
intervals = "${params.genome_base}/Annotation/intervals/wgs_calling_regions.hg38.bed"
54+
knownIndels = "${params.genome_base}/Annotation/GATKBundle/{Mills_and_1000G_gold_standard.indels.hg38,Homo_sapiens_assembly38.known_indels}.vcf.gz"
55+
knownIndelsIndex = "${params.genome_base}/Annotation/GATKBundle/{Mills_and_1000G_gold_standard.indels.hg38,Homo_sapiens_assembly38.known_indels}.vcf.gz.tbi"
56+
snpeffDb = "GRCh38.86"
4857
}
4958
'smallGRCh37' {
5059
acLoci = "${params.genome_base}/1000G_phase3_20130502_SNP_maf0.3.small.loci"
51-
cosmic = "${params.genome_base}/b37_cosmic_v74.noCHR.sort.4.1.small.vcf"
52-
cosmicIndex = "${cosmic}.idx"
5360
dbsnp = "${params.genome_base}/dbsnp_138.b37.small.vcf"
5461
dbsnpIndex = "${dbsnp}.idx"
5562
genomeFile = "${params.genome_base}/human_g1k_v37_decoy.small.fasta"

conf/singularity-path.config

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ process {
3131
withName:ConcatVCF {
3232
container = "${params.containerPath}/sarek-${params.tag}.simg"
3333
}
34+
withName:CreateIntervalBeds {
35+
container = "${params.containerPath}/sarek-${params.tag}.simg"
36+
}
3437
withName:CreateRecalibrationTable {
3538
container = "${params.containerPath}/sarek-${params.tag}.simg"
3639
}

germlineVC.nf

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ if (params.verbose) recalibratedBam = recalibratedBam.view {
104104
process RunSamtoolsStats {
105105
tag {idPatient + "-" + idSample}
106106

107-
publishDir directoryMap.samtoolsStats, mode: 'link'
107+
publishDir directoryMap.samtoolsStats, mode: params.publishDirMode
108108

109109
input:
110110
set idPatient, status, idSample, file(bam), file(bai) from bamForSamToolsStats
@@ -125,7 +125,7 @@ if (params.verbose) samtoolsStatsReport = samtoolsStatsReport.view {
125125
process RunBamQC {
126126
tag {idPatient + "-" + idSample}
127127

128-
publishDir directoryMap.bamQC, mode: 'link'
128+
publishDir directoryMap.bamQC, mode: params.publishDirMode
129129

130130
input:
131131
set idPatient, status, idSample, file(bam), file(bai) from bamForBamQC
@@ -356,7 +356,7 @@ if (params.verbose) vcfsToMerge = vcfsToMerge.view {
356356
process ConcatVCF {
357357
tag {variantCaller + "-" + idSampleNormal}
358358

359-
publishDir "${directoryMap."$variantCaller"}", mode: 'link'
359+
publishDir "${directoryMap."$variantCaller"}", mode: params.publishDirMode
360360

361361
input:
362362
set variantCaller, idPatient, idSampleNormal, idSampleTumor, file(vcFiles) from vcfsToMerge
@@ -394,7 +394,7 @@ if (params.verbose) vcfConcatenated = vcfConcatenated.view {
394394
process RunSingleStrelka {
395395
tag {idSample}
396396

397-
publishDir directoryMap.strelka, mode: 'link'
397+
publishDir directoryMap.strelka, mode: params.publishDirMode
398398

399399
input:
400400
set idPatient, status, idSample, file(bam), file(bai) from bamsForSingleStrelka
@@ -447,7 +447,7 @@ if (params.verbose) singleStrelkaOutput = singleStrelkaOutput.view {
447447
process RunSingleManta {
448448
tag {idSample + " - Single Diploid"}
449449

450-
publishDir directoryMap.manta, mode: 'link'
450+
publishDir directoryMap.manta, mode: params.publishDirMode
451451

452452
input:
453453
set idPatient, status, idSample, file(bam), file(bai) from bamsForSingleManta
@@ -511,7 +511,7 @@ vcfForQC = Channel.empty().mix(
511511
process RunBcftoolsStats {
512512
tag {vcf}
513513

514-
publishDir directoryMap.bcftoolsStats, mode: 'link'
514+
publishDir directoryMap.bcftoolsStats, mode: params.publishDirMode
515515

516516
input:
517517
set variantCaller, file(vcf) from vcfForBCFtools
@@ -534,7 +534,7 @@ bcfReport.close()
534534
process RunVcftools {
535535
tag {vcf}
536536

537-
publishDir directoryMap.vcftools, mode: 'link'
537+
publishDir directoryMap.vcftools, mode: params.publishDirMode
538538

539539
input:
540540
set variantCaller, file(vcf) from vcfForVCFtools

somaticVC.nf

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -279,14 +279,12 @@ process RunMutect2 {
279279

280280
input:
281281
set idPatient, idSampleNormal, file(bamNormal), file(baiNormal), idSampleTumor, file(bamTumor), file(baiTumor), file(intervalBed) from bamsFMT2
282-
set file(genomeFile), file(genomeIndex), file(genomeDict), file(dbsnp), file(dbsnpIndex), file(cosmic), file(cosmicIndex) from Channel.value([
282+
set file(genomeFile), file(genomeIndex), file(genomeDict), file(dbsnp), file(dbsnpIndex) from Channel.value([
283283
referenceMap.genomeFile,
284284
referenceMap.genomeIndex,
285285
referenceMap.genomeDict,
286286
referenceMap.dbsnp,
287-
referenceMap.dbsnpIndex,
288-
referenceMap.cosmic,
289-
referenceMap.cosmicIndex
287+
referenceMap.dbsnpIndex
290288
])
291289

292290
output:
@@ -832,9 +830,6 @@ def defineReferenceMap() {
832830
'acLoci' : checkParamReturnFile("acLoci"),
833831
'dbsnp' : checkParamReturnFile("dbsnp"),
834832
'dbsnpIndex' : checkParamReturnFile("dbsnpIndex"),
835-
// cosmic VCF with VCF4.1 header
836-
'cosmic' : checkParamReturnFile("cosmic"),
837-
'cosmicIndex' : checkParamReturnFile("cosmicIndex"),
838833
// genome reference dictionary
839834
'genomeDict' : checkParamReturnFile("genomeDict"),
840835
// FASTA genome reference
@@ -923,8 +918,6 @@ def minimalInformationMessage() {
923918
log.info " Tag : " + params.tag
924919
log.info "Reference files used:"
925920
log.info " acLoci :\n\t" + referenceMap.acLoci
926-
log.info " cosmic :\n\t" + referenceMap.cosmic
927-
log.info "\t" + referenceMap.cosmicIndex
928921
log.info " dbsnp :\n\t" + referenceMap.dbsnp
929922
log.info "\t" + referenceMap.dbsnpIndex
930923
log.info " genome :\n\t" + referenceMap.genomeFile

0 commit comments

Comments
 (0)