-Minor fix in UG for all-bases mode

-Make minConfidenceScore in VariantEval a double so non-integer values can be used (requested by Steve H).


git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@2290 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
ebanks 2009-12-09 03:49:10 +00:00
parent 8a1c876104
commit 8d67d9ade3
2 changed files with 19 additions and 8 deletions

View File

@ -47,15 +47,26 @@ public abstract class JointEstimateGenotypeCalculationModel extends GenotypeCalc
// find the alternate allele with the largest sum of quality scores
initializeBestAlternateAllele(ref, context);
// if there are no non-ref bases and we don't want all bases, then we can just return
if ( !ALL_BASE_MODE && bestAlternateAllele == null )
return new Pair<VariationCall, List<Genotype>>(null, null);
initializeAlleleFrequencies(frequencyEstimationPoints);
// if there are no non-ref bases...
if ( bestAlternateAllele == null ) {
// if we don't want all bases, then we can just return
if ( !ALL_BASE_MODE )
return new Pair<VariationCall, List<Genotype>>(null, null);
initialize(ref, contexts, StratifiedContext.OVERALL);
calculateAlleleFrequencyPosteriors(ref, frequencyEstimationPoints, contexts, StratifiedContext.OVERALL);
calculatePofFs(ref, frequencyEstimationPoints);
// otherwise, we care about the ref base
bestAlternateAllele = ref;
// TODO -- figure out what to do here!
}
else {
initializeAlleleFrequencies(frequencyEstimationPoints);
initialize(ref, contexts, StratifiedContext.OVERALL);
calculateAlleleFrequencyPosteriors(ref, frequencyEstimationPoints, contexts, StratifiedContext.OVERALL);
calculatePofFs(ref, frequencyEstimationPoints);
}
// print out stats if we have a writer
if ( verboseWriter != null )

View File

@ -30,7 +30,7 @@ import java.util.*;
public class VariantEvalWalker extends RefWalker<Integer, Integer> {
//public class VariantEvalWalker extends RodWalker<Integer, Integer> {
@Argument(shortName="minPhredConfidenceScore", doc="Minimum confidence score to consider an evaluation SNP a variant", required=false)
public int minConfidenceScore = -1;
public double minConfidenceScore = -1.0;
@Argument(shortName="printVariants", doc="If true, prints the variants in all of the variant tracks that are examined", required=false)
public boolean printVariants = false;