Added convenience methods to check/get the ID of the VariantContext
git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@4578 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
parent
a7af1a164b
commit
52fc023d80
|
|
@ -403,8 +403,8 @@ public class VariantContextUtils {
|
|||
//
|
||||
if ( vc.hasAttribute(VCFConstants.DEPTH_KEY) )
|
||||
depth += Integer.valueOf(vc.getAttributeAsString(VCFConstants.DEPTH_KEY));
|
||||
if ( rsID == null && vc.hasAttribute(VariantContext.ID_KEY) )
|
||||
rsID = vc.getAttributeAsString(VariantContext.ID_KEY);
|
||||
if ( rsID == null && vc.hasID() )
|
||||
rsID = vc.getID();
|
||||
|
||||
for ( Map.Entry<String, Object> p : vc.getAttributes().entrySet() ) {
|
||||
String key = p.getKey();
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ public class AnnotationDataManager {
|
|||
treeSet.add(datum);
|
||||
}
|
||||
|
||||
final boolean isNovelVariant = !infoField.get(VariantContext.ID_KEY).toString().contains("rs");
|
||||
final boolean isNovelVariant = !vc.hasID() || !vc.getID().contains("rs");
|
||||
|
||||
// Decide if the variant is a transition or transversion
|
||||
if( VariantContextUtils.getSNPSubstitutionType(vc).compareTo(BaseUtils.BaseSubstitutionType.TRANSITION) == 0 ) {
|
||||
|
|
|
|||
|
|
@ -402,7 +402,7 @@ public class VariantEvalWalker extends RodWalker<Integer, Integer> implements Tr
|
|||
}
|
||||
|
||||
private boolean excludeComp(VariantContext vc) {
|
||||
String id = vc != null && vc.hasAttribute(VariantContext.ID_KEY) ? vc.getAttributeAsString(VariantContext.ID_KEY) : null;
|
||||
String id = vc != null && vc.hasID() ? vc.getID() : null;
|
||||
boolean ex = rsIDsToExclude != null && id != null && rsIDsToExclude.contains(id);
|
||||
//System.out.printf("Testing id %s ex=%b against %s%n", id, ex, vc);
|
||||
return ex;
|
||||
|
|
|
|||
Loading…
Reference in New Issue