Bug fix in reverse trim alleles for the case of mixed records that become non-mixed after subsetting the alleles.

This commit is contained in:
Ryan Poplin 2012-04-28 09:12:26 -04:00
parent e332aeaf70
commit 54a9bc2da2
1 changed files with 1 additions and 1 deletions

View File

@ -839,7 +839,7 @@ public class VariantContextUtils {
genotypes.add(Genotype.modifyAlleles(genotype, trimmedAlleles));
}
return new VariantContextBuilder(inputVC).stop(inputVC.getEnd() - trimExtent).alleles(alleles).genotypes(genotypes).make();
return new VariantContextBuilder(inputVC).stop(inputVC.getStart() + alleles.get(0).length() + (inputVC.isMixed() ? -1 : 0)).alleles(alleles).genotypes(genotypes).make();
}
public static GenotypesContext stripPLs(GenotypesContext genotypes) {