-
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
Add haploid support to GnarlyGenotyper #7750
Conversation
|
||
for ( final Genotype g : vc.getGenotypes() ) { | ||
final String name = g.getSampleName(); | ||
if(g.getPloidy() != ASSUMED_PLOIDY && !isGDBnoCall(g)) { | ||
/*if(g.getPloidy() != ASSUMED_PLOIDY && !isGDBnoCall(g)) { |
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.
can delete this commented out section
/** | ||
* Some legacy versions of GenomicsDB report no-calls as `0` or `.` | ||
* @param g genotype to check | ||
* @return true if this is a genotype that should be represented as a ploidy-aware, spec compliant no-call | ||
*/ | ||
private static boolean isGDBnoCall(final Genotype g) { | ||
return g.getPloidy() == 1 && (g.getAllele(0).isReference() || g.getAllele(0).isNoCall()); | ||
//return g.getPloidy() == 1 && (g.getAllele(0).isReference() || g.getAllele(0).isNoCall()); |
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.
can remove this line
gb.attribute(GATKVCFConstants.GENOTYPE_QUALITY_BY_ALT_CONFIDENCE, ALTGQ); | ||
gb.noPL(); | ||
} | ||
|
||
/** | ||
* Some legacy versions of GenomicsDB report no-calls as `0` or `.` | ||
* @param g genotype to check | ||
* @return true if this is a genotype that should be represented as a ploidy-aware, spec compliant no-call |
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 think you can update this comment since it's no longer checking the ploidy
@@ -1,5 +1,8 @@ | |||
package org.broadinstitute.hellbender.tools.walkers; | |||
|
|||
import com.google.errorprone.annotations.Var; |
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.
unused import
@@ -217,4 +224,26 @@ public void testOnEmptyAnnotations() { | |||
Assert.assertEquals(sors.get(1), VCFConstants.MISSING_VALUE_v4); | |||
} | |||
|
|||
@Test | |||
public void testHaploidInput() { | |||
final File haploidGVCF = new File(getToolTestDataDir(), "haploid.mini.g.vcf"); |
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 think haploid.mini.g.vcf
is missing
ca3abf3
to
56f8dd4
Compare
Github actions tests reported job failures from actions build 5533855739
|
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.
👍 One quick question about a commented out test
@@ -53,13 +53,19 @@ public void assertThatExpectedOutputUpdateToggleIsDisabled() { | |||
@DataProvider(name="VCFdata") | |||
public Object[][] getVCFdata() { | |||
return new Object[][]{ | |||
/* |
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.
Did you want this to be commented out?
Addresses #7690