Skip to content

Commit

Permalink
Merge pull request #338 from nf-core/centrifuge-fix
Browse files Browse the repository at this point in the history
Fix CENTRIFUGE header modification when --out-fmt turned on
  • Loading branch information
jfy133 authored Jul 28, 2023
2 parents 9fce098 + 3437201 commit fba2d8c
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 12 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- [#313](https://github.com/nf-core/taxprofiler/pull/304) Fix pipeline not providing error when database sheet does not have a header (♥ to @noah472 for reporting, fix by @jfy133)
- [#330](https://github.com/nf-core/taxprofiler/pull/330) Added better tagging to allow disambiguation of Kraken2 steps of Kraken2 vs Bracken (♥ to @MajoroMask for requesting, added by @jfy133)
- [#334](https://github.com/nf-core/taxprofiler/pull/334) Increase the memory of the FALCO process to 4GB (fix by @LilyAnderssonLee)
- Improved meta map stability for more robust pipeline resuming (fix by @jfy133)
- [#332](https://github.com/nf-core/taxprofiler/pull/332) Improved meta map stability for more robust pipeline resuming (fix by @jfy133)
- [#338](https://github.com/nf-core/taxprofiler/pull/338) Fixed wrong file 'out' file going to `centrifuge kreport` module (♥ to @LilyAnderssonLee for reporting, fix by @jfy133)

### `Dependencies`

Expand All @@ -46,6 +47,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### `Deprecated`

- [#338](https://github.com/nf-core/taxprofiler/pull/338) Updated Centrifuge module to not generate (undocumented) SAM alignments by default if --save_centrifuge_reads supplied, to due to a Centrifuge bug modifying profile header. SAM alignments can still be generated if `--out-fmt` supplied in `database.csv` (♥ to @LilyAnderssonLee for reporting, fix by @jfy133)

## v1.0.1 - Dodgy Dachshund Patch [2023-05-15]

### `Added`
Expand Down
2 changes: 1 addition & 1 deletion conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,7 @@ process {
publishDir = [
path: { "${params.outdir}/centrifuge/${meta.db_name}/" },
mode: params.publish_dir_mode,
pattern: '*.{txt,sam,gz}'
pattern: '*.{txt,sam,tab,gz}'
]
}

Expand Down
2 changes: 1 addition & 1 deletion modules.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
},
"centrifuge/centrifuge": {
"branch": "master",
"git_sha": "c8e35eb2055c099720a75538d1b8adb3fb5a464c",
"git_sha": "7b0b4276fbad744a69c35d3cbf9d55fdfc9491bd",
"installed_by": ["modules"]
},
"centrifuge/kreport": {
Expand Down
7 changes: 2 additions & 5 deletions modules/nf-core/centrifuge/centrifuge/main.nf

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

9 changes: 7 additions & 2 deletions modules/nf-core/centrifuge/centrifuge/meta.yml

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

8 changes: 6 additions & 2 deletions subworkflows/local/profiling.nf
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ workflow PROFILING {
db: it[3]
}

CENTRIFUGE_CENTRIFUGE ( ch_input_for_centrifuge.reads, ch_input_for_centrifuge.db, params.centrifuge_save_reads, params.centrifuge_save_reads, params.centrifuge_save_reads )
CENTRIFUGE_CENTRIFUGE ( ch_input_for_centrifuge.reads, ch_input_for_centrifuge.db, params.centrifuge_save_reads, params.centrifuge_save_reads )
ch_versions = ch_versions.mix( CENTRIFUGE_CENTRIFUGE.out.versions.first() )
ch_raw_classifications = ch_raw_classifications.mix( CENTRIFUGE_CENTRIFUGE.out.results )

Expand All @@ -236,7 +236,11 @@ workflow PROFILING {
.filter { meta, db -> meta.tool == 'centrifuge' }
.map { meta, db -> [meta.db_name, meta, db] }

ch_input_for_centrifuge_kreport = CENTRIFUGE_CENTRIFUGE.out.report
// We must combine the _results_ file to get correct output - sending the report file will
// weirdly still produce valid-looking output, however the numbers are nonsense.
// Unfortunately the Centrifuge documentation for this was unclear as to _which_ outfile
// goes into it.
ch_input_for_centrifuge_kreport = CENTRIFUGE_CENTRIFUGE.out.results
.map { meta, profile -> [meta.db_name, meta, profile] }
.combine(ch_database_for_centrifugekreport, by: 0)
.multiMap {
Expand Down

0 comments on commit fba2d8c

Please sign in to comment.