We already had isPolymorphic and isMonomorphic in the VariantContext, but the implementation was incorrect for many edge cases (e.g. sites-only files, sites with samples who were no-called). Fixing. Moving on to VE now.
This commit is contained in:
parent
ee9d599558
commit
3a04955a30
|
|
@ -983,7 +983,7 @@ public class VariantContext implements Feature { // to enable tribble intergrati
|
||||||
* @return true if it's monomorphic
|
* @return true if it's monomorphic
|
||||||
*/
|
*/
|
||||||
public boolean isMonomorphic() {
|
public boolean isMonomorphic() {
|
||||||
return ! isVariant() || getChromosomeCount(getReference()) == getChromosomeCount();
|
return ! isVariant() || (hasGenotypes() && getHomRefCount() + getNoCallCount() == getNSamples());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue