-
Notifications
You must be signed in to change notification settings - Fork 596
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 plotting for ModelSegments CNV pipeline. #3729
Conversation
/** | ||
* @author Samuel Lee <slee@broadinstitute.org> | ||
*/ | ||
final class PlottingUtils { |
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.
Note to self: add parameter validation to the methods in this class, just for consistency.
Codecov Report
@@ Coverage Diff @@
## master #3729 +/- ##
===============================================
- Coverage 79.642% 79.632% -0.011%
- Complexity 17608 17872 +264
===============================================
Files 1138 1146 +8
Lines 63529 64546 +1017
Branches 9693 9882 +189
===============================================
+ Hits 50596 51399 +803
- Misses 9057 9251 +194
- Partials 3876 3896 +20
|
@LeeTL1220 Do you mind reviewing the second commit? Most of it consists of lightly edited code that is already in master, so hopefully the review should be quick. |
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.
Comments are pretty minor. Also, a question or two...
private void checkRegularReadableUserFiles() { | ||
Utils.nonNull(outputPrefix); | ||
IOUtils.canReadFile(inputStandardizedCopyRatiosFile); | ||
IOUtils.canReadFile(inputDenoisedCopyRatiosFile); |
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 this work if the input file is not specified?
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 input files are optional)
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.
Whoops, they should not be.
* <h3>Example</h3> | ||
* | ||
* <pre> | ||
* gatk-launch --javaOptions "-Xmx4g" PlotACNVResults \ |
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 command line correct? PlotACNVResults
?
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.
Good catch.
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 also need to update the rest of this javadoc.
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.
Updated the javadoc for PlotDenoisedCopyRatios as well.
Assert.assertTrue(new File(outputDir, OUTPUT_PREFIX + ".deltaMAD.txt").length() > 0); | ||
Assert.assertTrue(new File(outputDir, OUTPUT_PREFIX + ".scaledDeltaMAD.txt").exists()); | ||
Assert.assertTrue(new File(outputDir, OUTPUT_PREFIX + ".scaledDeltaMAD.txt").length() > 0); | ||
final double standardizedMAD = ParamUtils.readValuesFromFile(new File(outputDir, OUTPUT_PREFIX + ".standardizedMAD.txt"))[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.
Are these MAD numbers akin to the old qc metric?
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.
They are exactly the same. I figured that changing the name of the metric to be descriptive/informative couldn't hurt. Let me know which of these files we can do away with, if any (do we really need both scaleDeltaMAD and scaledMAD, for 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.
It really does make some of our collaborator's lives easier to have all of those....
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 problem. I think it might make sense to move the emission of these to DenoiseReadCounts, eventually.
@@ -0,0 +1,167 @@ | |||
package org.broadinstitute.hellbender.tools.copynumber.plotting; |
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 assuming that you have looked at the plots themselves to ensure that they are okay...
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.
Yup!
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.
Great... ignore this comment then.
write.table(round((standardizedMAD - denoisedMAD) / standardizedMAD, 3), file.path(output_dir, paste(output_prefix, ".scaledDeltaMAD.txt", sep="")), col.names=FALSE, row.names=FALSE) | ||
|
||
#plot standardized and denoised copy ratio on top of each other | ||
pre_color_blue="#3B5DFF" |
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.
Note to self, white space.
Will merge once @asmirnov239 reviews #3716. |
@samuelklee Looks good to me. |
09fb1bf
to
1328be4
Compare
1328be4
to
8c22183
Compare
This is rebased off of #3716, since it depends on code there. Hence, only the second commit needs to be reviewed in this PR.
The code and tests are quite similar to that for PlotSegmentedCopyRatio/PlotACNVResults. However, I've changed the R scripts to be more efficient (WGS plots no longer take several hours). Furthermore, PlotModeledSegments is more flexible than PlotACNVResults in that it plots CR, AF, or both on the fly depending on the available inputs. I've also added some more input validation, changed some terminology, and moved over to data.table for reading TSVs in R.