Skip to content

Replace Bowtie2 custom modules with official nf-core ones #754

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 17 commits into
base: dev
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### `Changed`

- [#754](https://github.com/nf-core/mag/pull/754) - Replaced local module with nf-core module for all Bowtie2 processes (reported by @MeriamOs, fix by @jfy133)
- [#754](https://github.com/nf-core/mag/pull/754) - Made filenames consistent for all bowtie2 assembly-aligning output (fix by @jfy133)

### `Fixed`

- [#754](https://github.com/nf-core/mag/pull/754) - Fix version reporting in binning preparation and ancient DNA workflows (fix by @jfy133)
- [#769](https://github.com/nf-core/mag/pull/769) - Fix megahit not emitting correct filenames due to suboptimal arguments ordering (reported and fix by @IceGreb)
- [#771](https://github.com/nf-core/mag/pull/771) - Fix misspecified checkm2 database parameter check (reported by @dpelegri and fix by @jfy133)

### `Dependencies`

| Tool | Previous version | New version |
| ------- | ---------------- | ----------- |
| Bowtie2 | 2.4.2 | 2.5.2 |

### `Deprecated`

## v3.3.1 - [2025-02-13]
Expand Down
26 changes: 22 additions & 4 deletions conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -347,24 +347,42 @@ process {
]
}

withName: BOWTIE2_ASSEMBLY_BUILD {
ext.prefix = { "${meta.assembler}-${meta.id}" }
}

withName: BOWTIE2_ASSEMBLY_ALIGN {
tag = { "${meta.assembler}-${meta.id}-${meta3.id}" }
ext.args = params.bowtie2_mode ? params.bowtie2_mode : params.ancient_dna ? '--very-sensitive -N 1' : ''
ext.prefix = { "${meta.id}.assembly" }
ext.args2 = ""
ext.prefix = { "${meta.assembler}-${meta.id}-${meta3.id}" }
publishDir = [
[
path: { "${params.outdir}/Assembly/${assembly_meta.assembler}/QC/${assembly_meta.id}" },
path: { "${params.outdir}/Assembly/${meta.assembler}/QC/${meta.id}" },
mode: params.publish_dir_mode,
pattern: "*.log",
],
[
path: { "${params.outdir}/Assembly/${assembly_meta.assembler}/QC/${assembly_meta.id}" },
path: { "${params.outdir}/Assembly/${meta.assembler}/QC/${meta.id}" },
mode: params.publish_dir_mode,
pattern: "*.{bam,bai}",
pattern: "*.{bam,csi}",
enabled: params.save_assembly_mapped_reads,
],
]
}

withName: SAMTOOLS_INDEX {
ext.prefix = { "${meta.assembler}-${meta.id}-${meta3.id}" }
publishDir = [
[
path: { "${params.outdir}/Assembly/${meta.assembler}/QC/${meta.id}" },
mode: params.publish_dir_mode,
pattern: "*.{bam}",
enabled: params.save_assembly_mapped_reads,
]
]
}

withName: 'MAG_DEPTHS_PLOT|MAG_DEPTHS_SUMMARY' {
publishDir = [path: { "${params.outdir}/GenomeBinning/depths/bins" }, mode: params.publish_dir_mode, pattern: "*.{png,tsv}"]
}
Expand Down
8 changes: 4 additions & 4 deletions docs/output.md
Original file line number Diff line number Diff line change
Expand Up @@ -219,9 +219,9 @@ Trimmed (short) reads are assembled with both megahit and SPAdes. Hybrid assembl
- `[sample/group].contigs.fa.gz`: Compressed metagenome assembly in fasta format
- `[sample/group].log`: Log file
- `QC/[sample/group]/`: Directory containing QUAST files and Bowtie2 mapping logs
- `MEGAHIT-[sample].bowtie2.log`: Bowtie2 log file indicating how many reads have been mapped from the sample that the metagenome was assembled from, only present if `--coassemble_group` is not set.
- `MEGAHIT-[sample]-[sampleToMap].bowtie2.log`: Bowtie2 log file indicating how many reads have been mapped from the sample that the metagenome was assembled from, only present if `--coassemble_group` is not set.
- `MEGAHIT-[sample/group]-[sampleToMap].bowtie2.log`: Bowtie2 log file indicating how many reads have been mapped from the respective sample ("sampleToMap").
- `MEGAHIT-[sample].[bam/bai]`: Optionally saved BAM file of the Bowtie2 mapping of reads against the assembly.
- `MEGAHIT-[sample]-[sampleToMap].[bam/bai]`: Optionally saved BAM file of the Bowtie2 mapping of reads against the assembly.

</details>

Expand All @@ -238,9 +238,9 @@ Trimmed (short) reads are assembled with both megahit and SPAdes. Hybrid assembl
- `[sample/group].contigs.fa.gz`: Compressed assembled contigs in fasta format
- `[sample/group].spades.log`: Log file
- `QC/[sample/group]/`: Directory containing QUAST files and Bowtie2 mapping logs
- `SPAdes-[sample].bowtie2.log`: Bowtie2 log file indicating how many reads have been mapped from the sample that the metagenome was assembled from, only present if `--coassemble_group` is not set.
- `SPAdes-[sample]-[sampleToMap].bowtie2.log`: Bowtie2 log file indicating how many reads have been mapped from the sample that the metagenome was assembled from, only present if `--coassemble_group` is not set.
- `SPAdes-[sample/group]-[sampleToMap].bowtie2.log`: Bowtie2 log file indicating how many reads have been mapped from the respective sample ("sampleToMap").
- `SPAdes-[sample].[bam/bai]`: Optionally saved BAM file of the Bowtie2 mapping of reads against the assembly.
- `SPAdes-[sample]-[sampleToMap].[bam/bai]`: Optionally saved BAM file of the Bowtie2 mapping of reads against the assembly.

</details>

Expand Down
20 changes: 20 additions & 0 deletions modules.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,16 @@
"git_sha": "911696ea0b62df80e900ef244d7867d177971f73",
"installed_by": ["modules"]
},
"bowtie2/align": {
"branch": "master",
"git_sha": "0e9cb409c32d3ec4f0d3804588e4778971c09b7e",
"installed_by": ["modules"]
},
"bowtie2/build": {
"branch": "master",
"git_sha": "666652151335353eef2fcd58880bcef5bc2928e1",
"installed_by": ["modules"]
},
"cat/fastq": {
"branch": "master",
"git_sha": "5c460c5a4736974abde2843294f35307ee2b0e5e",
Expand Down Expand Up @@ -267,6 +277,16 @@
"git_sha": "fd742419940e01ba1c5ecb172c3e32ec840662fe",
"installed_by": ["modules"]
},
"samtools/index": {
"branch": "master",
"git_sha": "b13f07be4c508d6ff6312d354d09f2493243e208",
"installed_by": ["modules"]
},
"samtools/sort": {
"branch": "master",
"git_sha": "b7800db9b069ed505db3f9d91b8c72faea9be17b",
"installed_by": ["modules"]
},
"seqtk/mergepe": {
"branch": "master",
"git_sha": "911696ea0b62df80e900ef244d7867d177971f73",
Expand Down
7 changes: 7 additions & 0 deletions modules/nf-core/bowtie2/align/environment.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

116 changes: 116 additions & 0 deletions modules/nf-core/bowtie2/align/main.nf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

132 changes: 132 additions & 0 deletions modules/nf-core/bowtie2/align/meta.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions modules/nf-core/bowtie2/align/tests/cram_crai.config

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions modules/nf-core/bowtie2/align/tests/large_index.config

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading