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

allow storeDir for RunBQSR #1001

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
Changes from 2 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
13 changes: 7 additions & 6 deletions pipeline.nf
Original file line number Diff line number Diff line change
Expand Up @@ -581,8 +581,7 @@ if (params.mapping) {
referenceMap.knownIndelsIndex
])
output:
set idSample, target, file("${idSample}.bam"), file("${idSample}.bam.bai") into bamsBQSR4Alfred, bamsBQSR4CollectHsMetrics, bamsBQSR4Tumor, bamsBQSR4Normal, bamsBQSR4QcPileup, bamsBQSR4Qualimap
set idSample, target, val("${file(outDir).toString()}/bams/${idSample}/${idSample}.bam"), val("${file(outDir).toString()}/bams/${idSample}/${idSample}.bam.bai") into bamResults
set idSample, target, file("${idSample}.bam"), file("${idSample}.bam.bai") into bamsBQSR4Alfred, bamsBQSR4CollectHsMetrics, bamsBQSR4Tumor, bamsBQSR4Normal, bamsBQSR4QcPileup, bamsBQSR4Qualimap, bamResults
file("file-size.txt") into bamSize
script:
if (workflow.profile == "juno") {
Expand Down Expand Up @@ -661,13 +660,15 @@ if (params.mapping) {
"""
}

File file = new File(outname)
file.newWriter().withWriter { w ->
File file_bammapping = new File(outname)
file_bammapping.newWriter().withWriter { w ->
w << "SAMPLE\tTARGET\tBAM\tBAI\n"
}

bamResults.subscribe { Object obj ->
file.withWriterAppend { out ->
bamResults.map{ idSample, target, bam, bai ->
[ idSample, target, "${file(outDir).toString()}/bams/${idSample}/${idSample}.bam", "${file(outDir).toString()}/bams/${idSample}/${idSample}.bam.bai" ]
}.subscribe { Object obj ->
file_bammapping.withWriterAppend { out ->
out.println "${obj[0]}\t${obj[1]}\t${obj[2]}\t${obj[3]}"
}
}
Expand Down