use of htsjdk.tribble.TribbleException in project gatk by broadinstitute.
the class ValidateVariants method apply.
@Override
public void apply(final VariantContext vc, final ReadsContext readsContext, final ReferenceContext ref, final FeatureContext featureContext) {
if (DO_NOT_VALIDATE_FILTERED && vc.isFiltered()) {
return;
}
// get the true reference allele
final Allele reportedRefAllele = vc.getReference();
final int refLength = reportedRefAllele.length();
final Allele observedRefAllele = hasReference() ? Allele.create(Arrays.copyOf(ref.getBases(), refLength)) : null;
final Set<String> rsIDs = getRSIDs(featureContext);
for (final ValidationType t : validationTypes) {
try {
applyValidationType(vc, reportedRefAllele, observedRefAllele, rsIDs, t);
} catch (TribbleException e) {
if (WARN_ON_ERROR) {
logger.warn("***** " + e.getMessage() + " *****");
} else {
throw new UserException.FailsStrictValidation(drivingVariantFile, t, e.getMessage());
}
}
}
}
Aggregations