Skip to content

Commit 23326a4

Browse files
committed
Merge branch 'patch-2.5.1' of github.com:nf-core/eager into patch-2.5.1
2 parents 9e8703a + b09075a commit 23326a4

5 files changed

+32
-7
lines changed

CHANGELOG.md

+15
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,21 @@
33
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
44
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
55

6+
## [2.5.1] - YYYY-MM-DD
7+
8+
### `Added`
9+
10+
- [#1037](https://github.com/nf-core/eager/issues/1037) Added an option to deactivate the `-sorted` option of bedtools coverage, in case the feature file is not sorted the same way as the fasta file.
11+
12+
### `Fixed`
13+
14+
- [#1048](https://github.com/nf-core/eager/issues/1048) `--vcf2genome_outfile` parameter now gets prefixed by the sample_name and suffixed with `.fasta` (i.e. `<sample_name>_<vcf2genome_outfile>.fasta`). This ensures we avoid overwriting the output fasta of one sample with that of another when the option is provided. (♥ Thanks to @MeriamOs for reporting.)
15+
- [#1047](https://github.com/nf-core/eager/issues/1047) Changed the row some statistics were reported in the General Stats table. The File name collision fixed in 2.5.0 (see #1017) caused these statistics to be reported in the wrong row due to an added suffix.
16+
17+
### `Dependencies`
18+
19+
### `Deprecated`
20+
621
## [2.5.0] - Bopfingen - 2023-11-03
722

823
### `Added`

assets/multiqc_config.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ extra_fn_clean_exts:
5959
- ".trimmed_stats"
6060
- "_libmerged"
6161
- "_bt2"
62+
- type: "regex"
63+
pattern: "_udg(half|none|full)"
6264

6365
top_modules:
6466
- "fastqc":

main.nf

+4-3
Original file line numberDiff line numberDiff line change
@@ -2063,13 +2063,14 @@ process bedtools {
20632063
tuple samplename, libraryid, lane, seqtype, organism, strandedness, udg, path("*")
20642064

20652065
script:
2066+
sorting_of_anno = params.anno_file_is_unsorted ? "" : '-sorted'
20662067
"""
20672068
## Create genome file from bam header
20682069
samtools view -H ${bam} | grep '@SQ' | sed 's#@SQ\tSN:\\|LN:##g' > genome.txt
20692070
20702071
## Run bedtools
2071-
bedtools coverage -nonamecheck -g genome.txt -sorted -a ${anno_file} -b ${bam} | pigz -p ${task.cpus - 1} > "${bam.baseName}".breadth.gz
2072-
bedtools coverage -nonamecheck -g genome.txt -sorted -a ${anno_file} -b ${bam} -mean | pigz -p ${task.cpus - 1} > "${bam.baseName}".depth.gz
2072+
bedtools coverage -nonamecheck -g genome.txt ${sorting_of_anno} -a ${anno_file} -b ${bam} | pigz -p ${task.cpus - 1} > "${bam.baseName}".breadth.gz
2073+
bedtools coverage -nonamecheck -g genome.txt ${sorting_of_anno} -a ${anno_file} -b ${bam} -mean | pigz -p ${task.cpus - 1} > "${bam.baseName}".depth.gz
20732074
"""
20742075
}
20752076

@@ -2741,7 +2742,7 @@ process vcf2genome {
27412742
tuple samplename, libraryid, lane, seqtype, organism, strandedness, udg, path("*.fasta.gz")
27422743

27432744
script:
2744-
def out = !params.vcf2genome_outfile ? "${samplename}.fasta" : "${params.vcf2genome_outfile}"
2745+
def out = !params.vcf2genome_outfile ? "${samplename}.fasta" : "${samplename}_${params.vcf2genome_outfile}.fasta"
27452746
def fasta_head = !params.vcf2genome_header ? "${samplename}" : "${params.vcf2genome_header}"
27462747
"""
27472748
pigz -d -f -p ${task.cpus} ${vcf}

nextflow.config

+2-1
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,9 @@ params {
143143
rescale_seqlength = 12
144144

145145
//Bedtools settings
146-
run_bedtools_coverage = false
146+
run_bedtools_coverage = false
147147
anno_file = null
148+
anno_file_is_unsorted = false
148149

149150
//bamUtils trimbam settings
150151
run_trim_bam = false

nextflow_schema.json

+9-3
Original file line numberDiff line numberDiff line change
@@ -981,6 +981,12 @@
981981
"description": "Path to GFF or BED file containing positions of features in reference file (--fasta). Path should be enclosed in quotes.",
982982
"fa_icon": "fas fa-file-signature",
983983
"help_text": "Specify the path to a GFF/BED containing the feature coordinates (or any acceptable input for [`bedtools coverage`](https://bedtools.readthedocs.io/en/latest/content/tools/coverage.html)). Must be in quotes.\n"
984+
},
985+
"anno_file_is_unsorted": {
986+
"type": "boolean",
987+
"fa_icon": "fas fa-random",
988+
"description": "Specify if the annotation file is not sorted in the same way as the reference fasta file.",
989+
"help_text": "In cases where the annotation file is NOT sorted the same way as the reference fasta, this option should be specified. This will significantly increase the memory usage of bedtools!\n\n> Modifies bedtools parameter: `-sorted`"
984990
}
985991
},
986992
"fa_icon": "fas fa-scroll",
@@ -1330,9 +1336,9 @@
13301336
},
13311337
"vcf2genome_outfile": {
13321338
"type": "string",
1333-
"description": "Specify name of the output FASTA file containing the consensus sequence. Do not include `.vcf` in the file name.",
1339+
"description": "Specify the name of the output FASTA file containing the consensus sequence.",
13341340
"fa_icon": "fas fa-file-alt",
1335-
"help_text": "The name of your requested output FASTA file. Do not include `.fasta` suffix.\n"
1341+
"help_text": "The output FASTA file will be named `<sample_name>_<vcf2genome_outfile>.fasta`.\n"
13361342
},
13371343
"vcf2genome_header": {
13381344
"type": "string",
@@ -1718,7 +1724,7 @@
17181724
"maltextract_percentidentity": {
17191725
"type": "number",
17201726
"description": "Minimum percent identity alignments are required to have to be reported. Recommended to set same as MALT parameter.",
1721-
"default": 85.0,
1727+
"default": 85,
17221728
"fa_icon": "fas fa-id-card",
17231729
"help_text": "Minimum percent identity alignments are required to have to be reported. Higher values allows fewer mismatches between read and reference sequence, but therefore will provide greater confidence in the hit. Lower values allow more mismatches, which can account for damage and divergence of a related strain/species to the reference. Recommended to set same as MALT parameter or higher. Default: `85`.\n\nOnly when `--metagenomic_tool malt` is also supplied.\n\n> Modifies MaltExtract parameter: `--minPI`"
17241730
},

0 commit comments

Comments
 (0)