Skip to content
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

fix input/output for IndexBamFile #188

Merged
merged 3 commits into from
Apr 17, 2020
Merged
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ Piellorieppe is one of the main massif in the Sarek National Park.
- [#164](https://github.com/nf-core/sarek/pull/164) - Fix issues when running with `Sentieon`
- [#164](https://github.com/nf-core/sarek/pull/164) - Add more VCFs to annotation
- [#167](https://github.com/nf-core/sarek/pull/167) - Add `--markdup_java_options` documentation to fix [#166](https://github.com/nf-core/sarek/issues/166)
- [#188](https://github.com/nf-core/sarek/pull/188) - Fix input/output channels for process `IndexBamFile` to match actual files in the `mapped.tsv` files

### Deprecated - [2.6dev]

Expand Down
11 changes: 5 additions & 6 deletions main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -1205,10 +1205,10 @@ process IndexBamMergedForSentieon {
tag {idPatient + "-" + idSample}

input:
set idPatient, idSample, file(bam) from mergedBamForSentieon
set idPatient, idSample, file("${idSample}.bam") from mergedBamForSentieon

output:
set idPatient, idSample, file(bam), file("${idSample}.bam.bai") into bamForSentieonDedup
set idPatient, idSample, file("${idSample}.bam"), file("${idSample}.bam.bai") into bamForSentieonDedup

script:
"""
Expand All @@ -1226,18 +1226,17 @@ process IndexBamFile {
publishDir "${params.outdir}/Preprocessing/${idSample}/Mapped", mode: params.publish_dir_mode

input:
set idPatient, idSample, file(bam) from bam_mapped_merged_to_index
set idPatient, idSample, file("${idSample}.bam") from bam_mapped_merged_to_index

output:
set idPatient, idSample, file(bam), file("*.bai") into bam_mapped_merged_indexed
set idPatient, idSample, file("${idSample}.bam"), file("${idSample}.bam.bai") into bam_mapped_merged_indexed
set idPatient, idSample into tsv_bam_indexed

when: !(params.known_indels)

script:
"""
samtools index ${bam}
mv ${bam}.bai ${bam.baseName}.bai
samtools index ${idSample}.bam
"""
}

Expand Down