Looking over the calling results with Ryan, it's clear that while the grid search optimization (ignoring samples that are clearly ref) can work for assigning genotypes, it cannot be used for calculating P(AF>0). There's too much area under the likelihood curve that gets lost and the QUALs are negatively affected. However, testing showed that this only slightly affects runtime (~15 minutes per 1Mbase for the 1kg allpops). The optimization does remain for genotyping.

git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@4498 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
ebanks 2010-10-14 19:06:32 +00:00
parent 5e0c4ecc21
commit d41c252b13
3 changed files with 7 additions and 4 deletions

View File

@ -63,10 +63,13 @@ public abstract class AlleleFrequencyCalculationModel implements Cloneable {
protected Logger logger;
protected PrintStream verboseWriter;
protected AlleleFrequencyCalculationModel(int N, Logger logger, PrintStream verboseWriter) {
protected boolean useReferenceSampleOptimization;
protected AlleleFrequencyCalculationModel(int N, Logger logger, PrintStream verboseWriter, boolean useReferenceSampleOptimization) {
this.N = N;
this.logger = logger;
this.verboseWriter = verboseWriter;
this.useReferenceSampleOptimization = useReferenceSampleOptimization;
AFMatrix = new AlleleFrequencyMatrix(N);
refCalls = new HashSet<BiallelicGenotypeLikelihoods>();
}
@ -171,7 +174,7 @@ public abstract class AlleleFrequencyCalculationModel implements Cloneable {
AFMatrix.clear();
for ( BiallelicGenotypeLikelihoods GL : GLs.values() ) {
if ( isClearRefCall(GL) ) {
if ( useReferenceSampleOptimization && isClearRefCall(GL) ) {
refCalls.add(GL);
} else {
AFMatrix.setLikelihoods(GL.getPosteriors(), GL.getSample());

View File

@ -47,7 +47,7 @@ public class ExactAFCalculationModel extends AlleleFrequencyCalculationModel {
private static final double LOGEPS = -300;
protected ExactAFCalculationModel(int N, Logger logger, PrintStream verboseWriter) {
super(N, logger, verboseWriter);
super(N, logger, verboseWriter, true);
}
public void getLog10PNonRef(RefMetaDataTracker tracker,

View File

@ -41,7 +41,7 @@ public class GridSearchAFEstimation extends AlleleFrequencyCalculationModel {
protected static final double LOG10_OPTIMIZATION_EPSILON = 8.0;
protected GridSearchAFEstimation(int N, Logger logger, PrintStream verboseWriter) {
super(N, logger, verboseWriter);
super(N, logger, verboseWriter, false);
}
public void getLog10PNonRef(RefMetaDataTracker tracker,