VariantAnnotator shouldn't die when multiple records occur at the same position
git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@4853 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
parent
b1f0df0047
commit
9f3e56e487
|
|
@ -202,12 +202,13 @@ public class VariantAnnotator extends RodWalker<Integer, Integer> {
|
|||
if ( tracker == null )
|
||||
return 0;
|
||||
|
||||
VariantContext vc = tracker.getVariantContext(ref, "variant", null, context.getLocation(), true);
|
||||
if ( vc == null )
|
||||
Collection<VariantContext> VCs = tracker.getVariantContexts(ref, "variant", null, context.getLocation(), true, false);
|
||||
if ( VCs.size() == 0 )
|
||||
return 0;
|
||||
|
||||
Collection<VariantContext> annotatedVCs = VCs;
|
||||
|
||||
// if the reference base is not ambiguous, we can annotate
|
||||
Collection<VariantContext> annotatedVCs = Arrays.asList(vc);
|
||||
Map<String, StratifiedAlignmentContext> stratifiedContexts;
|
||||
if ( BaseUtils.simpleBaseToBaseIndex(ref.getBase()) != -1 ) {
|
||||
if ( ! context.hasExtendedEventPileup() ) {
|
||||
|
|
@ -216,7 +217,9 @@ public class VariantAnnotator extends RodWalker<Integer, Integer> {
|
|||
stratifiedContexts = StratifiedAlignmentContext.splitContextBySampleName(context.getExtendedEventPileup(), ASSUME_SINGLE_SAMPLE);
|
||||
}
|
||||
if ( stratifiedContexts != null ) {
|
||||
annotatedVCs = engine.annotateContext(tracker, ref, stratifiedContexts, vc);
|
||||
annotatedVCs = new ArrayList<VariantContext>(VCs.size());
|
||||
for ( VariantContext vc : VCs )
|
||||
annotatedVCs.addAll(engine.annotateContext(tracker, ref, stratifiedContexts, vc));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue