VariantAnnotator now adds dbsnp id if a dbsnp rod is supplied and it's not already set for a record
git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@2100 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
parent
b434c1c240
commit
2a5349d886
|
|
@ -215,6 +215,12 @@ public class VariantAnnotator extends RodWalker<Integer, Integer> {
|
||||||
VCFRecord rec = getVCFRecord(tracker, ref, context, variant);
|
VCFRecord rec = getVCFRecord(tracker, ref, context, variant);
|
||||||
if ( rec != null ) {
|
if ( rec != null ) {
|
||||||
rec.addInfoFields(annotations);
|
rec.addInfoFields(annotations);
|
||||||
|
// also, annotate dbsnp id if available and not already there
|
||||||
|
if ( rec.getID() == null || rec.getID().equals(".") ) {
|
||||||
|
rodDbSNP dbsnp = rodDbSNP.getFirstRealSNP(tracker.getTrackData("dbsnp", null));
|
||||||
|
if ( dbsnp != null )
|
||||||
|
rec.setID(dbsnp.getRS_ID());
|
||||||
|
}
|
||||||
vcfWriter.addRecord(rec);
|
vcfWriter.addRecord(rec);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue