Better error message for unused ALT alleles

This commit is contained in:
Eric Banks 2012-10-29 21:51:35 -04:00
parent b6a1967f12
commit c95e893920
1 changed files with 2 additions and 2 deletions

View File

@ -1073,13 +1073,13 @@ public class VariantContext implements Feature { // to enable tribble integratio
}
if ( reportedAlleles.size() != observedAlleles.size() )
throw new TribbleException.InternalCodecException(String.format("the ALT allele(s) for the record at position %s:%d do not match what is observed in the per-sample genotypes", getChr(), getStart()));
throw new TribbleException.InternalCodecException(String.format("one or more of the ALT allele(s) for the record at position %s:%d are not observed at all in the sample genotypes", getChr(), getStart()));
int originalSize = reportedAlleles.size();
// take the intersection and see if things change
observedAlleles.retainAll(reportedAlleles);
if ( observedAlleles.size() != originalSize )
throw new TribbleException.InternalCodecException(String.format("the ALT allele(s) for the record at position %s:%d do not match what is observed in the per-sample genotypes", getChr(), getStart()));
throw new TribbleException.InternalCodecException(String.format("one or more of the ALT allele(s) for the record at position %s:%d are not observed at all in the sample genotypes", getChr(), getStart()));
}
public void validateChromosomeCounts() {