GeneralPloidyExact should use indel max alt alleles

This commit is contained in:
Mark DePristo 2012-10-05 11:49:27 -07:00
parent bf276baca0
commit 99ad7b2d71
1 changed files with 2 additions and 0 deletions

View File

@ -53,6 +53,8 @@ public class GeneralPloidyExactAFCalculation extends ExactAFCalculation {
@Override
protected VariantContext reduceScope(VariantContext vc) {
final int maxAltAlleles = vc.getType().equals(VariantContext.Type.INDEL) ? MAX_ALTERNATE_ALLELES_FOR_INDELS : MAX_ALTERNATE_ALLELES_TO_GENOTYPE;
// don't try to genotype too many alternate alleles
if ( vc.getAlternateAlleles().size() > maxAltAlleles) {
logger.warn("this tool is currently set to genotype at most " + maxAltAlleles + " alternate alleles in a given context, but the context at " + vc.getChr() + ":" + vc.getStart() + " has " + (vc.getAlternateAlleles().size()) + " alternate alleles so only the top alleles will be used; see the --max_alternate_alleles argument");