Uses VCFConstants instead of hard-coded constants

git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@4547 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
fromer 2010-10-21 19:49:01 +00:00
parent 883b8ff80e
commit 60f88866dd
1 changed files with 5 additions and 3 deletions

View File

@ -795,7 +795,7 @@ public class VariantContextUtils {
String mergedName = VariantContextUtils.mergeVariantContextNames(vc1.getName(), vc2.getName());
double mergedNegLog10PError = Math.max(vc1.getNegLog10PError(), vc2.getNegLog10PError());
Set<String> mergedFilters = new HashSet<String>(); // Since vc1 and vc2 were unfiltered, the merged record remains unfiltered
Map<String, Object> mergedAttribs = VariantContextUtils.mergeVariantContextAttributes(vc1.getAttributes(), vc2.getAttributes(), allMergedAlleles);
Map<String, Object> mergedAttribs = VariantContextUtils.mergeVariantContextAttributes(vc1.getAttributes(), vc2.getAttributes());
if (mergedAttribs == null)
return null;
@ -815,7 +815,7 @@ public class VariantContextUtils {
return name1 + "_" + name2;
}
private static Map<String, Object> mergeVariantContextAttributes(Map<String, Object> attribs1, Map<String, Object> attribs2, Set<Allele> allMergedAlleles) {
private static Map<String, Object> mergeVariantContextAttributes(Map<String, Object> attribs1, Map<String, Object> attribs2) {
Map<String, Object> mergedAttribs = new HashMap<String, Object>();
List<Map<String, Object>> attribsList = new LinkedList<Map<String, Object>>();
@ -829,6 +829,8 @@ public class VariantContextUtils {
Boolean val = getBooleanAttribute(attribs, orAttrib);
if (val != null)
attribVal = (attribVal || val);
if (attribVal) // already true, so no reason to continue:
break;
}
mergedAttribs.put(orAttrib, attribVal);
}
@ -841,7 +843,7 @@ public class VariantContextUtils {
if (iDVal == null)
iDVal = val;
else
iDVal += ";" + val;
iDVal += VCFConstants.ID_FIELD_SEPARATOR + val;
}
}
if (iDVal != null)