Skip to content

Commit 3814448

Browse files
committed
Merge branch 'dev' of github.com:nf-core/eager into dev
2 parents d11de6a + c0cb097 commit 3814448

2 files changed

Lines changed: 13 additions & 11 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
1010
### `Fixed`
1111

1212
- [#707](https://github.com/nf-core/eager/pull/707) - Fix typo in UnifiedGenotyper IndelRealigner command
13+
- Fixed some Java tools not following process memory specifications
14+
- Updated template to nf-core/tools 1.13.2
1315

1416
### `Dependencies`
1517

main.nf

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1226,7 +1226,7 @@ process bwamem {
12261226
// CircularMapper reference preparation and mapping for circular genomes e.g. mtDNA
12271227

12281228
process circulargenerator{
1229-
label 'sc_tiny'
1229+
label 'sc_medium'
12301230
tag "$prefix"
12311231
publishDir "${params.outdir}/reference_genome/circularmapper_index", mode: params.publish_dir_mode, saveAs: { filename ->
12321232
if (params.save_reference) filename
@@ -1248,7 +1248,7 @@ process circulargenerator{
12481248
script:
12491249
prefix = "${fasta.baseName}_${params.circularextension}.fasta"
12501250
"""
1251-
circulargenerator -e ${params.circularextension} -i $fasta -s ${params.circulartarget}
1251+
circulargenerator -Xmx${task.memory.toGiga()}g -e ${params.circularextension} -i $fasta -s ${params.circulartarget}
12521252
bwa index $prefix
12531253
"""
12541254

@@ -1281,15 +1281,15 @@ process circularmapper{
12811281
bwa aln -t ${task.cpus} $elongated_root $r1 -n ${params.bwaalnn} -l ${params.bwaalnl} -k ${params.bwaalnk} -f ${libraryid}.r1.sai
12821282
bwa aln -t ${task.cpus} $elongated_root $r2 -n ${params.bwaalnn} -l ${params.bwaalnl} -k ${params.bwaalnk} -f ${libraryid}.r2.sai
12831283
bwa sampe -r "@RG\\tID:ILLUMINA-${libraryid}\\tSM:${libraryid}\\tPL:illumina\\tPU:ILLUMINA-${libraryid}-${seqtype}" $elongated_root ${libraryid}.r1.sai ${libraryid}.r2.sai $r1 $r2 > tmp.out
1284-
realignsamfile -e ${params.circularextension} -i tmp.out -r $fasta $filter
1284+
realignsamfile -Xmx${task.memory.toGiga()}g -e ${params.circularextension} -i tmp.out -r $fasta $filter
12851285
samtools sort -@ ${task.cpus} -O bam tmp_realigned.bam > ${libraryid}_"${seqtype}".mapped.bam
12861286
samtools index "${libraryid}"_"${seqtype}".mapped.bam ${size}
12871287
"""
12881288
} else {
12891289
"""
12901290
bwa aln -t ${task.cpus} $elongated_root $r1 -n ${params.bwaalnn} -l ${params.bwaalnl} -k ${params.bwaalnk} -f ${libraryid}.sai
12911291
bwa samse -r "@RG\\tID:ILLUMINA-${libraryid}\\tSM:${libraryid}\\tPL:illumina\\tPU:ILLUMINA-${libraryid}-${seqtype}" $elongated_root ${libraryid}.sai $r1 > tmp.out
1292-
realignsamfile -e ${params.circularextension} -i tmp.out -r $fasta $filter
1292+
realignsamfile -Xmx${task.memory.toGiga()}g -e ${params.circularextension} -i tmp.out -r $fasta $filter
12931293
samtools sort -@ ${task.cpus} -O bam tmp_realigned.bam > "${libraryid}"_"${seqtype}".mapped.bam
12941294
samtools index "${libraryid}"_"${seqtype}".mapped.bam ${size}
12951295
"""
@@ -1495,7 +1495,7 @@ ch_branched_for_seqtypemerge = ch_mapping_for_seqtype_merging
14951495
"""
14961496
samtools merge ${libraryid}_seqtypemerged.bam ${bam}
14971497
## Have to set validation as lenient because of BWA issue: "I see a read stands out the end of a chromosome and is flagged as unmapped (flag 0x4). [...]" http://bio-bwa.sourceforge.net/
1498-
picard AddOrReplaceReadGroups I=${libraryid}_seqtypemerged.bam O=${libraryid}_seqtypemerged_rg.bam RGID=1 RGLB="${libraryid}_seqtypemerged" RGPL=illumina RGPU=4410 RGSM="${libraryid}_seqtypemerged" VALIDATION_STRINGENCY=LENIENT
1498+
picard -Xmx${task.memory.toGiga()}g AddOrReplaceReadGroups I=${libraryid}_seqtypemerged.bam O=${libraryid}_seqtypemerged_rg.bam RGID=1 RGLB="${libraryid}_seqtypemerged" RGPL=illumina RGPU=4410 RGSM="${libraryid}_seqtypemerged" VALIDATION_STRINGENCY=LENIENT
14991499
samtools index ${libraryid}_seqtypemerged_rg.bam ${size}
15001500
"""
15011501

@@ -1866,7 +1866,7 @@ process library_merge {
18661866
"""
18671867
samtools merge ${samplename}_libmerged_rmdup.bam ${bam}
18681868
## Have to set validation as lenient because of BWA issue: "I see a read stands out the end of a chromosome and is flagged as unmapped (flag 0x4). [...]" http://bio-bwa.sourceforge.net/
1869-
picard AddOrReplaceReadGroups I=${samplename}_libmerged_rmdup.bam O=${samplename}_libmerged_rg_rmdup.bam RGID=1 RGLB="${samplename}_merged" RGPL=illumina RGPU=4410 RGSM="${samplename}_merged" VALIDATION_STRINGENCY=LENIENT
1869+
picard -Xmx${task.memory.toGiga()}g AddOrReplaceReadGroups I=${samplename}_libmerged_rmdup.bam O=${samplename}_libmerged_rg_rmdup.bam RGID=1 RGLB="${samplename}_merged" RGPL=illumina RGPU=4410 RGSM="${samplename}_merged" VALIDATION_STRINGENCY=LENIENT
18701870
samtools index ${samplename}_libmerged_rg_rmdup.bam ${size}
18711871
"""
18721872
}
@@ -2147,7 +2147,7 @@ process additional_library_merge {
21472147
def size = params.large_ref ? '-c' : ''
21482148
"""
21492149
samtools merge ${samplename}_libmerged_add.bam ${bam}
2150-
picard AddOrReplaceReadGroups I=${samplename}_libmerged_add.bam O=${samplename}_libmerged_rg_add.bam RGID=1 RGLB="${samplename}_additionalmerged" RGPL=illumina RGPU=4410 RGSM="${samplename}_additionalmerged" VALIDATION_STRINGENCY=LENIENT
2150+
picard -Xmx${task.memory.toGiga()}g AddOrReplaceReadGroups I=${samplename}_libmerged_add.bam O=${samplename}_libmerged_rg_add.bam RGID=1 RGLB="${samplename}_additionalmerged" RGPL=illumina RGPU=4410 RGSM="${samplename}_additionalmerged" VALIDATION_STRINGENCY=LENIENT
21512151
samtools index ${samplename}_libmerged_rg_add.bam ${size}
21522152
"""
21532153
}
@@ -2485,7 +2485,7 @@ process vcf2genome {
24852485
def fasta_head = "${params.vcf2genome_header}" == '' ? "${samplename}" : "${params.vcf2genome_header}"
24862486
"""
24872487
pigz -f -d -p ${task.cpus} *.vcf.gz
2488-
vcf2genome -draft ${out}.fasta -draftname "${fasta_head}" -in ${vcf.baseName} -minc ${params.vcf2genome_minc} -minfreq ${params.vcf2genome_minfreq} -minq ${params.vcf2genome_minq} -ref ${fasta} -refMod ${out}_refmod.fasta -uncertain ${out}_uncertainy.fasta
2488+
vcf2genome -Xmx${task.memory.toGiga()}g -draft ${out}.fasta -draftname "${fasta_head}" -in ${vcf.baseName} -minc ${params.vcf2genome_minc} -minfreq ${params.vcf2genome_minfreq} -minq ${params.vcf2genome_minq} -ref ${fasta} -refMod ${out}_refmod.fasta -uncertain ${out}_uncertainy.fasta
24892489
pigz -p ${task.cpus} *.fasta
24902490
pigz -p ${task.cpus} *.vcf
24912491
"""
@@ -2528,7 +2528,7 @@ process multivcfanalyzer {
25282528
def write_freqs = params.write_allele_frequencies ? "T" : "F"
25292529
"""
25302530
gunzip -f *.vcf.gz
2531-
multivcfanalyzer ${params.snp_eff_results} ${fasta} ${params.reference_gff_annotations} . ${write_freqs} ${params.min_genotype_quality} ${params.min_base_coverage} ${params.min_allele_freq_hom} ${params.min_allele_freq_het} ${params.reference_gff_exclude} *.vcf
2531+
multivcfanalyzer -Xmx${task.memory.toGiga()}g ${params.snp_eff_results} ${fasta} ${params.reference_gff_annotations} . ${write_freqs} ${params.min_genotype_quality} ${params.min_base_coverage} ${params.min_allele_freq_hom} ${params.min_allele_freq_het} ${params.reference_gff_exclude} *.vcf
25322532
pigz -p ${task.cpus} *.tsv *.txt snpAlignment.fasta snpAlignmentIncludingRefGenome.fasta fullAlignment.fasta
25332533
"""
25342534
}
@@ -2555,7 +2555,7 @@ process multivcfanalyzer {
25552555

25562556
script:
25572557
"""
2558-
mtnucratio ${bam} "${params.mtnucratio_header}"
2558+
mtnucratio -Xmx${task.memory.toGiga()}g ${bam} "${params.mtnucratio_header}"
25592559
"""
25602560
}
25612561

@@ -3339,4 +3339,4 @@ def checkHostname() {
33393339
}
33403340
}
33413341
}
3342-
}
3342+
}

0 commit comments

Comments
 (0)