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:
parent
3dc78855fd
commit
b4baa3eb8f
|
|
@ -71,7 +71,7 @@ public class BatchedCallsMerger extends LocusWalker<VariantContext, Integer> imp
|
||||||
public boolean includeReadsWithDeletionAtLoci() { return true; }
|
public boolean includeReadsWithDeletionAtLoci() { return true; }
|
||||||
|
|
||||||
// enable extended events for indels
|
// 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() {
|
public void initialize() {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -37,14 +37,8 @@ import org.broadinstitute.sting.gatk.contexts.StratifiedAlignmentContext;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
public class DiploidGenotypeCalculationModel extends JointEstimateGenotypeCalculationModel {
|
public class DiploidGenotypeCalculationModel extends JointEstimateGenotypeCalculationModel {
|
||||||
/**
|
|
||||||
* Should we enable the experimental genotype likelihood calculations?
|
|
||||||
*/
|
|
||||||
protected boolean useExptGenotypeLikelihoods = false;
|
|
||||||
|
|
||||||
protected DiploidGenotypeCalculationModel(boolean useExptGenotypeLikelihoods) {
|
protected DiploidGenotypeCalculationModel() {}
|
||||||
this.useExptGenotypeLikelihoods = useExptGenotypeLikelihoods;
|
|
||||||
}
|
|
||||||
|
|
||||||
// the GenotypeLikelihoods map
|
// the GenotypeLikelihoods map
|
||||||
private HashMap<String, GenotypeLikelihoods> GLs = new HashMap<String, GenotypeLikelihoods>();
|
private HashMap<String, GenotypeLikelihoods> GLs = new HashMap<String, GenotypeLikelihoods>();
|
||||||
|
|
|
||||||
|
|
@ -21,8 +21,7 @@ public abstract class GenotypeCalculationModel implements Cloneable {
|
||||||
|
|
||||||
public enum Model {
|
public enum Model {
|
||||||
JOINT_ESTIMATE,
|
JOINT_ESTIMATE,
|
||||||
JOINT_ESTIMATE_EXPT_GL,
|
DINDEL
|
||||||
INDELS
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected UnifiedArgumentCollection UAC;
|
protected UnifiedArgumentCollection UAC;
|
||||||
|
|
|
||||||
|
|
@ -55,14 +55,13 @@ public class GenotypeCalculationModelFactory {
|
||||||
GenotypeCalculationModel gcm;
|
GenotypeCalculationModel gcm;
|
||||||
switch ( UAC.genotypeModel ) {
|
switch ( UAC.genotypeModel ) {
|
||||||
case JOINT_ESTIMATE:
|
case JOINT_ESTIMATE:
|
||||||
case JOINT_ESTIMATE_EXPT_GL:
|
gcm = new DiploidGenotypeCalculationModel();
|
||||||
boolean useExptGenotypeLikelihoods = UAC.genotypeModel == JOINT_ESTIMATE_EXPT_GL;
|
|
||||||
gcm = new DiploidGenotypeCalculationModel(useExptGenotypeLikelihoods);
|
|
||||||
break;
|
break;
|
||||||
case INDELS:
|
case DINDEL:
|
||||||
gcm = new SimpleIndelCalculationModel();
|
throw new UnsupportedOperationException("The Dindel-based genotype likelihoods model is not currently supported");
|
||||||
break;
|
//gcm = new SimpleIndelCalculationModel();
|
||||||
default: throw new RuntimeException("Unexpected GenotypeCalculationModel " + UAC.genotypeModel);
|
//break;
|
||||||
|
default: throw new IllegalArgumentException("Unexpected GenotypeCalculationModel " + UAC.genotypeModel);
|
||||||
}
|
}
|
||||||
|
|
||||||
gcm.initialize(samples, logger, UAC, verboseWriter);
|
gcm.initialize(samples, logger, UAC, verboseWriter);
|
||||||
|
|
|
||||||
|
|
@ -37,8 +37,6 @@ import org.broadinstitute.sting.utils.vcf.VCFUtils;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.io.PrintStream;
|
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; }
|
public boolean includeReadsWithDeletionAtLoci() { return true; }
|
||||||
|
|
||||||
// enable extended events for indels
|
// 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
|
* Inner class for collecting output statistics from the UG
|
||||||
|
|
|
||||||
|
|
@ -175,7 +175,7 @@ public class UnifiedGenotyperEngine {
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
// are there too many deletions in the pileup?
|
// 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) &&
|
isValidDeletionFraction(UAC.MAX_DELETION_FRACTION) &&
|
||||||
(double)pileup.getNumberOfDeletions() / (double)pileup.size() > UAC.MAX_DELETION_FRACTION )
|
(double)pileup.getNumberOfDeletions() / (double)pileup.size() > UAC.MAX_DELETION_FRACTION )
|
||||||
return null;
|
return null;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue