-
Notifications
You must be signed in to change notification settings - Fork 3
✈️ ica pilot #197
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
base: master
Are you sure you want to change the base?
✈️ ica pilot #197
Conversation
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 mostly good, have a couple areas in the comments where I'd like some clarification before approving
when: $(inputs.input[3] != null) | ||
when: $(inputs.run_step != null) | ||
in: | ||
run_step: supplement_vcfs |
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.
Ah, ok, kind of doing like a variable assignment for clarity instead of referring to an array position, nice
} | ||
if (inputs.flag != "N"){ | ||
cmd += "bedtools intersect -a " + inputs.input_vcf.path + " -b " + inputs.input_bed_file.path + " -header -wa > " + out_vcf + " && "; | ||
cmd += "bedtools intersect -a " + (inputs.input_vcf ? inputs.input_vcf.path : "") + " -b " + inputs.input_bed_file.path + " -header -wa > " + out_vcf + " && "; |
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.
Hmmm, if inputs.input_vcf
is null, then give empty string to -a
? How does that work?
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 to get around a "null has no attribute path" error. In reality if the input_vcf is not provided, we'll have exited anyway.
if (ary != null){ | ||
for(var i = 0; i < ary.length; i++) { | ||
if(Array.isArray(ary[i])) { | ||
ret = ret.concat(flatten(ary[i])); |
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.
love a recursion
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.
Dangerous if we have infinitely nested lists 🐰
|
||
} | ||
} | ||
return '' |
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.
Why not return com
?
source: [strelka2/strelka2_protected_outputs, mutect2/mutect2_protected_outputs, lancet_input_vcf] | ||
valueFrom: | | ||
$(self.filter(function(e) { return e != null }).map(function(e) { return e.filter(function(i) { return i.basename.search(/(.vcf|.vcf.gz)$/) != -1 }) }).reduce(function(a,c) { return a.concat(c) })) | ||
$(self.filter(function(e) { return e != null }).map(function(e) { return e.filter(function(i) { return i.basename.search(/(.vcf|.vcf.gz)$/) != -1 }) }).reduce(function(a,c) { return a.concat(c) }, [])) |
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 always found these one-liner formats to be so difficult to read
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.
LGTM!
Description
Feel free to ignore the packed workflow in the review. It's just there to expedite workflow updating for ICA.
Made the following changes:
Part of https://d3b.atlassian.net/browse/BIXU-3907
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Test Configuration:
Checklist: