Bug fix in AnalyzeAnnotations. Be sure the site is a biallelic, unfiltered SNP.
git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@4400 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
parent
7639692e5b
commit
b83fdf8a17
|
|
@ -107,18 +107,23 @@ public class AnalyzeAnnotationsWalker extends RodWalker<Integer, Integer> {
|
||||||
boolean isInTruthSet = false;
|
boolean isInTruthSet = false;
|
||||||
boolean isTrueVariant = false;
|
boolean isTrueVariant = false;
|
||||||
for ( VariantContext vc : VCs ) {
|
for ( VariantContext vc : VCs ) {
|
||||||
if( vc.getName().toUpperCase().startsWith("TRUTH") ) {
|
if( vc != null && vc.isSNP() && !vc.isFiltered() ) {
|
||||||
isInTruthSet = true;
|
if( vc.getName().toUpperCase().startsWith("TRUTH") ) {
|
||||||
if (vc.isVariant())
|
isInTruthSet = true;
|
||||||
isTrueVariant = true;
|
if( vc.isBiallelic() && vc.isVariant() ) {
|
||||||
|
isTrueVariant = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add each annotation in this VCF Record to the dataManager
|
// Add each annotation in this VCF Record to the dataManager
|
||||||
for ( VariantContext vc : VCs ) {
|
for ( VariantContext vc : VCs ) {
|
||||||
if( !vc.getName().toUpperCase().startsWith("TRUTH") ) {
|
if( vc != null && vc.isSNP() && vc.isBiallelic() && !vc.isFiltered() ) {
|
||||||
if( vc.isVariant() ) {
|
if( !vc.getName().toUpperCase().startsWith("TRUTH") ) {
|
||||||
dataManager.addAnnotations( vc, SAMPLE_NAME, isInTruthSet, isTrueVariant );
|
if( vc.isVariant() ) {
|
||||||
|
dataManager.addAnnotations( vc, SAMPLE_NAME, isInTruthSet, isTrueVariant );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -89,12 +89,10 @@ public class AnnotationDataManager {
|
||||||
final boolean isNovelVariant = !infoField.get(VariantContext.ID_KEY).toString().contains("rs");
|
final boolean isNovelVariant = !infoField.get(VariantContext.ID_KEY).toString().contains("rs");
|
||||||
|
|
||||||
// Decide if the variant is a transition or transversion
|
// Decide if the variant is a transition or transversion
|
||||||
if ( vc.isSNP() ) {
|
if( VariantContextUtils.getSNPSubstitutionType(vc).compareTo(BaseUtils.BaseSubstitutionType.TRANSITION) == 0 ) {
|
||||||
if( VariantContextUtils.getSNPSubstitutionType(vc).compareTo(BaseUtils.BaseSubstitutionType.TRANSITION) == 0 ) {
|
datum.incrementTi( isNovelVariant, isInTruthSet, isTrueVariant );
|
||||||
datum.incrementTi( isNovelVariant, isInTruthSet, isTrueVariant );
|
} else {
|
||||||
} else {
|
datum.incrementTv( isNovelVariant, isInTruthSet, isTrueVariant );
|
||||||
datum.incrementTv( isNovelVariant, isInTruthSet, isTrueVariant );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue