Repository navigation
Copy of mitochondria best practices pipeline - #5566
Conversation
Codecov Report
@@ Coverage Diff @@
## master #5566 +/- ##
===============================================
- Coverage 87.046% 87.034% -0.012%
- Complexity 31524 31535 +11
===============================================
Files 1928 1930 +2
Lines 145340 145443 +103
Branches 16089 16090 +1
===============================================
+ Hits 126513 126585 +72
- Misses 12966 12999 +33
+ Partials 5861 5859 -2
|
|
Do we want a test for this wdl like the others do? |
|
Ok, we have a working test! It runs the plumbing NA12878 through the whole pipeline. @ldgauthier or @jsotobroad this is ready for review (the wdl is a direct copy with one change to add more memory to RevertSam because I tested it with PAPI v2 and it needed more memory than was specified). Thanks! |
jsotobroad
left a comment
There was a problem hiding this comment.
few comments/questions
| @@ -94,7 +94,7 @@ before_install: | |||
| fi; | |||
| # Download Cromwell jar -- if you change the version, please change the CROMWELL_JAR env variable above, too. | |||
There was a problem hiding this comment.
I think you might have to do this
There was a problem hiding this comment.
Is the Cromwell bump necessary for this PR? If so, we should go back and update all other WDLs as appropriate. This is long overdue and would be good to get done before 4.1, anyway.
BTW, does this change the verbosity of the Travis logs?
@droazen @davidbenjamin @LeeTL1220 might want to chime in.
There was a problem hiding this comment.
Yes, the Cromwell bump was necessary to get the mitochondria wdl to work. The only change I needed to make to get the other wdls to work was change the imports in the CNV wdl. At some point they changed to relative paths (the import is now a relative path from the wdl itself). But nothing else I saw needed updating.
There was a problem hiding this comment.
@meganshand I do not know if this will change the verbosity.
| sudo java -jar $CROMWELL_JAR run $WORKING_DIR/gatk/scripts/mutect2_wdl/mutect2_multi_sample.wdl -i $WORKING_DIR/test_m2_wdl_multi_mod_to.json -m $WORKING_DIR/test_m2_wdl_to.metadata | ||
|
|
||
| echo "Running Mitochondria M2 WDL through cromwell" | ||
| sudo java -jar $CROMWELL_JAR run $WORKING_DIR/gatk/scripts/mitochondria_m2_wdl/MitochondriaPipeline.wdl -i $WORKING_DIR/gatk/scripts/m2_cromwell_tests/test_mitochondria_m2_wdl.json --imports $WORKING_DIR/gatk/scripts/mitochondria_m2_wdl/MitochondriaPipelineDependencies.zip -m $WORKING_DIR/test_mitochondria_m2_wdl.metadata |
There was a problem hiding this comment.
should this test be run under .../m2_cromwell_tests/...? (not sure if this is a m2 test or if it should be in its own directory)
There was a problem hiding this comment.
I think it's ok in the m2 tests. It doesn't make the testing take any longer (since the integration tests are still longer than the m2 wdl tests) and I think this keeps the wdl tests cleaner.
| @@ -0,0 +1,169 @@ | |||
| workflow AlignmentPipeline { | |||
| meta { | |||
| description: "Input is an unaligned subset bam of NuMT and chrM reads and their mates. All reads must be paired. Output is aligned duplicate marked coordinate sorted bam." | |||
There was a problem hiding this comment.
This seems like a parameter_meta description 😅 instead of what the pipeline does
|
@samuelklee @meganshand I don't object to any cromwell changes here. We're holding off on all our overdue M2 WDL changes while waiting for Firecloud to adopt WDL 1.0. |
| @@ -94,7 +94,7 @@ before_install: | |||
| fi; | |||
| # Download Cromwell jar -- if you change the version, please change the CROMWELL_JAR env variable above, too. | |||
There was a problem hiding this comment.
@meganshand I do not know if this will change the verbosity.
ldgauthier
left a comment
There was a problem hiding this comment.
Some easy suggestions. The hardest part will be moving the docker images out of personal repos. I'm honestly not sure what the use case for parameters_meta is, but I wanted to make sure you had it where you thought it was necessary.
Did we ever commit the NuMT processing script? That doesn't have to go here, but it should be somewhere quasi-public.
|
|
||
| # set the bash variable needed for the command-line | ||
| bash_ref_fasta=${ref_fasta} | ||
| java -Xms5000m -jar /usr/gitc/picard.jar \ |
There was a problem hiding this comment.
You don't have to lead the charge, but someday we'll update to Barclay args. That's just FYI -- this is fine for now.
| @@ -0,0 +1,28 @@ | |||
| { | |||
| "MitochondriaPipeline.wgs_aligned_input_bam": "input_bam_here", | |||
| "MitochondriaPipeline.autosomal_coverage": 30, | |||
There was a problem hiding this comment.
This should be modified to match the input bam, right? Can you put a comment? Otherwise at first glance it looks like a constant.
| @@ -0,0 +1,217 @@ | |||
| workflow MitochondriaCalling { | |||
| meta { | |||
There was a problem hiding this comment.
The in other WDL there's whitespace before meta, but I'm not a stickler. Should there be parameter_meta here for inputs and outputs? I'm not up on the latest and greatest WDL features.
There was a problem hiding this comment.
I added the whitespace. I think the parameter_meta is optional, just another place for documentation. I'm not inclined to list out every single input and output file (too many reference files), but I can put some documentation for the unclear/major ones.
| File blacklisted_sites_index | ||
| Float? autosomal_coverage | ||
| Float contamination | ||
| #max_read_length is only used for an optimization. If it's too small CollectWgsMetrics might fail, but the results are not effected by this number. |
There was a problem hiding this comment.
effected -> affected (https://www.diffen.com/difference/Affected_vs_Effected) Okay, maybe I'm a stickler sometimes.
There was a problem hiding this comment.
ugh I always get this one wrong
| input_bam: "Aligned Bam" | ||
| gga_vcf: "VCF for genotype given alleles mode" | ||
| prune: "Pruning factor should be approximately (mean coverage / 500)" | ||
| autosomal_coverage: "Median coverage of the autosome for annotating potential polymorphic NuMT variants" |
| Int disk_size = ceil(size(input_bam_regular_ref, "GB") + size(input_bam_shifted_ref, "GB") + size(ref_fasta, "GB") * 2) + 20 | ||
|
|
||
| meta { | ||
| description: "Remove this hack once there's a GVCF solution." |
There was a problem hiding this comment.
:-D This note is a little more useful in the workflow, though.
| runtime { | ||
| disks: "local-disk 10 HDD" | ||
| memory: "1200 MB" | ||
| docker: "mshand/genomesinthecloud:bcftools" |
| #left align the variants | ||
| cmd = """bcftools norm -f ${ref_fasta} pre2_split.vcf > split.vcf""".format(**locals()) | ||
| result, err = Popen([cmd], stdout=PIPE, stderr=PIPE, shell=True).communicate() | ||
| CODE |
There was a problem hiding this comment.
That was terrifying. I'm going to pretend I never saw it so I don't have nightmares. Do we have a long-term solution?
There was a problem hiding this comment.
I should probably remove this from the gatk version, but unfortunately it has to be in the firecloud version for now, since it's for Kristen. I think the long term solution is that hail should be able to handle multi-allelics? I forget where we landed on this.
| preemptible: select_first([preemptible_tries, 5]) | ||
| memory: "3 GB" | ||
| disks: "local-disk " + disk_size + " HDD" | ||
| docker: "jsotobroad/mtdnaserver:latest" |
There was a problem hiding this comment.
I'd rather put this image somewhere else.
There was a problem hiding this comment.
Agreed, but the question was where. Since this will eventually end up in production the idea was that it would eventually end up in the official us.gcr.io/broad-gotc-prod/genomes-in-the-cloud docker images, but it's hard to ask green to make it now before we give them an official pipeline. So for now, this is a public image and eventually we'll be able to update this.
| runtime { | ||
| disks: "local-disk " + disk_size + " HDD" | ||
| memory: "1200 MB" | ||
| docker: "us.gcr.io/broad-gotc-prod/genomes-in-the-cloud:2.4.1-1540490856" |
There was a problem hiding this comment.
Is this private or is it the one gatk-workflows uses?
There was a problem hiding this comment.
This isn't private. It's the official one from production. It also looks like gatk-worfkows uses it.
|
@ldgauthier Back to you! |
|
@ldgauthier Tests are now passing and we no longer have a personal docker image in the wdl. Back to you! |
| @@ -0,0 +1,217 @@ | |||
| workflow MitochondriaCalling { | |||
| meta { | |||
@ldgauthier or @jsotobroad Could you take a quick look? This is a direct copy of the wdls in the spec-ops repo.