@Argument(fullName="continue_after_error",doc="Continue after encountering an error",required=false)
public boolean CONTINUE_AFTER_AN_ERROR = false;
public Integer map(RefMetaDataTracker tracker, ReferenceContext ref, AlignmentContext context) {
ReadBackedPileup pileup = context.getBasePileup();
SAMPileupFeature truePileup = getTruePileup( tracker );
if ( truePileup == null ) {
out.printf("No truth pileup data available at %s%n", pileup.getPileupString(ref.getBaseAsChar()));
if ( ! CONTINUE_AFTER_AN_ERROR ) {
throw new UserException.BadInput(String.format("No pileup data available at %s given GATK's output of %s -- this walker requires samtools pileup data over all bases",
context.getLocation(), new String(pileup.getBases())));
}
} else {
String pileupDiff = pileupDiff(pileup, truePileup, true);
if ( pileupDiff != null ) {
out.printf("%s vs. %s%n", pileup.getPileupString(ref.getBaseAsChar()), truePileup.getPileupString());
if ( ! CONTINUE_AFTER_AN_ERROR ) {
throw new UserException.BadInput(String.format("The input pileup doesn't match the GATK's internal pileup: %s", pileupDiff));
}
}
}