Examples of AFPriorProvider


Examples of org.broadinstitute.gatk.tools.walkers.genotyper.AFPriorProvider

        final Random rdn = GenomeAnalysisEngine.getRandomGenerator();
        final int[] plodies = new int[useCount];
        for (int i = 0; i < useCount; i++)
            plodies[i] = rdn.nextInt(maxPloidy - minPloidy + 1) + minPloidy;

        final AFPriorProvider provider = new HeterozygosityAFPriorProvider(het);
        for (int i = 0; i < useCount; i++) {
            final int ploidy = plodies[i];
            double[] priors = provider.forTotalPloidy(ploidy);
            Assert.assertNotNull(priors);
            Assert.assertEquals(priors.length, ploidy + 1);
            Assert.assertEquals(MathUtils.approximateLog10SumLog10(priors),0,TOLERANCE);
            for (int j = 0; j < priors.length; j++) {
                Assert.assertTrue(!Double.isNaN(priors[j]));
View Full Code Here

Examples of org.broadinstitute.gatk.tools.walkers.genotyper.AFPriorProvider

            priors[i] = remaining * rdn.nextDouble() * (.1 / ploidy );
            remaining -= priors[i];
            priorsList.add(priors[i]);
        }

        final AFPriorProvider provider = new CustomAFPriorProvider(priorsList);

        final double[] providedPriors = provider.forTotalPloidy(ploidy);
        Assert.assertNotNull(providedPriors);
        Assert.assertEquals(providedPriors.length, priors.length + 1);
        for (int i = 0; i < priors.length; i++)
            Assert.assertEquals(providedPriors[i+1],Math.log10(priors[i]),TOLERANCE);
        Assert.assertEquals(MathUtils.approximateLog10SumLog10(providedPriors),0,TOLERANCE);
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.