Moved old EM model to archive

git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@2754 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
ebanks 2010-02-01 02:55:32 +00:00
parent 64fc76e4bf
commit e0808e6c37
9 changed files with 10 additions and 43 deletions

View File

@ -18,7 +18,6 @@ import java.util.*;
public abstract class GenotypeCalculationModel implements Cloneable {
public enum Model {
EM_POINT_ESTIMATE,
JOINT_ESTIMATE,
POOLED
}

View File

@ -64,9 +64,6 @@ public class GenotypeCalculationModelFactory {
PrintStream beagleWriter) {
GenotypeCalculationModel gcm;
switch ( UAC.genotypeModel ) {
case EM_POINT_ESTIMATE:
gcm = new PointEstimateGenotypeCalculationModel();
break;
case JOINT_ESTIMATE:
gcm = new DiploidGenotypeCalculationModel();
break;

View File

@ -31,7 +31,7 @@ import org.broadinstitute.sting.utils.cmdLine.Argument;
public class UnifiedArgumentCollection {
// control the various models to be used
@Argument(fullName = "genotype_model", shortName = "gm", doc = "Genotype calculation model to employ -- JOINT_ESTIMATE is currently the default, while POOLED and EM_POINT_ESTIMATE are available.", required = false)
@Argument(fullName = "genotype_model", shortName = "gm", doc = "Genotype calculation model to employ -- JOINT_ESTIMATE is currently the default, while POOLED is also available.", required = false)
public GenotypeCalculationModel.Model genotypeModel = GenotypeCalculationModel.Model.JOINT_ESTIMATE;
@Argument(fullName = "base_model", shortName = "bm", doc = "Base substitution model to employ -- EMPIRICAL is the recommended default, but it's possible to select the ONE_STATE and THREE_STATE models for comparison purposes", required = false)

View File

@ -97,7 +97,7 @@ public class UnifiedGenotyper extends LocusWalker<VariantCallContext, UnifiedGen
* @return UG calculation arguments object
**/
public static UGCalculationArguments getUnifiedCalculationArguments(GenomeAnalysisEngine toolkit, UnifiedArgumentCollection UAC) {
return getUnifiedCalculationArguments(toolkit, UAC, null, null);
return getUnifiedCalculationArguments(toolkit, UAC, null);
}
/**
@ -106,11 +106,10 @@ public class UnifiedGenotyper extends LocusWalker<VariantCallContext, UnifiedGen
* @param toolkit the GATK Engine
* @param UAC the UnifiedArgumentCollection
* @param writer the genotype writer
* @param beagleWriter the beagle writer
* @return UG calculation arguments object
*
**/
private static UGCalculationArguments getUnifiedCalculationArguments(GenomeAnalysisEngine toolkit, UnifiedArgumentCollection UAC, GenotypeWriter writer, PrintStream beagleWriter) {
private static UGCalculationArguments getUnifiedCalculationArguments(GenomeAnalysisEngine toolkit, UnifiedArgumentCollection UAC, GenotypeWriter writer) {
UGCalculationArguments UG_args = new UGCalculationArguments();
UG_args.UAC = UAC;
@ -121,9 +120,6 @@ public class UnifiedGenotyper extends LocusWalker<VariantCallContext, UnifiedGen
if ( UAC.POOLSIZE < 1 && UAC.genotypeModel == GenotypeCalculationModel.Model.POOLED ) {
throw new IllegalArgumentException("Attempting to use the POOLED model with a pool size less than 1. Please set the pool size to an appropriate value.");
}
if ( beagleWriter != null && UAC.genotypeModel == GenotypeCalculationModel.Model.EM_POINT_ESTIMATE ) {
throw new IllegalArgumentException("BEAGLE output is not currently supported in the EM_POINT_ESTIMATE calculation model.");
}
if ( toolkit.getArguments().numberOfThreads > 1 && UAC.ASSUME_SINGLE_SAMPLE != null ) {
// the ASSUME_SINGLE_SAMPLE argument can't be handled (at least for now) while we are multi-threaded because the IO system doesn't know how to get the sample name
throw new IllegalArgumentException("For technical reasons, the ASSUME_SINGLE_SAMPLE argument cannot be used with multiple threads");
@ -257,19 +253,17 @@ public class UnifiedGenotyper extends LocusWalker<VariantCallContext, UnifiedGen
**/
public void initialize() {
UG_args = getUnifiedCalculationArguments(getToolkit(), UAC, writer, beagleWriter);
UG_args = getUnifiedCalculationArguments(getToolkit(), UAC, writer);
// initialize the writers
if ( verboseWriter != null ) {
if ( UAC.genotypeModel != GenotypeCalculationModel.Model.EM_POINT_ESTIMATE ) {
StringBuilder header = new StringBuilder("AFINFO\tLOC\tMAF\tF\tNullAFpriors\t");
for ( char altAllele : BaseUtils.BASES ) {
char base = Character.toUpperCase(altAllele);
header.append("POfDGivenAFFor" + base + "\t");
header.append("PosteriorAFFor" + base + "\t");
}
verboseWriter.println(header);
StringBuilder header = new StringBuilder("AFINFO\tLOC\tMAF\tF\tNullAFpriors\t");
for ( char altAllele : BaseUtils.BASES ) {
char base = Character.toUpperCase(altAllele);
header.append("POfDGivenAFFor" + base + "\t");
header.append("PosteriorAFFor" + base + "\t");
}
verboseWriter.println(header);
}
if ( beagleWriter != null ) {
beagleWriter.print("marker alleleA alleleB");

View File

@ -39,7 +39,6 @@ public class FindContaminatingReadGroupsWalker extends LocusWalker<Integer, Inte
public void initialize() {
UnifiedArgumentCollection uac = new UnifiedArgumentCollection();
uac.genotypeModel = GenotypeCalculationModel.Model.EM_POINT_ESTIMATE;
uac.CONFIDENCE_THRESHOLD = 50;
ug = UnifiedGenotyper.getUnifiedCalculationArguments(getToolkit(), uac);

View File

@ -31,7 +31,6 @@ public class SecondaryBaseTransitionTableWalker extends LocusWalker<Integer, Int
public void initialize() {
UnifiedArgumentCollection uac = new UnifiedArgumentCollection();
uac.genotypeModel = GenotypeCalculationModel.Model.EM_POINT_ESTIMATE;
uac.CONFIDENCE_THRESHOLD = 50;
uac.ALL_BASES = true;
ug = UnifiedGenotyper.getUnifiedCalculationArguments(getToolkit(), uac);

View File

@ -13,27 +13,6 @@ import java.util.Map;
public class UnifiedGenotyperIntegrationTest extends WalkerTest {
// --------------------------------------------------------------------------------------------------------------
//
// testing point estimate model
//
// --------------------------------------------------------------------------------------------------------------
@Test
public void testMultiSamplePilot1PointEM() {
WalkerTest.WalkerTestSpec spec = new WalkerTest.WalkerTestSpec(
"-T UnifiedGenotyper -R " + oneKGLocation + "reference/human_b36_both.fasta -I " + validationDataLocation + "low_coverage_CEU.chr1.10k-11k.bam -varout %s -L 1:10,023,400-10,024,000 -bm empirical -gm EM_POINT_ESTIMATE -confidence 30", 1,
Arrays.asList("5ad3f97c886a3381821366caa9162c12"));
executeTest("testMultiSamplePilot1 - Point Estimate EM", spec);
}
@Test
public void testMultiSamplePilot2PointEM() {
WalkerTest.WalkerTestSpec spec = new WalkerTest.WalkerTestSpec(
"-T UnifiedGenotyper -R " + oneKGLocation + "reference/human_b36_both.fasta -I " + validationDataLocation + "pilot2_daughters.chr20.10k-11k.bam -varout %s -L 20:10,000,000-10,010,000 -bm empirical -gm EM_POINT_ESTIMATE -confidence 30", 1,
Arrays.asList("73c80566c8353958b2ac61932f0b3812"));
executeTest("testMultiSamplePilot2 - Point Estimate EM", spec);
}
// --------------------------------------------------------------------------------------------------------------
//
// testing pooled model