When checking to make sure that we have cached enough data in the PL array, use the converted index value since that's what will be used as an index into the array.
This commit is contained in:
parent
a05a7f287d
commit
344a938a70
|
|
@ -288,11 +288,13 @@ public class GenotypeLikelihoods {
|
|||
* @return the allele index pair
|
||||
*/
|
||||
public static GenotypeLikelihoodsAllelePair getAllelePairUsingDeprecatedOrdering(final int PLindex) {
|
||||
// make sure that we've cached enough data
|
||||
if ( PLindex >= PLIndexToAlleleIndex.length )
|
||||
calculatePLcache(PLindex);
|
||||
final int convertedIndex = PLindexConversion[PLindex];
|
||||
|
||||
return PLIndexToAlleleIndex[PLindexConversion[PLindex]];
|
||||
// make sure that we've cached enough data
|
||||
if ( convertedIndex >= PLIndexToAlleleIndex.length )
|
||||
calculatePLcache(convertedIndex);
|
||||
|
||||
return PLIndexToAlleleIndex[convertedIndex];
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue