Remove RefSeq INFO from MNPs since annotating them properly
git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@4784 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
parent
4719bbc772
commit
6d4ec7f9e7
|
|
@ -190,7 +190,7 @@ public class AnnotateMNPsWalker extends RodWalker<Integer, Integer> {
|
||||||
logger.debug("Current list of per-locus features\n" + locusToRefSeqFeatures);
|
logger.debug("Current list of per-locus features\n" + locusToRefSeqFeatures);
|
||||||
|
|
||||||
Map<String, Object> MNPannotations = annotateMNP(vc);
|
Map<String, Object> MNPannotations = annotateMNP(vc);
|
||||||
MNPannotations.putAll(vc.getAttributes());
|
MNPannotations.putAll(RefSeqDataParser.removeRefSeqAttributes(vc.getAttributes())); // remove any RefSeq INFO, since adding it in more thoroughly here
|
||||||
vc = VariantContext.modifyAttributes(vc, MNPannotations);
|
vc = VariantContext.modifyAttributes(vc, MNPannotations);
|
||||||
writeVCF(vc);
|
writeVCF(vc);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -132,6 +132,19 @@ public class RefSeqDataParser {
|
||||||
return refSeqNameAttribs;
|
return refSeqNameAttribs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static Map<String, Object> removeRefSeqAttributes(Map<String, Object> attributes) {
|
||||||
|
Map<String, Object> removedRefSeqAttributes = new HashMap<String, Object>(attributes);
|
||||||
|
|
||||||
|
Iterator<Map.Entry<String, Object>> attrIt = removedRefSeqAttributes.entrySet().iterator();
|
||||||
|
while (attrIt.hasNext()) {
|
||||||
|
String key = attrIt.next().getKey();
|
||||||
|
if (key.startsWith(REFSEQ_PREFIX))
|
||||||
|
attrIt.remove();
|
||||||
|
}
|
||||||
|
|
||||||
|
return removedRefSeqAttributes;
|
||||||
|
}
|
||||||
|
|
||||||
private static Map<String, RefSeqEntry> getAllRefSeqEntriesByName(VariantContext vc) {
|
private static Map<String, RefSeqEntry> getAllRefSeqEntriesByName(VariantContext vc) {
|
||||||
Map<String, RefSeqEntry> nameToEntries = new TreeMap<String, RefSeqEntry>();
|
Map<String, RefSeqEntry> nameToEntries = new TreeMap<String, RefSeqEntry>();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue