Skip to content

Commit 4eb0ffe

Browse files
authored
Merge pull request #1052 from nf-core/patch-2.5.1
Patch 2.5.1
2 parents a2c9f87 + 628014a commit 4eb0ffe

12 files changed

Lines changed: 76 additions & 32 deletions

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@ jobs:
3737
3838
- name: Build new docker image
3939
if: env.MATCHED_FILES
40-
run: docker build --no-cache . -t nfcore/eager:2.5.0
40+
run: docker build --no-cache . -t nfcore/eager:2.5.1
4141

4242
- name: Pull docker image
4343
if: ${{ !env.MATCHED_FILES }}
4444
run: |
4545
docker pull nfcore/eager:dev
46-
docker tag nfcore/eager:dev nfcore/eager:2.5.0
46+
docker tag nfcore/eager:dev nfcore/eager:2.5.1
4747
4848
- name: Install Nextflow
4949
env:

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,22 @@
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] - 2024-02-21
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, albeit with the caveat this will be very slow. (♥ Thanks to @IdoBar for reporting, and contributing.)
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+
- [#1051](https://github.com/nf-core/eager/issues/1051) An error is now thrown if input BAM files end in `.unmapped.bam`, as this breaks the bam filtering process and empties the bam files in the process. (♥ Thanks to @PCQuilis for reporting.)
17+
18+
### `Dependencies`
19+
20+
### `Deprecated`
21+
622
## [2.5.0] - Bopfingen - 2023-11-03
723

824
### `Added`

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ COPY environment.yml /
77
RUN conda env create --quiet -f /environment.yml && conda clean -a
88

99
# Add conda installation dir to PATH (instead of doing 'conda activate')
10-
ENV PATH /opt/conda/envs/nf-core-eager-2.5.0/bin:$PATH
10+
ENV PATH /opt/conda/envs/nf-core-eager-2.5.1/bin:$PATH
1111

1212
# Dump the details of the installed packages to a file for posterity
13-
RUN conda env export --name nf-core-eager-2.5.0 > nf-core-eager-2.5.0.yml
13+
RUN conda env export --name nf-core-eager-2.5.1 > nf-core-eager-2.5.1.yml

assets/multiqc_config.yaml

Lines changed: 2 additions & 0 deletions
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":
314 Bytes
Loading

docs/images/usage/eager2_metromap_complex.svg

Lines changed: 9 additions & 5 deletions
Loading
20.8 KB
Loading

docs/images/usage/eager2_workflow.svg

Lines changed: 19 additions & 13 deletions
Loading

environment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# You can use this file to create a conda environment for this pipeline:
22
# conda env create -f environment.yml
3-
name: nf-core-eager-2.5.0
3+
name: nf-core-eager-2.5.1
44
channels:
55
- conda-forge
66
- bioconda

main.nf

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@ if ( params.bam && !params.single_end ) {
3636
exit 1, "[nf-core/eager] error: bams can only be specified with --single_end. Please check input command."
3737
}
3838

39+
// Do not allow input bams to be suffixed with '.unmapped.bam'
40+
if (params.bam && params.input.endsWith('.unmapped.bam')) {
41+
exit 1, "[nf-core/eager] error: Input BAM file names ending in '.unmapped.bam' are not allowed. Please rename your input BAM(s)."
42+
}
43+
3944
// Validate that skip_collapse is only set to True for paired_end reads!
4045
if (!has_extension(params.input, "tsv") && params.skip_collapse && params.single_end){
4146
exit 1, "[nf-core/eager] error: --skip_collapse can only be set for paired_end samples."
@@ -379,6 +384,9 @@ ch_input_sample_check
379384
def r2 = file(it[9]).getName()
380385
def bam = file(it[10]).getName()
381386

387+
// Throw error and exit if the input bam has a name ending in '.unmapped.bam'
388+
if (bam.endsWith('.unmapped.bam')) { exit 1, "[nf-core/eager] error: Input BAM file names ending in '.unmapped.bam' are not allowed. Please rename your input BAM(s)." }
389+
382390
[r1, r2, bam]
383391

384392
}
@@ -2063,13 +2071,14 @@ process bedtools {
20632071
tuple samplename, libraryid, lane, seqtype, organism, strandedness, udg, path("*")
20642072

20652073
script:
2074+
sorting_of_anno = params.anno_file_is_unsorted ? "" : "-sorted"
20662075
"""
20672076
## Create genome file from bam header
20682077
samtools view -H ${bam} | grep '@SQ' | sed 's#@SQ\tSN:\\|LN:##g' > genome.txt
20692078
20702079
## 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
2080+
bedtools coverage -nonamecheck -g genome.txt ${sorting_of_anno} -a ${anno_file} -b ${bam} | pigz -p ${task.cpus - 1} > "${bam.baseName}".breadth.gz
2081+
bedtools coverage -nonamecheck -g genome.txt ${sorting_of_anno} -a ${anno_file} -b ${bam} -mean | pigz -p ${task.cpus - 1} > "${bam.baseName}".depth.gz
20732082
"""
20742083
}
20752084

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

27432752
script:
2744-
def out = !params.vcf2genome_outfile ? "${samplename}.fasta" : "${params.vcf2genome_outfile}"
2753+
def out = !params.vcf2genome_outfile ? "${samplename}.fasta" : "${samplename}_${params.vcf2genome_outfile}.fasta"
27452754
def fasta_head = !params.vcf2genome_header ? "${samplename}" : "${params.vcf2genome_header}"
27462755
"""
27472756
pigz -d -f -p ${task.cpus} ${vcf}

0 commit comments

Comments
 (0)