Much clearer (and, like, not totally incorrect) implementation of isNovel

git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@2725 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
chartl 2010-01-28 21:16:21 +00:00
parent 8de6a8d246
commit 7a10c40fb3
1 changed files with 10 additions and 1 deletions

View File

@ -325,7 +325,16 @@ public class VCFRecord implements Variation, VariantBackedByGenotype {
}
public boolean isNovel() {
return ( mID != null || mInfoFields.get(HAPMAP2_KEY) != null || mInfoFields.get(HAPMAP3_KEY) != null || mInfoFields.get(DBSNP_KEY) != null);
return mID == null && ! isInHapmap();
}
public boolean isInHapmap() {
boolean inHapmap;
if ( mInfoFields.get(HAPMAP2_KEY) != null && mInfoFields.get(HAPMAP2_KEY).equals("1") ) {
return true;
} else {
return ( mInfoFields.get(HAPMAP3_KEY) != null && mInfoFields.get(HAPMAP3_KEY).equals("1") );
}
}
public char getAlternativeBaseForSNP() {