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

--save_bam_mapped works for every settings #202

Merged
merged 2 commits into from
May 8, 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
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Piellorieppe is one of the main massif in the Sarek National Park.
- [#180](https://github.com/nf-core/sarek/pull/180) - Now saving Mapped BAMs (and creating TSV) in minimal setting
- [#182](https://github.com/nf-core/sarek/pull/182) - Add possibility to run `HaplotypeCaller` without `dbsnp` so it can be used to actually generate vcfs to build a set of known sites (cf [gatkforums](https://gatkforums.broadinstitute.org/gatk/discussion/1247/what-should-i-use-as-known-variants-sites-for-running-tool-x))
- [#195](https://github.com/nf-core/sarek/pull/195) - Now creating TSV for duplicates marked BAMs in minimal setting
- [#195](https://github.com/nf-core/sarek/pull/195) - Add `--save_bam_mapped` params to save mapped BAMs.
- [#195](https://github.com/nf-core/sarek/pull/195), [#202](https://github.com/nf-core/sarek/pull/202) - Add `--save_bam_mapped` params to save mapped BAMs.
- [#197](https://github.com/nf-core/sarek/pull/197) - Add step `prepare_recalibration` to allow restart from DuplicatesMarked BAMs

### Changed
Expand Down
8 changes: 3 additions & 5 deletions main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -1239,7 +1239,7 @@ process IndexBamFile {
publishDir params.outdir, mode: params.publish_dir_mode,
saveAs: {
if (params.save_bam_mapped) "Preprocessing/${idSample}/Mapped/${it}"
null
else null
}

input:
Expand All @@ -1249,7 +1249,7 @@ process IndexBamFile {
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)
when: params.save_bam_mapped || !(params.known_indels)

script:
"""
Expand Down Expand Up @@ -2136,8 +2136,6 @@ vcfMantaSingle = vcfMantaSingle.dump(tag:'Single Manta')
process TIDDIT {
tag {idSample}

publishDir "${params.outdir}/VariantCalling/${idSample}/TIDDIT", mode: params.publish_dir_mode

publishDir params.outdir, mode: params.publish_dir_mode,
saveAs: {
if (it == "TIDDIT_${idSample}.vcf") "VariantCalling/${idSample}/TIDDIT/${it}"
Expand Down Expand Up @@ -2818,7 +2816,7 @@ process MSIsensor_msi {

tag {idSampleTumor + "_vs_" + idSampleNormal}

publishDir "${params.outdir}/VariantCalling/${idSampleTumor}_vs_${idSampleNormal}/MSIsensor", mode: params.publishDirMode
publishDir "${params.outdir}/VariantCalling/${idSampleTumor}_vs_${idSampleNormal}/MSIsensor", mode: params.publish_dir_mode

input:
set idPatient, idSampleNormal, file(bamNormal), file(baiNormal), idSampleTumor, file(bamTumor), file(baiTumor) from pairBamMsisensor
Expand Down