Merged bug fix from Stable into Unstable
This commit is contained in:
commit
bd4e4f4ee3
|
|
@ -343,8 +343,10 @@ public class PairHMMIndelErrorModel {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
final byte[] readBases = Arrays.copyOfRange(unclippedReadBases,numStartSoftClippedBases, unclippedReadBases.length-numEndSoftClippedBases);
|
final int endOfCopy = unclippedReadBases.length - numEndSoftClippedBases;
|
||||||
final byte[] readQuals = Arrays.copyOfRange(unclippedReadQuals,numStartSoftClippedBases, unclippedReadBases.length-numEndSoftClippedBases);
|
final byte[] readBases = Arrays.copyOfRange(unclippedReadBases, numStartSoftClippedBases, endOfCopy);
|
||||||
|
final byte[] readQuals = Arrays.copyOfRange(unclippedReadQuals, numStartSoftClippedBases, endOfCopy);
|
||||||
|
|
||||||
int j=0;
|
int j=0;
|
||||||
|
|
||||||
byte[] previousHaplotypeSeen = null;
|
byte[] previousHaplotypeSeen = null;
|
||||||
|
|
@ -356,6 +358,16 @@ public class PairHMMIndelErrorModel {
|
||||||
getContextHomopolymerLength(readBases,hrunProfile);
|
getContextHomopolymerLength(readBases,hrunProfile);
|
||||||
fillGapProbabilities(hrunProfile, contextLogGapOpenProbabilities, contextLogGapContinuationProbabilities);
|
fillGapProbabilities(hrunProfile, contextLogGapOpenProbabilities, contextLogGapContinuationProbabilities);
|
||||||
|
|
||||||
|
// get the base insertion and deletion qualities to use
|
||||||
|
final byte[] baseInsertionQualities, baseDeletionQualities;
|
||||||
|
if ( read.hasBaseIndelQualities() ) {
|
||||||
|
baseInsertionQualities = Arrays.copyOfRange(read.getBaseInsertionQualities(), numStartSoftClippedBases, endOfCopy);
|
||||||
|
baseDeletionQualities = Arrays.copyOfRange(read.getBaseDeletionQualities(), numStartSoftClippedBases, endOfCopy);
|
||||||
|
} else {
|
||||||
|
baseInsertionQualities = contextLogGapOpenProbabilities;
|
||||||
|
baseDeletionQualities = contextLogGapOpenProbabilities;
|
||||||
|
}
|
||||||
|
|
||||||
boolean firstHap = true;
|
boolean firstHap = true;
|
||||||
for (Allele a: haplotypeMap.keySet()) {
|
for (Allele a: haplotypeMap.keySet()) {
|
||||||
|
|
||||||
|
|
@ -394,8 +406,7 @@ public class PairHMMIndelErrorModel {
|
||||||
previousHaplotypeSeen = haplotypeBases.clone();
|
previousHaplotypeSeen = haplotypeBases.clone();
|
||||||
|
|
||||||
readLikelihood = pairHMM.computeReadLikelihoodGivenHaplotypeLog10(haplotypeBases, readBases, readQuals,
|
readLikelihood = pairHMM.computeReadLikelihoodGivenHaplotypeLog10(haplotypeBases, readBases, readQuals,
|
||||||
(read.hasBaseIndelQualities() ? read.getBaseInsertionQualities() : contextLogGapOpenProbabilities),
|
baseInsertionQualities, baseDeletionQualities,
|
||||||
(read.hasBaseIndelQualities() ? read.getBaseDeletionQualities() : contextLogGapOpenProbabilities),
|
|
||||||
contextLogGapContinuationProbabilities, startIndexInHaplotype, firstHap);
|
contextLogGapContinuationProbabilities, startIndexInHaplotype, firstHap);
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue