Adding checks for hasBasePileup() before calling getBasePileup() as per GS thread
This commit is contained in:
parent
82bf09edf3
commit
6313aae2c4
|
|
@ -69,7 +69,7 @@ public class AlleleBalance extends InfoFieldAnnotation {
|
|||
if ( context == null )
|
||||
continue;
|
||||
|
||||
if ( vc.isSNP() ) {
|
||||
if ( vc.isSNP() && context.hasBasePileup() ) {
|
||||
final String bases = new String(context.getBasePileup().getBases());
|
||||
if ( bases.length() == 0 )
|
||||
return null;
|
||||
|
|
|
|||
|
|
@ -51,6 +51,9 @@ public class AlleleBalanceBySample extends GenotypeAnnotation implements Experim
|
|||
if ( altAlleles.size() == 0 )
|
||||
return null;
|
||||
|
||||
if ( !stratifiedContext.hasBasePileup() )
|
||||
return null;
|
||||
|
||||
final String bases = new String(stratifiedContext.getBasePileup().getBases());
|
||||
if ( bases.length() == 0 )
|
||||
return null;
|
||||
|
|
|
|||
|
|
@ -365,7 +365,7 @@ public class GenotypeAndValidateWalker extends RodWalker<GenotypeAndValidateWalk
|
|||
return counter;
|
||||
|
||||
// Do not operate on variants that are not covered to the optional minimum depth
|
||||
if (!context.hasReads() || (minDepth > 0 && context.getBasePileup().getBases().length < minDepth)) {
|
||||
if (!context.hasReads() || !context.hasBasePileup() || (minDepth > 0 && context.getBasePileup().getBases().length < minDepth)) {
|
||||
counter.nUncovered = 1L;
|
||||
if (vcComp.getAttribute("GV").equals("T"))
|
||||
counter.nAltNotCalled = 1L;
|
||||
|
|
|
|||
Loading…
Reference in New Issue