Bug fix in HaplotypeCaller's GENOTYPE_GIVEN_ALLELES mode for insertions greater than length 1. The allele being genotyped was off by one base pair.
This commit is contained in:
parent
ca7b5e068f
commit
8695738400
|
|
@ -28,9 +28,7 @@ import net.sf.samtools.Cigar;
|
|||
import net.sf.samtools.CigarElement;
|
||||
import net.sf.samtools.CigarOperator;
|
||||
import org.broadinstitute.sting.gatk.contexts.ReferenceContext;
|
||||
import org.broadinstitute.sting.utils.collections.Pair;
|
||||
import org.broadinstitute.sting.utils.exceptions.ReviewedStingException;
|
||||
import org.broadinstitute.sting.utils.sam.GATKSAMRecord;
|
||||
import org.broadinstitute.sting.utils.variantcontext.Allele;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
|
@ -133,7 +131,7 @@ public class Haplotype {
|
|||
}
|
||||
} else if( refAllele.length() < altAllele.length() ) { // insertion
|
||||
final int altAlleleLength = altAllele.length();
|
||||
for( int iii = newHaplotype.length -1; iii > haplotypeInsertLocation + altAlleleLength; iii-- ) {
|
||||
for( int iii = newHaplotype.length - 1; iii > haplotypeInsertLocation + altAlleleLength - 1; iii-- ) {
|
||||
newHaplotype[iii] = newHaplotype[iii-altAlleleLength];
|
||||
}
|
||||
for( int iii = 0; iii < altAlleleLength; iii++ ) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue