-
Notifications
You must be signed in to change notification settings - Fork 593
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
Reference Compatibility tool #7959
Conversation
Codecov Report
@@ Coverage Diff @@
## master #7959 +/- ##
===============================================
- Coverage 87.062% 86.700% -0.362%
- Complexity 37007 38450 +1443
===============================================
Files 2218 2310 +92
Lines 173758 180344 +6586
Branches 18769 19841 +1072
===============================================
+ Hits 151277 156358 +5081
- Misses 15896 17042 +1146
- Partials 6585 6944 +359
|
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.
Oerall I think this is in good shape. A bunch of minor comments and some medium sized comments about how the tool is structured.
oneLineSummary = "", | ||
programGroup = ReferenceProgramGroup.class | ||
) | ||
|
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.
@DocumentedFeature, @ExperimentalFeature
|
||
@CommandLineProgramProperties( | ||
summary = "", | ||
oneLineSummary = "", |
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.
summaries
src/main/java/org/broadinstitute/hellbender/tools/reference/CheckReferenceCompatibility.java
Show resolved
Hide resolved
|
||
private void initializeSequenceDictionaryForInput(){ | ||
// BAMs/CRAMs | ||
if(hasReads() ^ vcfPath != null){ |
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.
There needs to be a check here that fails if both are specified for right now. Currently this falls off the bottom with empty inputs i think.
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 would rework the if statements here to first check if the inputs are valid, then maybe handle reads, then maybe handle vcfs checking explicitly each time. Then put a check at the bottom to throw an exception of nothing got set for some reason (indcating that there was no input).
if(hasReads() ^ vcfPath != null){ | ||
if (hasReads()) { | ||
if (readArguments.getReadPathSpecifiers().size() > 1) { | ||
throw new UserException.BadInput("Tool analyzes one BAM at a time."); |
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.
BAM -> "Reads Input"
src/main/java/org/broadinstitute/hellbender/tools/reference/CheckReferenceCompatibility.java
Show resolved
Hide resolved
src/main/java/org/broadinstitute/hellbender/tools/reference/CheckReferenceCompatibility.java
Show resolved
Hide resolved
...rg/broadinstitute/hellbender/tools/reference/CheckReferenceCompatibilityIntegrationTest.java
Show resolved
Hide resolved
runCommandLine(args); | ||
} | ||
|
||
// TODO: compatibility based on MD5 faulty since MD5s not in sequence dictionary (see ticket #730 "VCFHeader drops sequence dictionary attributes") |
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.
Since #730 is in another repository (htsjdk) make this the full link since this is going to be confusing.
|
||
// for quick stdout testing | ||
@Test(enabled = false) | ||
public void testStdOutput() throws IOException{ |
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 would probably get rid of this before merging this branch.
Github actions tests reported job failures from actions build 2748430417
|
063d164
to
5648af9
Compare
@@ -45,9 +48,9 @@ | |||
* <pre> | |||
* #Current Reference: reads_data_source_test1_withmd5s_missingchr1.bam | |||
* Reference Compatibility |
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.
you forgot to update the table line here.
} | ||
// VCFs | ||
else { | ||
try(final FeatureDataSource<VariantContext> vcfReader = new FeatureDataSource<>(vcfPath.toString())){ | ||
try (final FeatureDataSource<VariantContext> vcfReader = new FeatureDataSource<>(vcfPath.toString())) { |
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.
Make this explicitly check for VCF in this else statement. vcfPath.toString()
can still throw a null pointer exception if you get here in the code without specifying either VCF OR a bam.
//final File output = createTempFile("testReferenceCompatibilityMultipleReferencesWithMD5s", ".table"); | ||
final File expectedOutput = new File(getToolTestDataDir(), "expected.testReferenceCompatibilityMultipleReferencesBAMWithMD5s.table"); | ||
@Test(expectedExceptions = UserException.BadInput.class) | ||
public void testReferenceCompatibilityBAMandVCF() throws IOException { |
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.
add one for neither bam or vcf as well.
private final GATKPath ref; | ||
private final Compatibility status; | ||
|
||
private enum Compatibility{ |
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.
rename this to CompatibilityStatus,
5648af9
to
44dfc50
Compare
…encePairsAgainstDictionary()
44dfc50
to
42fac0f
Compare
Tool to determine compatibility of a provided BAM/CRAM/VCF against provided references.