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

Updated WDL generation, upgrade to Barclay 4.0. #6800

Merged
merged 42 commits into from
Sep 21, 2020
Merged

Conversation

cmnbroad
Copy link
Collaborator

@cmnbroad cmnbroad commented Sep 8, 2020

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

@cmnbroad cmnbroad requested a review from droazen September 8, 2020 15:17
@gatk-bot
Copy link

gatk-bot commented Sep 8, 2020

Travis reported job failures from build 31339
Failures in the following jobs:

Test Type JDK Job ID Logs
integration openjdk11 31339.12 logs
integration openjdk8 31339.2 logs

Copy link
Contributor

@droazen droazen left a 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
Copy link
Contributor

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

Copy link
Collaborator Author

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.

Copy link
Contributor

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.

Copy link
Collaborator Author

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")
Copy link
Contributor

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?

Copy link
Collaborator Author

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) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Fix indentation here

Copy link
Contributor

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?

Copy link
Collaborator Author

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);
Copy link
Contributor

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?

Copy link
Collaborator Author

@cmnbroad cmnbroad Sep 8, 2020

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})
Copy link
Contributor

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!

Copy link
Collaborator Author

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)
Copy link
Contributor

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?

Copy link
Collaborator Author

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"})
Copy link
Contributor

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?

Copy link
Collaborator Author

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) {
Copy link
Contributor

Choose a reason for hiding this comment

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

private?

Copy link
Collaborator Author

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
Copy link
Contributor

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.

Copy link
Collaborator Author

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.
Copy link
Contributor

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?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Oh - fixed.

@gatk-bot
Copy link

gatk-bot commented Sep 9, 2020

Travis reported job failures from build 31349
Failures in the following jobs:

Test Type JDK Job ID Logs
cloud openjdk8 31349.1 logs
integration openjdk11 31349.12 logs
integration openjdk8 31349.2 logs

@cmnbroad
Copy link
Collaborator Author

cmnbroad commented Sep 9, 2020

Back to @droazen.

@gatk-bot
Copy link

gatk-bot commented Sep 9, 2020

Travis reported job failures from build 31358
Failures in the following jobs:

Test Type JDK Job ID Logs
integration openjdk11 31358.12 logs
integration openjdk8 31358.2 logs

@cmnbroad cmnbroad force-pushed the cn_wdl_fixes_barclay branch from 3608f07 to 4bfbc9f Compare September 9, 2020 21:14
@cmnbroad
Copy link
Collaborator Author

cmnbroad commented Sep 9, 2020

@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.

@gatk-bot
Copy link

gatk-bot commented Sep 9, 2020

Travis reported job failures from build 31368
Failures in the following jobs:

Test Type JDK Job ID Logs
cloud openjdk8 31368.1 logs

Copy link
Contributor

@droazen droazen left a 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)
// }
Copy link
Contributor

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?

Copy link
Collaborator Author

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)
Copy link
Contributor

Choose a reason for hiding this comment

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

getWLDInputJSON -> getWDLInputJSON

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fixed.

@droazen droazen removed their assignment Sep 16, 2020
@cmnbroad cmnbroad force-pushed the cn_wdl_fixes_barclay branch from 4bfbc9f to cc1f618 Compare September 21, 2020 12:13
@cmnbroad cmnbroad merged commit 21ca91a into master Sep 21, 2020
@cmnbroad cmnbroad deleted the cn_wdl_fixes_barclay branch September 21, 2020 14:10
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