Examples of AFCalculationResult


Examples of org.broadinstitute.gatk.tools.walkers.genotyper.afcalc.AFCalculationResult

            return emptyCallContext(tracker,refContext,rawContext);

        final int defaultPloidy = configuration.genotypeArgs.samplePloidy;
        final int maxAltAlleles = configuration.genotypeArgs.MAX_ALTERNATE_ALLELES;
        final AFCalculator afCalculator = afCalculatorProvider.getInstance(vc,defaultPloidy,maxAltAlleles);
        final AFCalculationResult AFresult = afCalculator.getLog10PNonRef(vc, defaultPloidy,maxAltAlleles, getAlleleFrequencyPriors(vc,defaultPloidy,model));

        final OutputAlleleSubset outputAlternativeAlleles = calculateOutputAlleleSubset(AFresult);

        final double PoFGT0 = Math.pow(10, AFresult.getLog10PosteriorOfAFGT0());

        // note the math.abs is necessary because -10 * 0.0 => -0.0 which isn't nice
        double log10Confidence =
                ! outputAlternativeAlleles.siteIsMonomorphic ||
                    configuration.genotypingOutputMode == GenotypingOutputMode.GENOTYPE_GIVEN_ALLELES || configuration.annotateAllSitesWithPLs
                        ? AFresult.getLog10PosteriorOfAFEq0() + 0.0
                        : AFresult.getLog10PosteriorOfAFGT0() + 0.0 ;


        // Add 0.0 removes -0.0 occurrences.
        final double phredScaledConfidence = (-10.0 * log10Confidence) + 0.0;

View Full Code Here

Examples of org.broadinstitute.gatk.tools.walkers.genotyper.afcalc.AFCalculationResult

        // do we want to apply a prior? maybe user-spec?
        if ( flatPriors == null ) {
            flatPriors = new double[1+2*samples.size()];
            afCalculator = AFCalculatorFactory.createCalculator(samples.size(), MAX_ALT_ALLELES, HomoSapiensConstants.DEFAULT_PLOIDY);
        }
        final AFCalculationResult result = afCalculator.getLog10PNonRef(subContext, HomoSapiensConstants.DEFAULT_PLOIDY, MAX_ALT_ALLELES,  flatPriors);
        // do we want to let this qual go up or down?
        if ( result.getLog10LikelihoodOfAFEq0() < referenceLikelihood ) {
            return true;
        }

        return false;
    }
View Full Code Here

Examples of org.broadinstitute.gatk.tools.walkers.genotyper.afcalc.AFCalculationResult

        //double overallLog10PofNull = AFresult.log10AlleleFrequencyPosteriors[0];
        final double overallLog10PofF = AFresult.getLog10LikelihoodOfAFGT0();
        //if ( DEBUG_SLOD ) System.out.println("overallLog10PofF=" + overallLog10PofF);

        // the forward lod
        final AFCalculationResult forwardAFresult = getDirectionalAfCalcResult(AlignmentContextUtils.ReadOrientation.FORWARD,stratifiedContexts, tracker, refContext, allAllelesToUse, model, perReadAlleleLikelihoodMap);
        final double forwardLog10PofNull = forwardAFresult.getLog10LikelihoodOfAFEq0();
        final double forwardLog10PofF = forwardAFresult.getLog10LikelihoodOfAFGT0();
        //if ( DEBUG_SLOD ) System.out.println("forwardLog10PofNull=" + forwardLog10PofNull + ", forwardLog10PofF=" + forwardLog10PofF);

        // the reverse lod
        final AFCalculationResult reverseAFresult = getDirectionalAfCalcResult(AlignmentContextUtils.ReadOrientation.REVERSE,stratifiedContexts, tracker, refContext, allAllelesToUse, model, perReadAlleleLikelihoodMap);
        final double reverseLog10PofNull = reverseAFresult.getLog10LikelihoodOfAFEq0();
        final double reverseLog10PofF = reverseAFresult.getLog10LikelihoodOfAFGT0();
        //if ( DEBUG_SLOD ) System.out.println("reverseLog10PofNull=" + reverseLog10PofNull + ", reverseLog10PofF=" + reverseLog10PofF);

        final double forwardLod = forwardLog10PofF + reverseLog10PofNull - overallLog10PofF;
        final double reverseLod = reverseLog10PofF + forwardLog10PofNull - overallLog10PofF;
        //if ( DEBUG_SLOD ) System.out.println("forward lod=" + forwardLod + ", reverse lod=" + reverseLod);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.