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 intervals #524

Merged
merged 59 commits into from
May 3, 2022
Merged

Conversation

FriederikeHanssen
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).

@nickhsmith
Copy link
Contributor

do you know how it'll interact with the other modules that use num_intervals? In the variant calling subworkflow the input cram_recalibrated_intervals now contains the num_intervals. But modules such as:

subworkflows/nf-core/gatk4/prepare_recalibration/main.nf
subworkflows/nf-core/gatk4/prepare_recalibration_spark/main.nf
subworkflows/nf-core/gatk4/tumor_normal_somatic_variant_calling/main.nf
subworkflows/nf-core/gatk4/tumor_only_somatic_variant_calling/main.nf
subworkflows/nf-core/variantcalling/deepvariant/main.nf
subworkflows/nf-core/variantcalling/freebayes/main.nf
subworkflows/nf-core/variantcalling/haplotypecaller/main.nf
subworkflows/nf-core/variantcalling/manta/germline/main.nf
subworkflows/nf-core/variantcalling/manta/somatic/main.nf
subworkflows/nf-core/variantcalling/manta/tumoronly/main.nf
subworkflows/nf-core/variantcalling/strelka/single/main.nf
subworkflows/nf-core/variantcalling/strelka/somatic/main.nf

all group by num_intervals outside of the cram or input channel.

@FriederikeHanssen
Copy link
Contributor Author

do you know how it'll interact with the other modules that use num_intervals? In the variant calling subworkflow the input cram_recalibrated_intervals now contains the num_intervals. But modules such as:

subworkflows/nf-core/gatk4/prepare_recalibration/main.nf
subworkflows/nf-core/gatk4/prepare_recalibration_spark/main.nf
subworkflows/nf-core/gatk4/tumor_normal_somatic_variant_calling/main.nf
subworkflows/nf-core/gatk4/tumor_only_somatic_variant_calling/main.nf
subworkflows/nf-core/variantcalling/deepvariant/main.nf
subworkflows/nf-core/variantcalling/freebayes/main.nf
subworkflows/nf-core/variantcalling/haplotypecaller/main.nf
subworkflows/nf-core/variantcalling/manta/germline/main.nf
subworkflows/nf-core/variantcalling/manta/somatic/main.nf
subworkflows/nf-core/variantcalling/manta/tumoronly/main.nf
subworkflows/nf-core/variantcalling/strelka/single/main.nf
subworkflows/nf-core/variantcalling/strelka/somatic/main.nf

all group by num_intervals outside of the cram or input channel.

Yeah they all need fixing. I have it done aprtially locally already but haven't had time to push the fixes yet. Also want to remove the querying for no_intervlas in the grouping as it should be unnecessary now

@maxulysse
Copy link
Member

Issues with the new modules when merging?
I can see there is more local modules than I expected

@FriederikeHanssen
Copy link
Contributor Author

Issues with the new modules when merging? I can see there is more local modules than I expected

🤦‍♀️ yep messed up merging.

@maxulysse
Copy link
Member

Issues with the new modules when merging? I can see there is more local modules than I expected

woman_facepalming yep messed up merging.

😱

@FriederikeHanssen
Copy link
Contributor Author

honestly not sure what happened, but oh well

tests/test_annotation.yml Outdated Show resolved Hide resolved
no_intervals: num_intervals == 1
STRELKA_SINGLE.out.vcf.branch{
intervals: it[0].num_intervals > 1
no_intervals: it[0].num_intervals <= 1
Copy link
Member

Choose a reason for hiding this comment

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

num_intervals is 0 for params.no_intervals?
Shouldn't it be 1 as for just one big interval?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

quite a philosophical question. I was thinking of num_intervals as num_interval_files.

This does avoid the whole weird things about querying for interval file name for the VC workflows:

            new_meta.id = num_intervals <= 1 ? meta.sample : meta.sample + "_" + intervals.baseName
            new_meta.num_intervals = num_intervals

            //If no interval file provided (0) then add empty list
            intervals_new = num_intervals == 0 ? [] : intervals
            ```

@FriederikeHanssen FriederikeHanssen marked this pull request as ready for review May 2, 2022 16:05
@FriederikeHanssen
Copy link
Contributor Author

OK there are still both cosmetic problems:

  1. interval names not matching (old "bug") file content is fine, it is just about the naming
  2. saveAs creating empty files

Copy link
Member

@maxulysse maxulysse left a comment

Choose a reason for hiding this comment

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

Mutect2 for next PR?

@FriederikeHanssen
Copy link
Contributor Author

Mutect2 for next PR?

Yes I think this is a separate issue topic wise + want to coordinate with @GCJMackenzie on this

@FriederikeHanssen
Copy link
Contributor Author

OK there are still both cosmetic problems:

1. interval names not matching (old "bug") file content is fine, it is just about the naming

2. saveAs creating empty files

Follow up issue: #534

Copy link
Member

@maxulysse maxulysse left a comment

Choose a reason for hiding this comment

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

<3

@FriederikeHanssen FriederikeHanssen merged commit dc259f0 into nf-core:dev May 3, 2022
@FriederikeHanssen FriederikeHanssen deleted the fix_intervals branch July 10, 2023 19:00
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