-
Notifications
You must be signed in to change notification settings - Fork 716
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
new module : jvarkit/vcffilterjdk #6621
Conversation
def script_file = code?"--script \"${code}\"":"" | ||
def regions_file = regions_file? (tbi ? " --regions-file" : " --targets-file")+" \"${regions_file}\" ":"" | ||
|
||
extension = getVcfExtension(args3); /* custom function, see below */ |
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 would not use a function here, just put it straight in
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.
@jfy133 this statement contradicts what I've been told here https://nfcore.slack.com/archives/CJRH30T6V/p1725629116371819
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.
grumble grumble @nvnieuwk have you being saying yes to others on this? I thought we were trying to avoid such complexity in modules as an approximate rule ?
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 thought it seemed reasonable 😁 I didn't know about us trying to avoid this, my bad. If that's the case than we shouldn't do 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.
My philosphy if you do something more than two times then funciton it, otherwise it's adding more complexity. But #small-mound-i-feel-strongly-about-but-not-enough-to-fight-everyone
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.
That's what's happening here right? (sorry didn't take a closer look to it yet, it's a chaotic day) 😁
Groovy Map containing code information | ||
- code: | ||
type: file | ||
description: custom user Code . May be empty if script if provided via `task.ext.args2`. |
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.
description: custom user Code . May be empty if script if provided via `task.ext.args2`. | |
description: custom user code. May be empty if script if provided via `task.ext.args2`. |
@@ -0,0 +1,8 @@ | |||
process { | |||
|
|||
|
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.
…nfcore-modules into pl_jvarkit_vcffilterjdk
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.
Just the question to @nvnieuwk about the function thing (but I think this not a blocker now), and then the remaining meta.yaml
comment about the fasta
description and then I think we are good to go
@jfy133 back to you. I added a test to check that a test with 'bed' is OK. Nevertheless Conda is failing "The operation was canceled." for an unknown reason.
|
The conda error was just Azure saying nope, a restart seemed to have fixed it :) |
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.
Almost there! Still some confusing meta.yaml docs
e.g. [ id:'test_reference' ] | ||
- fasta: | ||
type: file | ||
description: Groovy Map containing fasta reference genome information |
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.
You have not changed it since I first commented on this - does the tool expect multiple FASTA files?
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'm not sure I understand the problem your comment here. No, there is only one fasta file. Where is the confusion here ?
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.
'Groovy Map containing' is what is confusing me, it's jut the file no?
e.g. [ id:'test_reference' ] | ||
- fai: | ||
type: file | ||
description: Groovy Map containing fasta index information |
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.
Same as above... should this be a map?
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.
... hum.. no, there is only one fai file (?..)
then { | ||
assertAll( | ||
{ assert process.success }, | ||
{ assert file(process.out.vcf[0][1]).exists() }, |
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.
Does .variantsMD5
not work here, like you did above?
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 BED provided in the test dataset does not overlap any variant. The output vcf is empty, When I test the variants md5, I then get an error md5sum for empty file
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.
OK fair enough
assertAll( | ||
{ assert process.success }, | ||
{ assert snapshot( | ||
path(process.out.vcf[0][1]), |
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.
For stubs I believe you can just use
path(process.out.vcf[0][1]), | |
process.out, |
within the snapshot
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.
@jfy133 that didn't work, there is an error (snap) (I keep path(process.out.vcf[0][1]),
)
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.
This is what I mean @lindenb
e.g. [ id:'test_reference' ] | ||
- fasta: | ||
type: file | ||
description: Groovy Map containing fasta reference genome information |
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.
description: Groovy Map containing fasta reference genome information | |
description: File containing fasta reference genome information |
e.g. [ id:'test_reference' ] | ||
- fai: | ||
type: file | ||
description: Groovy Map containing fasta index information |
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.
description: Groovy Map containing fasta index information | |
description: File containing fasta index information |
e.g. [ id:'test_reference' ] | ||
- dict: | ||
type: file | ||
description: Groovy Map containing reference genome information for GATK sequence dictionary |
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.
description: Groovy Map containing reference genome information for GATK sequence dictionary | |
description: File containing reference genome information for GATK sequence dictionary |
e.g. [ id:'test_reference' ] | ||
- code: | ||
type: file | ||
description: custom user code . May be empty if script if provided via `task.ext.args2`. |
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.
description: custom user code . May be empty if script if provided via `task.ext.args2`. | |
description: File containing custom user code. May be empty if script if provided via `task.ext.args2`. |
I kept that function There should be no new error now, but with the new version 3.0.0dev of nf-core-tools there is a new lint error. ( That is quite demoralizing, especially as this version is not available on conda and I cannot test/fix this locally)
|
OK this looks good to me now @lindenb thanks for the patience! I agree the failing linting is not nice, I've complained on your behalf. I will force merge :D |
@jfy133 cool ! thanks ! |
* vcffilterdjdk * update params * update params * oppsss tag and TODO * target/region * answers to review * f...g space * fix conda problem https://nfcore.slack.com/archives/CJRH30T6V/p1726233311260959 * add test+bed * reset polyx * prevent test exception md5sum for empty file * update main.nf.test * update meta.yml * remove suggestion --------- Co-authored-by: James A. Fellows Yates <[email protected]>
This module implements jvarkt/vcffilterjdk https://pubmed.ncbi.nlm.nih.gov/29186339/ which filters VCF files using a java expression compiled at runtime. eg:
PR checklist
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