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

Dsl2 #263

Merged
merged 6 commits into from
Aug 5, 2020
Merged

Dsl2 #263

merged 6 commits into from
Aug 5, 2020

Conversation

maxulysse
Copy link
Member

nf-core/sarek pull request

Many thanks for contributing to nf-core/sarek!

Please fill in the appropriate checklist below (delete whatever is not relevant).
These are the most common things requested on pull requests (PRs).

PR checklist

  • This comment contains a description of changes (with reason)
  • If you've fixed a bug or added code that should be tested, add tests!
  • If necessary, also make a PR on the nf-core/sarek branch on the nf-core/test-datasets repo
  • Ensure the test suite passes (nextflow run . -profile test,docker).
  • Make sure your code lints (nf-core lint .).
  • Documentation in docs is updated
  • CHANGELOG.md is updated
  • README.md is updated

Learn more about contributing: CONTRIBUTING.md

@maxulysse
Copy link
Member Author

Still working on it, but managed to fix so far:

  • MarkDuplicates
  • BamQC
  • target_bed
  • building indices from path
  • using already built indices from path

pon = params.pon ? file(params.pon) : file("${params.outdir}/no_file")
snpeff_cache = params.snpeff_cache ? file(params.snpeff_cache) : file("${params.outdir}/no_file")
target_bed = params.target_bed ? file(params.target_bed) : file("${params.outdir}/no_file")
vep_cache = params.vep_cache ? file(params.vep_cache) : file("${params.outdir}/no_file")

Copy link
Contributor

Choose a reason for hiding this comment

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

Does the no_file folder then remain empty?

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm actually creating the no_file file a couple of lines before with:

file("${params.outdir}/no_file").text = "no_file\n"

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah ok, so actually just an empty file is used then?

known_indels_tbi = params.known_indels ? params.known_indels_index ?: BUILD_INDICES.out.known_indels_tbi.collect() : Channel.empty()
pon_tbi = params.pon ? params.pon_index ?: BUILD_INDICES.out.pon_tbi : Channel.empty()
known_indels_tbi = params.known_indels ? params.known_indels_index ? file(params.known_indels_index) : BUILD_INDICES.out.known_indels_tbi.collect() : Channel.empty()
pon_tbi = params.pon ? params.pon_index ? file(params.pon_index) : BUILD_INDICES.out.pon_tbi : Channel.empty()

Copy link
Contributor

Choose a reason for hiding this comment

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

We should indent this at some point so it looks as nice as the rest :)

Copy link
Member Author

Choose a reason for hiding this comment

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

Good point

//But if SAMTOOLS_INDEX is not run, markduplicates does not work
bam_mapped = SAMTOOLS_INDEX_MAPPED(bam_mapped)
//But if SAMTOOLS_INDEX is not run, markduplicates does not work
bam_mapped = SAMTOOLS_INDEX_MAPPED(bam_mapped)
Copy link
Contributor

Choose a reason for hiding this comment

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

This comment is obsolet with your fix, right?

Copy link
Member Author

Choose a reason for hiding this comment

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

Wasn't sure about it, but probably

@@ -464,31 +464,55 @@ workflow {
}

GATHERBQSRREPORTS(recaltable)
// if ('baserecalibrator' in skip_qc) baseRecalibratorReport.close()
table = GATHERBQSRREPORTS.out.table
Copy link
Contributor

Choose a reason for hiding this comment

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

rename to bqsr_table?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, that's a good idea


if (!('bamqc' in skip_qc)) {
BAMQC(BWAMEM2_MEM.out.mix(recal), target_bed)
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe for consistency we could always set the output to a variable, so above somewhere bwamem2_out = BWAMEM2_MEM.out ..... Maybe a more descriptive variable name.

Copy link
Member Author

Choose a reason for hiding this comment

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

That's a good idea too.
Maybe something like bwamem2_bam or mapped_bam

@maxulysse maxulysse merged commit 7c2150e into nf-core:dsl2 Aug 5, 2020
@maxulysse maxulysse added the DSL2 label Jan 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants