-
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
ExtractCohort supports -XL exclusion and follows intervals, other optimizations #7181
Conversation
...org/broadinstitute/hellbender/tools/variantdb/nextgen/ExtractCohortFilterRecordUnitTest.java
Outdated
Show resolved
Hide resolved
|
||
@Test | ||
public void testGetContig() { | ||
String expectedContig = "chr1"; |
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 it preferred to define these single-use objects explicitly or just stick "chr1" into the assertion statement directly?
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.
either way is fine. I tend to put them right in the assertion so it's easier to read if I'm not also using it to construct the test data. In that case I pull it out so I don't have "chr1"
repeated throughout the 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.
yeah reading the rest of these tests I would just inline it into the assert for readability
...org/broadinstitute/hellbender/tools/variantdb/nextgen/ExtractCohortFilterRecordUnitTest.java
Outdated
Show resolved
Hide resolved
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 refactoring
src/main/java/org/broadinstitute/hellbender/tools/variantdb/nextgen/ExtractCohort.java
Outdated
Show resolved
Hide resolved
final Allele alt = Allele.create(queryRow.get("alt").toString(), false); | ||
final ExtractCohortFilterRecord filterRow = new ExtractCohortFilterRecord( queryRow ); | ||
|
||
final long location = filterRow.getLocation(); |
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.
So lovely!
src/main/java/org/broadinstitute/hellbender/tools/variantdb/nextgen/ExtractCohortEngine.java
Outdated
Show resolved
Hide resolved
sampleRecords.add(new QueryRecord(row)); | ||
|
||
// TODO remove queryMode entirely from ExtractTool | ||
throw new NotImplementedException("QUERY mode not supported. Please use `--query-mode LOCAL_SORT`."); |
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.
Yassssss!
src/main/java/org/broadinstitute/hellbender/tools/variantdb/nextgen/ExtractCohortEngine.java
Outdated
Show resolved
Hide resolved
...org/broadinstitute/hellbender/tools/variantdb/nextgen/ExtractCohortFilterRecordUnitTest.java
Outdated
Show resolved
Hide resolved
|
||
@Test | ||
public void testGetContig() { | ||
String expectedContig = "chr1"; |
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.
either way is fine. I tend to put them right in the assertion so it's easier to read if I'm not also using it to construct the test data. In that case I pull it out so I don't have "chr1"
repeated throughout the method
|
||
@Test | ||
public void testGetContig() { | ||
String expectedContig = "chr1"; |
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 reading the rest of these tests I would just inline it into the assert for readability
.../java/org/broadinstitute/hellbender/tools/variantdb/nextgen/ExtractCohortRecordUnitTest.java
Outdated
Show resolved
Hide resolved
.../java/org/broadinstitute/hellbender/tools/variantdb/nextgen/ExtractCohortRecordUnitTest.java
Outdated
Show resolved
Hide resolved
5b065b1
to
22fe7fc
Compare
22fe7fc
to
fc31d94
Compare
ExtractCohortRecord
andExtractCohortFilterRecord
that implementLocatable
Locatable
s, can useOverlapDetector
to filter locations down to only desired intervals (including excluded sites)QUERY
and associated querying from options