-
Notifications
You must be signed in to change notification settings - Fork 597
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
Updated WDL generation, upgrade to Barclay 4.0. #6800
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.
@cmnbroad Back to you with my comments
build.gradle
Outdated
} | ||
|
||
task gatkWDLGenValidation(dependsOn: [gatkWDLGen, shadowJar]) { | ||
// running this task requires a local cromwell installation, with environment variables CROMWELL_JAR, | ||
// WOMTOOL_JAR set to the jar locations |
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.
Can you add a new section to the README on WDL generation? For now, just the essential instructions on how to run it, anything users might need to know about the output WDLs, and a section for developers on how to write the annotations (including examples for BAM and FASTA inputs/outputs, and also an example of a directory output).
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.
Done. I put the build instructions in the readme, along with a link to the wiki article on the annotations. I'm not sure what you mean by "an example of a directory output". There isn't anything special required for WDL or @Argument
annotations for an input or output that is a directory - its all in the code used by the tool to process 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.
If I have a tool output that is a directory, I need to know how to write the Workflow annotation for it. If there's nothing special required, the docs should make that clear with an example.
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.
build.gradle
Outdated
// running this task requires a local cromwell installation, with environment variables CROMWELL_JAR, | ||
// WOMTOOL_JAR set to the jar locations | ||
if (System.getenv('CROMWELL_JAR') == null || System.getenv('WOMTOOL_JAR') == null) { | ||
logger.warn("Running this task requires the CROMWELL_JAR and WOMTOOL_JAR environment variables to be set") |
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 a warning that you can recover from, or should it be a fatal error?
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 recoverable, so I made it throw. I had to move it into a doFirst
closure though so it only happens when this task is actually executed - it probably should have been that way anyway.
* @return true if program should be executed, false if an information only argument like {@link SpecialArgumentsCollection#HELP_FULLNAME} was specified | ||
* @throws CommandLineException if command line validation fails | ||
*/ | ||
protected boolean parseArgs(final String[] argv) { |
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.
Fix indentation 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.
Also, I assume you removed final
because you actually had to override this method?
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.
Yes, but I wound up not needing to do so. Restored the final
and indentation fixed.
* @throws CommandLineException if command line argument validation fails | ||
*/ | ||
protected boolean validateArgs(final String[] argv) { | ||
return picardCommandLineProgram.getCommandLineParser().parseArguments(System.out, argv); |
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.
Will the Picard command-line validation recognize both legacy and POSIX syntax?
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.
No, but only because we never use the legacy parser in gatk. There was a PR a few weeks ago that changed that, but those changes were abandoned.
@Argument(fullName = StandardArgumentDefinitions.REFERENCE_LONG_NAME, shortName = StandardArgumentDefinitions.REFERENCE_SHORT_NAME, doc = "Reference sequence", optional = true) | ||
@WorkflowInput(requiredCompanions = { StandardArgumentDefinitions.REFERENCE_INDEX_COMPANION, StandardArgumentDefinitions.REFERENCE_DICTIONARY_COMPANION}) |
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 annotations look a lot better than before!
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.
Yeah, they do.
shortName = "requiredListFileInput", | ||
doc = "requiredListFileInput doc", | ||
optional = false) | ||
@WorkflowInput(requiredCompanions={"requiredListFileInputDictionary", "requiredListFileInputIndex"}, localizationOptional = true) |
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.
Can you include at least one @WorkflowInput
/ @WorkflowOutput
in this test class that does not have any companion 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.
Done.
shortName = "optionalListFileOutput", | ||
doc = "optionalListFileOutput doc", | ||
optional = true) | ||
@WorkflowOutput(requiredCompanions={"optionalListFileOutputDictionary", "optionalListFileOutputIndex"}) |
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.
No test coverage for optionalCompanions
?
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.
Oh wow - done. I also added some mixed companions cases.
@Test | ||
public static void wdlGenSmokeTest() { | ||
final File wdlTestTarget = createTempDir("wdlgentest"); | ||
public void doWDLGenTest(List<String> testPackages, final String sourcePath, final File wdlTestTargetDir) { |
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.
private?
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.
Done, all.
@@ -0,0 +1,284 @@ | |||
version 1.0 |
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.
Expected results files should be clearly labeled as such, either by being put into a directory with "expected" in the name, or by having "expected" in their file names.
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.
Done.
<a href="https://gatkforums.broadinstitute.org/gatk/">Support Forum</a> | ||
</p> | ||
|
||
<p class="version">GATK version 1.1-111 built at 2016/11/11 11:11:11. |
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.
GATK version 1.1-111?
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.
Oh - fixed.
Back to @droazen. |
3608f07
to
4bfbc9f
Compare
@droazen I rebased this on master to pick up the disabling of htsget tests so it can pass tests. I think I responded to everything - feel free to merge if so. |
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.
@cmnbroad This is approved for merge after you address my remaining comments below. There is one section of commented-out code in build.gradle
that looks suspicious to me.
build.gradle
Outdated
// wdlFiles.any() { wdlFile -> | ||
// final validateWDLCommand = "java -jar $womtoolLocation validate $wdlFile" | ||
// execWDLValidation(validateWDLCommand) | ||
// } |
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 you left the womtool validation step commented out -- was this intentional?
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.
Oh good catch- it was a temporary shortcut and not intentional. Fixed.
build.gradle
Outdated
final cromwellLocation = System.getenv('CROMWELL_JAR') | ||
try { | ||
wdlFiles.any() { wdlFile -> | ||
final testInputJSON = getWLDInputJSONTestFileNameFromWDLName(wdlFile) |
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.
getWLDInputJSON -> getWDLInputJSON
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.
Fixed.
4bfbc9f
to
cc1f618
Compare
…ng of jopt option clustering.
This reverts commit 9770001.
…e existing test case naming convention.
The last commit adds WDL annotations to a number of new tools. Might be best to review that separately (or we can even move it to a separate PR - I just wanted it here to force increased WDL gen test coverage).