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:
Eric Banks 2011-09-07 14:01:42 -04:00
parent ee9d599558
commit 3a04955a30
1 changed files with 1 additions and 1 deletions

View File

@ -983,7 +983,7 @@ public class VariantContext implements Feature { // to enable tribble intergrati
* @return true if it's monomorphic
*/
public boolean isMonomorphic() {
return ! isVariant() || getChromosomeCount(getReference()) == getChromosomeCount();
return ! isVariant() || (hasGenotypes() && getHomRefCount() + getNoCallCount() == getNSamples());
}
/**