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

Dev #473

Closed
wants to merge 19 commits into from
Closed

Dev #473

wants to merge 19 commits into from

Conversation

nickhsmith
Copy link
Contributor

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 you've added a new tool - add to the software_versions process and a regex to scrape_software_versions.py
    • If you've added a new tool - have you followed the pipeline conventions in the contribution docs
    • If necessary, also make a PR on the nf-core/sarek branch on the nf-core/test-datasets repository.
  • Make sure your code lints (nf-core lint .).
  • Ensure the test suite passes (nextflow run . -profile test,docker).
  • Usage Documentation in docs/usage.md is updated.
  • Output Documentation in docs/output.md is updated.
  • CHANGELOG.md is updated.
  • README.md is updated (including new tool citations and authors/contributors).

This PR seeks to fix 2 problems.

  1. For each module defined in conf/modules.config set an appropriate publishDir list containing the path, mode, pattern, and enabled keywords. This should now address [BUG] modules.config: publishDirmode: 'copy' #471 and match the module stle
  2. For the many of the variant_calling steps, there were some typos and function argument ordering errors. These have been fixed.

Copy link
Contributor

@FriederikeHanssen FriederikeHanssen left a comment

Choose a reason for hiding this comment

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

hey @nickhsmith thanks a lot for fixing the publish copy issue 😊 anything that is not right in nf-core/modules should be fixed in that repository, so we can properly pull from there. Since you have also adressed some of the null/false things in the nextflow.config here, maybe we can wait for conclusion on the discussion and Maxime to merge his PR. We could certainly add the things about Haplotypecaller here, and once Gavin is ready just overwrite it.

ext.prefix = { params.split_fastq > 1 ? "${meta.id}".concat(reads.get(0).name.findAll(/part_([0-9]+)?/).last().concat('.')) : "${meta.id}" }
publishDir = [
Copy link
Contributor

Choose a reason for hiding this comment

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

if it is not enabled, i don't think this needs to be here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I like having the same format, and if someone decides tomorrow to output/publish this module. All they need to do is to change enabled But it's definitely not used now

pattern: "*{bam,bai}"
]
}

withName: 'SAMTOOLS_MERGE' {
publishDir = [ enabled: false ]
publishDir = [
Copy link
Contributor

Choose a reason for hiding this comment

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

same here

}

withName: 'SEQKIT_SPLIT2' {
ext.args = { "--by-size ${params.split_fastq}" }
publishDir = [ enabled: false ]
publishDir = [
Copy link
Contributor

Choose a reason for hiding this comment

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

same

pattern: "*{metrics}"
]
}
withName: 'GATK4_MARKDUPLICATES' {
ext.args = '-REMOVE_DUPLICATES false -VALIDATION_STRINGENCY LENIENT'
ext.suffix = '.md'
publishDir = [
path: { "${params.outdir}/preprocessing/${meta.id}/markduplicates" },
enabled: false
enabled: false,
Copy link
Contributor

Choose a reason for hiding this comment

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

see above, and the path could actually also be removed

conf/modules.config Outdated Show resolved Hide resolved
@@ -268,12 +268,12 @@ workflow SAREK {
ch_versions = ch_versions.mix(GATK4_MAPPING.out.versions)
}

if (params.step == 'preparerecalibration') {
if (params.step == 'prepare_recalibration') {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
if (params.step == 'prepare_recalibration') {
if (params.step == 'preparerecalibration') {

case 'recalibrate': csv_file = file("${params.outdir}/preprocessing/csv/markduplicates.csv", checkIfExists: true); break
case 'variantcalling': csv_file = file("${params.outdir}/preprocessing/csv/recalibrated.csv", checkIfExists: true); break
case 'variant_calling': csv_file = file("${params.outdir}/preprocessing/csv/recalibrated.csv", checkIfExists: true); break
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
case 'variant_calling': csv_file = file("${params.outdir}/preprocessing/csv/recalibrated.csv", checkIfExists: true); break
case 'variantcalling': csv_file = file("${params.outdir}/preprocessing/csv/recalibrated.csv", checkIfExists: true); break

@@ -48,9 +48,9 @@ else {
log.warn "No samplesheet specified, attempting to restart from csv files present in ${params.outdir}"
switch (params.step) {
case 'mapping': exit 1, "Can't start with step $params.step without samplesheet"
case 'preparerecalibration': csv_file = file("${params.outdir}/preprocessing/csv/markduplicates_no_table.csv", checkIfExists: true); break
case 'prepare_recalibration': csv_file = file("${params.outdir}/preprocessing/csv/markduplicates_no_table.csv", checkIfExists: true); break
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
case 'prepare_recalibration': csv_file = file("${params.outdir}/preprocessing/csv/markduplicates_no_table.csv", checkIfExists: true); break
case 'preparerecalibration': csv_file = file("${params.outdir}/preprocessing/csv/markduplicates_no_table.csv", checkIfExists: true); break

@@ -83,7 +83,7 @@ workflow PREPARE_GENOME {
}

ch_known_indels_tbi = Channel.empty()
if (!(params.known_indels_tbi) && params.known_indels && ('mapping' in step || 'preparerecalibration' in step)) {
if (!(params.known_indels_tbi) && params.known_indels && ('mapping' in step || 'prepare_recalibration' in step)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
if (!(params.known_indels_tbi) && params.known_indels && ('mapping' in step || 'prepare_recalibration' in step)) {
if (!(params.known_indels_tbi) && params.known_indels && ('mapping' in step || 'preparerecalibration' in step)) {

@@ -69,7 +69,7 @@ workflow PREPARE_GENOME {
}

ch_dbsnp_tbi = Channel.empty()
if (!(params.dbsnp_tbi) && params.dbsnp && ('mapping' in step || 'preparerecalibration' in step || 'controlfreec' in tools || 'haplotypecaller' in tools|| 'mutect2' in tools || 'tnscope' in tools)) {
if (!(params.dbsnp_tbi) && params.dbsnp && ('mapping' in step || 'prepare_recalibration' in step || 'controlfreec' in tools || 'haplotypecaller' in tools|| 'mutect2' in tools || 'tnscope' in tools)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
if (!(params.dbsnp_tbi) && params.dbsnp && ('mapping' in step || 'prepare_recalibration' in step || 'controlfreec' in tools || 'haplotypecaller' in tools|| 'mutect2' in tools || 'tnscope' in tools)) {
if (!(params.dbsnp_tbi) && params.dbsnp && ('mapping' in step || 'preparerecalibration' in step || 'controlfreec' in tools || 'haplotypecaller' in tools|| 'mutect2' in tools || 'tnscope' in tools)) {

@FriederikeHanssen
Copy link
Contributor

Before we can merge for sure, need to get the CI tests back to pass as well as the linting for sure 🙈

@@ -1,6 +1,5 @@
params {
outdir = "output/"
publish_dir_mode = "copy"
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this might need to stay in for the CI tests to pass

nickhsmith and others added 3 commits December 14, 2021 15:23
Co-authored-by: FriederikeHanssen <Friederike.hanssen@qbic.uni-tuebingen.de>
Co-authored-by: FriederikeHanssen <Friederike.hanssen@qbic.uni-tuebingen.de>
@maxulysse
Copy link
Member

You can check #468 for some updates, but we're probably going to get another PR whenever the tools release is happening (which I guess should be soon now)

@github-actions
Copy link

github-actions bot commented Jan 14, 2022

nf-core lint overall result: Passed ✅ ⚠️

Posted for pipeline commit 1e5034e

+| ✅ 135 tests passed       |+
#| ❔   6 tests were ignored |#
!| ❗   5 tests had warnings |!

❗ Test warnings:

  • pipeline_todos - TODO string in awsfulltest.yml: You can customise AWS full pipeline tests as required
  • pipeline_todos - TODO string in test_full.config: Specify the paths to your full test data ( on nf-core/test-datasets or directly in repositories, e.g. SRA)
  • pipeline_todos - TODO string in test_full.config: Give any required params for the test so that command line flags are not needed
  • pipeline_todos - TODO string in test_full.config: Specify the paths to your full test data ( on nf-core/test-datasets or directly in repositories, e.g. SRA)
  • pipeline_todos - TODO string in test_full.config: Give any required params for the test so that command line flags are not needed

❔ Tests ignored:

  • files_unchanged - File ignored due to lint config: .github/workflows/linting.yml
  • files_unchanged - File ignored due to lint config: assets/nf-core-sarek_logo_light.png
  • files_unchanged - File ignored due to lint config: docs/images/nf-core-sarek_logo_light.png
  • files_unchanged - File ignored due to lint config: docs/images/nf-core-sarek_logo_dark.png
  • files_unchanged - File ignored due to lint config: lib/NfcoreTemplate.groovy
  • files_unchanged - File ignored due to lint config: assets/multiqc_config.yaml

✅ Tests passed:

Run details

  • nf-core/tools version 2.2
  • Run at 2022-01-14 21:13:33

Comment on lines -74 to -79

// Check input has been provided
if (!params.input) {
log.error "Please provide an input samplesheet to the pipeline e.g. '--input samplesheet.csv'"
System.exit(1)
}
Copy link
Member

Choose a reason for hiding this comment

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

I would not remove that

Copy link
Contributor Author

@nickhsmith nickhsmith Feb 14, 2022

Choose a reason for hiding this comment

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

we need to have some work around for utilizing the automatic restart. This check totally negates the checks at workflows/sarek.nf lines 46 - 56

Copy link
Contributor

Choose a reason for hiding this comment

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

hm ok I would say we need to fix sarek not the template then, what do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think it's quite a useful feature to be able to restart the analysis. There is already a warning, and if the step isn't there it throws an error. You need to designate a step, which essentially is a shortcut for editing the config file. just set step = variant_calling instead of input = 'Path/To/Dir/preprocessing/csv/recalibrated.csv'

Copy link
Contributor

Choose a reason for hiding this comment

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

right, I definitly think we should keep it, just make it work properly without messing with the template :)

Copy link
Contributor

Choose a reason for hiding this comment

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

or otherwise we should raise the issue in tools and see i the template needs changing

Comment on lines +380 to +383
<<<<<<< HEAD
=======

>>>>>>> f1bcc423664ba9bcec1cd227225555971ef87a63
Copy link
Member

Choose a reason for hiding this comment

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

looks like merge confilcts

Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
<<<<<<< HEAD
=======
>>>>>>> f1bcc423664ba9bcec1cd227225555971ef87a63

@maxulysse
Copy link
Member

Still some comments not addressed, but looking better and better, I like the update on concat_vcf

@nickhsmith
Copy link
Contributor Author

This whole PR is still not right or up to date. But There is good conversation here.

@nickhsmith nickhsmith closed this Feb 22, 2022
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.

3 participants