Must check whether there's a normal vs. extended pileup before asking for it.
This commit is contained in:
parent
e1edd6bd12
commit
52b16bf739
|
|
@ -41,7 +41,7 @@ public class DepthOfCoverage extends InfoFieldAnnotation implements StandardAnno
|
||||||
|
|
||||||
int depth = 0;
|
int depth = 0;
|
||||||
for ( Map.Entry<String, AlignmentContext> sample : stratifiedContexts.entrySet() )
|
for ( Map.Entry<String, AlignmentContext> sample : stratifiedContexts.entrySet() )
|
||||||
depth += sample.getValue().getBasePileup().depthOfCoverage();
|
depth += sample.getValue().hasBasePileup() ? sample.getValue().getBasePileup().depthOfCoverage() : sample.getValue().getExtendedEventPileup().depthOfCoverage();
|
||||||
Map<String, Object> map = new HashMap<String, Object>();
|
Map<String, Object> map = new HashMap<String, Object>();
|
||||||
map.put(getKeyNames().get(0), String.format("%d", depth));
|
map.put(getKeyNames().get(0), String.format("%d", depth));
|
||||||
return map;
|
return map;
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@ public class QualByDepth extends InfoFieldAnnotation implements StandardAnnotati
|
||||||
if ( context == null )
|
if ( context == null )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
depth += context.getBasePileup().depthOfCoverage();
|
depth += context.hasBasePileup() ? context.getBasePileup().depthOfCoverage() : context.getExtendedEventPileup().depthOfCoverage();
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( depth == 0 )
|
if ( depth == 0 )
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue