-
Notifications
You must be signed in to change notification settings - Fork 752
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
Update subworkflow for deepvariant to version 1.8.0 #7473
Conversation
Looks like some tests are failing? |
Oh sorry I missed that. I will check it and let you know when it's fixed. It may be related to the nextflow version. |
@fellen31 I've fixed the test for POSTPROCESSVARIANTS, adding the correct input tuple. Now all the tests pass. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, thanks for continuing this.
// The following block determines whether the small model was used, and if so, adds the variant calls from it | ||
// to the argument --small_model_cvo_records. | ||
def small_model_arg = "" | ||
def small_model_calls_copy = small_model_calls // Create a copy of the process-level variable so it can be used inside the if{} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure why you would need this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was working around an error message I got when using the input variable directly. I have to do some more testing, because it seems to work now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The issue seems to be that if I remove def small_model_calls_copy = small_model_calls
, I get this error:
│ Nextflow stdout: │
│ │
│ ERROR ~ Module compilation error │
│ - file : /data/projects/modules/subworkflows/nf-core/deepvariant/tests/../../../../modules/nf-core/deepvariant/postprocessvariants/main.nf │
│ - cause: Variable `small_model_calls` already defined in the process scope @ line 49, column 36. │
│ def small_model_matcher = (small_model_calls[0].baseName =~ /^(.+)-\d{5}-of-(\d{5})$/) │
│ ^ │
│ │
│ 1 error │
│ │
│ │
│ -- Check script '/data/projects/modules/subworkflows/nf-core/deepvariant/tests/../main.nf' at line: 3 or see │
│ '/data/projects/modules/.nf-test/tests/108496a30634aa9373981b51feca7830/meta/nextflow.log' file for more details │
│ Nextflow stderr: │
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, and if you remove the def
before small_model_matcher?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems to work if I remove the def's on everything except for small_model_arg
. I'll create a commit for this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the tip :)
subworkflows/nf-core/deepvariant/tests/deepvariant-workflow-and-process-equality-tester.nf
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this run in the CI?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't done anything explicitly to make it run in CI. I will try to confirm whether it runs. Do you think it should be enabled in CI? We may have a situation (like just happened) where we want to update rundeepvariant without the subworkflow, and can ignore this test result.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you are right. Nice to be able to test that the subworkflow produces the same output as the rundeepvariant, but probably shouldn't be in the CI.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's enabled in CI now, that happened automatically. I have to look into how it can be disabled.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove the tags?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added them to the skip file, but the format is a bit different than usual, because I only want to skip one of the test files. I have to check that it still runs main.nf and that it skips equality.nf
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like it's successfully disabled now
Co-authored-by: Felix Lenner <[email protected]>
…les into update-deepvariant-subworkflow
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
Have you tested the differences in time and resources for the subworkflow vs rundeepvariant for 1.8? Would be interesting to see how much difference it makes.
No, but it would be interesting to know. I'll try to get this information, but also merge when ready. |
Update the deepvariant variant calling subworkflow (nf-core/deepvariant) to version 1.8.0.
Other module subcommands were updated in #7301.
This work is based on @fellen31's original pull request to update the subworkflow, and adds some handling of the "small model". Summary of changes:
The future of the subworkflow in nf-core is a bit uncertain. Recent updates of DeepVariant have required an excessive amount of changes to be made in the subworkflow. Due to the argument handling with
ext.args
, they would also require many changes by the pipelines using the subworkflow, to keep up with the default arguments used by therun_deepvariant
script.The purpose of this subworkflow is to optimize compute resource usage, allocating GPUs only when needed. With version 1.8.0, Google released a new "fast pipeline" (https://github.com/google/deepvariant/blob/r1.8/docs/deepvariant-fast-pipeline-case-study.md) that could solve the same problem in a different way. At the moment, the fast pipeline is about as complex as the subworkflow approach, so I'm suggesting we keep the subworkflow for now.
PR checklist
Closes #XXX
versions.yml
file.label
nf-core modules test <MODULE> --profile docker
nf-core modules test <MODULE> --profile singularity
nf-core modules test <MODULE> --profile conda
nf-core subworkflows test <SUBWORKFLOW> --profile docker
nf-core subworkflows test <SUBWORKFLOW> --profile singularity
nf-core subworkflows test <SUBWORKFLOW> --profile conda