diff --git a/src/main/java/com/github/discvrseq/walkers/MultiSourceAnnotator.java b/src/main/java/com/github/discvrseq/walkers/MultiSourceAnnotator.java index d90cf511..b9a4d2fd 100644 --- a/src/main/java/com/github/discvrseq/walkers/MultiSourceAnnotator.java +++ b/src/main/java/com/github/discvrseq/walkers/MultiSourceAnnotator.java @@ -2,6 +2,7 @@ import com.github.discvrseq.tools.DiscvrSeqInternalProgramGroup; import com.github.discvrseq.walkers.annotator.Impact; +import htsjdk.variant.variantcontext.Allele; import htsjdk.variant.variantcontext.VariantContext; import htsjdk.variant.variantcontext.VariantContextBuilder; import htsjdk.variant.variantcontext.writer.VariantContextWriter; @@ -19,6 +20,7 @@ import java.io.File; import java.util.*; +import java.util.stream.Collectors; /** * This is a fairly specialized tool, designed to take the VCFs annotated with ClinvarAnnotator (from DISCVR-seq Toolkit) and Cassandra, @@ -567,7 +569,7 @@ private boolean matches(VariantContext source, VariantContext annotation){ //TODO: consider allele-specific annotations if (!source.getAlleles().equals(annotation.getAlleles())){ - logger.warn("alleles do not match: " + source.getContig() + "/" + source.getStart() + " for source: " + annotation.getSource()); + throw new GATKException("Alleles do not match: " + source.getContig() + "/" + source.getStart() + " for source: " + annotation.getSource() + ", source: " + source.getAlleles().stream().map(Allele::getDisplayString).collect(Collectors.joining(",")) + ", annotation: " + annotation.getAlleles().stream().map(Allele::getDisplayString).collect(Collectors.joining(","))); } return true;