Merge correction
This commit is contained in:
parent
ec54528605
commit
b9afe800ae
|
|
@ -86,30 +86,31 @@ public class PairHMMLikelihoodCalculationEngine implements LikelihoodCalculation
|
||||||
case EXACT: return new Log10PairHMM(true);
|
case EXACT: return new Log10PairHMM(true);
|
||||||
case ORIGINAL: return new Log10PairHMM(false);
|
case ORIGINAL: return new Log10PairHMM(false);
|
||||||
case LOGLESS_CACHING:
|
case LOGLESS_CACHING:
|
||||||
if (noFpga || !CnyPairHMM.isAvailable())
|
if (noFpga || !CnyPairHMM.isAvailable())
|
||||||
return new LoglessPairHMM();
|
return new LoglessPairHMM();
|
||||||
else
|
else
|
||||||
return new CnyPairHMM();
|
return new CnyPairHMM();
|
||||||
case VECTOR_LOGLESS_CACHING:
|
case VECTOR_LOGLESS_CACHING:
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
return new VectorLoglessPairHMM();
|
return new VectorLoglessPairHMM();
|
||||||
}
|
}
|
||||||
catch(UnsatisfiedLinkError ule)
|
catch(UnsatisfiedLinkError ule)
|
||||||
{
|
{
|
||||||
logger.warn("Failed to load native library for VectorLoglessPairHMM - using Java implementation of LOGLESS_CACHING");
|
logger.warn("Failed to load native library for VectorLoglessPairHMM - using Java implementation of LOGLESS_CACHING");
|
||||||
return new LoglessPairHMM();
|
return new LoglessPairHMM();
|
||||||
}
|
}
|
||||||
case DEBUG_VECTOR_LOGLESS_CACHING:
|
case DEBUG_VECTOR_LOGLESS_CACHING:
|
||||||
return new DebugJNILoglessPairHMM(PairHMM.HMM_IMPLEMENTATION.VECTOR_LOGLESS_CACHING);
|
return new DebugJNILoglessPairHMM(PairHMM.HMM_IMPLEMENTATION.VECTOR_LOGLESS_CACHING);
|
||||||
case ARRAY_LOGLESS:
|
case ARRAY_LOGLESS:
|
||||||
if (noFpga || !CnyPairHMM.isAvailable())
|
if (noFpga || !CnyPairHMM.isAvailable())
|
||||||
return new ArrayLoglessPairHMM();
|
return new ArrayLoglessPairHMM();
|
||||||
else
|
else
|
||||||
return new CnyPairHMM();
|
return new CnyPairHMM();
|
||||||
default:
|
default:
|
||||||
throw new UserException.BadArgumentValue("pairHMM", "Specified pairHMM implementation is unrecognized or incompatible with the HaplotypeCaller. Acceptable options are ORIGINAL, EXACT, CACHING, LOGLESS_CACHING, and ARRAY_LOGLESS.");
|
throw new UserException.BadArgumentValue("pairHMM", "Specified pairHMM implementation is unrecognized or incompatible with the HaplotypeCaller. Acceptable options are ORIGINAL, EXACT, CACHING, LOGLESS_CACHING, and ARRAY_LOGLESS.");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
// Attempted to do as below, to avoid calling pairHMMThreadLocal.get() later on, but it resulted in a NullPointerException
|
// Attempted to do as below, to avoid calling pairHMMThreadLocal.get() later on, but it resulted in a NullPointerException
|
||||||
// private final PairHMM pairHMM = pairHMMThreadLocal.get();
|
// private final PairHMM pairHMM = pairHMMThreadLocal.get();
|
||||||
|
|
@ -179,7 +180,6 @@ public class PairHMMLikelihoodCalculationEngine implements LikelihoodCalculation
|
||||||
pairHMMThreadLocal.get().close();
|
pairHMMThreadLocal.get().close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void writeDebugLikelihoods(final GATKSAMRecord processedRead, final Haplotype haplotype, final double log10l){
|
private void writeDebugLikelihoods(final GATKSAMRecord processedRead, final Haplotype haplotype, final double log10l){
|
||||||
if ( WRITE_LIKELIHOODS_TO_FILE ) {
|
if ( WRITE_LIKELIHOODS_TO_FILE ) {
|
||||||
likelihoodsStream.printf("%s %s %s %s %s %s %f%n",
|
likelihoodsStream.printf("%s %s %s %s %s %s %f%n",
|
||||||
|
|
@ -330,8 +330,8 @@ public class PairHMMLikelihoodCalculationEngine implements LikelihoodCalculation
|
||||||
int X_METRIC_LENGTH = 0;
|
int X_METRIC_LENGTH = 0;
|
||||||
for( final Map.Entry<String, List<GATKSAMRecord>> sample : perSampleReadList.entrySet() ) {
|
for( final Map.Entry<String, List<GATKSAMRecord>> sample : perSampleReadList.entrySet() ) {
|
||||||
for( final GATKSAMRecord read : sample.getValue() ) {
|
for( final GATKSAMRecord read : sample.getValue() ) {
|
||||||
final int readLength = read.getReadLength();
|
final int readLength = read.getReadLength();
|
||||||
if( readLength > X_METRIC_LENGTH ) { X_METRIC_LENGTH = readLength; }
|
if( readLength > X_METRIC_LENGTH ) { X_METRIC_LENGTH = readLength; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
int Y_METRIC_LENGTH = 0;
|
int Y_METRIC_LENGTH = 0;
|
||||||
|
|
@ -360,7 +360,7 @@ public class PairHMMLikelihoodCalculationEngine implements LikelihoodCalculation
|
||||||
// Add likelihoods for each sample's reads to our stratifiedReadMap
|
// Add likelihoods for each sample's reads to our stratifiedReadMap
|
||||||
final Map<String, PerReadAlleleLikelihoodMap> stratifiedReadMap = new LinkedHashMap<>();
|
final Map<String, PerReadAlleleLikelihoodMap> stratifiedReadMap = new LinkedHashMap<>();
|
||||||
for( final Map.Entry<String, List<GATKSAMRecord>> sampleEntry : perSampleReadList.entrySet() ) {
|
for( final Map.Entry<String, List<GATKSAMRecord>> sampleEntry : perSampleReadList.entrySet() ) {
|
||||||
// evaluate the likelihood of the reads given those haplotypes
|
// evaluate the likelihood of the reads given those haplotypes
|
||||||
final PerReadAlleleLikelihoodMap map = computeReadLikelihoods(haplotypes, sampleEntry.getValue());
|
final PerReadAlleleLikelihoodMap map = computeReadLikelihoods(haplotypes, sampleEntry.getValue());
|
||||||
|
|
||||||
map.filterPoorlyModelledReads(EXPECTED_ERROR_RATE_PER_BASE);
|
map.filterPoorlyModelledReads(EXPECTED_ERROR_RATE_PER_BASE);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue