Cleanup. INDELS model is now disconnected (and renamed 'DINDEL' in preparation for adding plumbing for Guillermo soon)

git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@4106 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
ebanks 2010-08-25 14:52:51 +00:00
parent 3dc78855fd
commit b4baa3eb8f
6 changed files with 11 additions and 21 deletions

View File

@ -71,7 +71,7 @@ public class BatchedCallsMerger extends LocusWalker<VariantContext, Integer> imp
public boolean includeReadsWithDeletionAtLoci() { return true; }
// enable extended events for indels
public boolean generateExtendedEvents() { return UAC.genotypeModel == GenotypeCalculationModel.Model.INDELS; }
public boolean generateExtendedEvents() { return UAC.genotypeModel == GenotypeCalculationModel.Model.DINDEL; }
public void initialize() {

View File

@ -37,14 +37,8 @@ import org.broadinstitute.sting.gatk.contexts.StratifiedAlignmentContext;
import java.util.*;
public class DiploidGenotypeCalculationModel extends JointEstimateGenotypeCalculationModel {
/**
* Should we enable the experimental genotype likelihood calculations?
*/
protected boolean useExptGenotypeLikelihoods = false;
protected DiploidGenotypeCalculationModel(boolean useExptGenotypeLikelihoods) {
this.useExptGenotypeLikelihoods = useExptGenotypeLikelihoods;
}
protected DiploidGenotypeCalculationModel() {}
// the GenotypeLikelihoods map
private HashMap<String, GenotypeLikelihoods> GLs = new HashMap<String, GenotypeLikelihoods>();

View File

@ -21,8 +21,7 @@ public abstract class GenotypeCalculationModel implements Cloneable {
public enum Model {
JOINT_ESTIMATE,
JOINT_ESTIMATE_EXPT_GL,
INDELS
DINDEL
}
protected UnifiedArgumentCollection UAC;

View File

@ -55,14 +55,13 @@ public class GenotypeCalculationModelFactory {
GenotypeCalculationModel gcm;
switch ( UAC.genotypeModel ) {
case JOINT_ESTIMATE:
case JOINT_ESTIMATE_EXPT_GL:
boolean useExptGenotypeLikelihoods = UAC.genotypeModel == JOINT_ESTIMATE_EXPT_GL;
gcm = new DiploidGenotypeCalculationModel(useExptGenotypeLikelihoods);
gcm = new DiploidGenotypeCalculationModel();
break;
case INDELS:
gcm = new SimpleIndelCalculationModel();
break;
default: throw new RuntimeException("Unexpected GenotypeCalculationModel " + UAC.genotypeModel);
case DINDEL:
throw new UnsupportedOperationException("The Dindel-based genotype likelihoods model is not currently supported");
//gcm = new SimpleIndelCalculationModel();
//break;
default: throw new IllegalArgumentException("Unexpected GenotypeCalculationModel " + UAC.genotypeModel);
}
gcm.initialize(samples, logger, UAC, verboseWriter);

View File

@ -37,8 +37,6 @@ import org.broadinstitute.sting.utils.vcf.VCFUtils;
import java.util.*;
import java.io.PrintStream;
import java.io.File;
import java.io.FileNotFoundException;
/**
@ -85,7 +83,7 @@ public class UnifiedGenotyper extends LocusWalker<VariantCallContext, UnifiedGen
public boolean includeReadsWithDeletionAtLoci() { return true; }
// enable extended events for indels
public boolean generateExtendedEvents() { return UAC.genotypeModel == GenotypeCalculationModel.Model.INDELS; }
public boolean generateExtendedEvents() { return UAC.genotypeModel == GenotypeCalculationModel.Model.DINDEL; }
/**
* Inner class for collecting output statistics from the UG

View File

@ -175,7 +175,7 @@ public class UnifiedGenotyperEngine {
return null;
// are there too many deletions in the pileup?
if ( UAC.genotypeModel != GenotypeCalculationModel.Model.INDELS &&
if ( UAC.genotypeModel != GenotypeCalculationModel.Model.DINDEL &&
isValidDeletionFraction(UAC.MAX_DELETION_FRACTION) &&
(double)pileup.getNumberOfDeletions() / (double)pileup.size() > UAC.MAX_DELETION_FRACTION )
return null;