Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### `Fixed`

- Ensure deterministic sample ordering in Manta SV output by sorting BAM/BAI channel inputs [#815](https://github.com/nf-core/raredisease/pull/815)
- Fixed inconsistencies in JSON schema [#714](https://github.com/nf-core/raredisease/pull/714)
- Fixed conda declaration in the add_varcallername_to_bed module [#733](https://github.com/nf-core/raredisease/pull/733)
- Fixed CADD annotation to support chr prefix [#745](https://github.com/nf-core/raredisease/pull/745)
Expand Down
6 changes: 4 additions & 2 deletions subworkflows/local/call_sv_manta/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,13 @@ workflow CALL_SV_MANTA {
val_analysis_type // string: "wes", "wgs", or "mito"

main:
ch_bam.collect{_meta, bam -> bam}
ch_bam.map{ _meta, bam -> bam }
.collect(sort: { a, b -> a.getName() <=> b.getName() })
.toList()
Comment on lines +19 to 21

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Good that you found this issue. Previously I've sorted the inputs within the module for these kinds of issues (e.g. https://github.com/nf-core/modules/blob/5d4a8ab3aeed5b759ca0a38b57b6153e9b55deab/modules/nf-core/bcftools/merge/main.nf#L26). But maybe this works since it's converted to a list before it's combined into manta_input? @ramprasadn, what's the reason for having .toList() here in the first place?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without toList(), the combine operation downstream doesn't work. Instead of [meta, [bam1, bam2], [bai1, bai2]] you get [meta, bam1, bam2, bai1, bai2]

.set { bam_file_list }

ch_bai.collect{_meta, bai -> bai}
ch_bai.map{ _meta, bai -> bai }
.collect(sort: { a, b -> a.getName() <=> b.getName() })
.toList()
.set { bai_file_list }

Expand Down
Loading