IndependentExactAFCalc is now the default EXACT model implementation

-- Changed UG / HC to use this one via the StandardCallerArgumentCollection
-- Update the AFCalcFactory.Calculation to have a getDefault() value instead of having a duplicate entry in the enums
This commit is contained in:
Mark DePristo 2012-10-18 13:34:51 -04:00
parent 326f429270
commit eaffb814d3
3 changed files with 7 additions and 8 deletions

View File

@ -495,7 +495,7 @@ public class AFCalcUnitTest extends BaseTest {
// list of all high-quality models in the system // list of all high-quality models in the system
final List<AFCalcFactory.Calculation> models = Arrays.asList( final List<AFCalcFactory.Calculation> models = Arrays.asList(
AFCalcFactory.Calculation.EXACT, AFCalcFactory.Calculation.getDefaultModel(),
AFCalcFactory.Calculation.EXACT_REFERENCE, AFCalcFactory.Calculation.EXACT_REFERENCE,
AFCalcFactory.Calculation.EXACT_INDEPENDENT); AFCalcFactory.Calculation.EXACT_INDEPENDENT);

View File

@ -105,5 +105,5 @@ public class StandardCallerArgumentCollection {
*/ */
@Advanced @Advanced
@Argument(fullName = "p_nonref_model", shortName = "pnrm", doc = "Non-reference probability calculation model to employ", required = false) @Argument(fullName = "p_nonref_model", shortName = "pnrm", doc = "Non-reference probability calculation model to employ", required = false)
public AFCalcFactory.Calculation AFmodel = AFCalcFactory.Calculation.EXACT; public AFCalcFactory.Calculation AFmodel = AFCalcFactory.Calculation.getDefaultModel();
} }

View File

@ -24,15 +24,12 @@ public class AFCalcFactory {
* the needs of the request (i.e., considering ploidy). * the needs of the request (i.e., considering ploidy).
*/ */
public enum Calculation { public enum Calculation {
/** The default implementation */
EXACT(ReferenceDiploidExactAFCalc.class, 2, -1),
/** reference implementation of multi-allelic EXACT model */
EXACT_REFERENCE(ReferenceDiploidExactAFCalc.class, 2, -1),
/** expt. implementation -- for testing only */ /** expt. implementation -- for testing only */
EXACT_INDEPENDENT(IndependentAllelesDiploidExactAFCalc.class, 2, -1), EXACT_INDEPENDENT(IndependentAllelesDiploidExactAFCalc.class, 2, -1),
/** reference implementation of multi-allelic EXACT model. Extremely slow for many alternate alleles */
EXACT_REFERENCE(ReferenceDiploidExactAFCalc.class, 2, -1),
/** original biallelic exact model, for testing only */ /** original biallelic exact model, for testing only */
EXACT_ORIGINAL(OriginalDiploidExactAFCalc.class, 2, 2), EXACT_ORIGINAL(OriginalDiploidExactAFCalc.class, 2, 2),
@ -60,6 +57,8 @@ public class AFCalcFactory {
return (requiredPloidy == -1 || requiredPloidy == requestedPloidy) return (requiredPloidy == -1 || requiredPloidy == requestedPloidy)
&& (maxAltAlleles == -1 || maxAltAlleles >= requestedMaxAltAlleles); && (maxAltAlleles == -1 || maxAltAlleles >= requestedMaxAltAlleles);
} }
public static Calculation getDefaultModel() { return EXACT_INDEPENDENT; }
} }
private static final Map<String, Class<? extends AFCalc>> afClasses; private static final Map<String, Class<? extends AFCalc>> afClasses;