Examples of Genotype


Examples of abra.utils.trio.LocusGenotype.Genotype

//        if (endIdx >= 0) {
//          int endStopIdx = info.indexOf(";");
//          end = Integer.parseInt(info.substring(endIdx+4, endStopIdx));
//        }
       
        Genotype gt = null;
        double altAlleleFreq = 0.0;
       
       
        String gtString = fields[9].split(":")[0];
       
View Full Code Here

Examples of abra.utils.trio.LocusGenotype.Genotype

//        if (endIdx >= 0) {
//          int endStopIdx = info.indexOf(";");
//          end = Integer.parseInt(info.substring(endIdx+4, endStopIdx));
//        }
       
        Genotype gt = null;
        double altAlleleFreq = 0.0;
       
       
        String gtString = fields[9].split(":")[0];
       
View Full Code Here

Examples of abra.utils.trio.LocusGenotype.Genotype

//        if (endIdx >= 0) {
//          int endStopIdx = info.indexOf(";");
//          end = Integer.parseInt(info.substring(endIdx+4, endStopIdx));
//        }
       
        Genotype gt = null;
        double altAlleleFreq = 0.0;
       
        if (line.contains("APRIM")) {
          String gtString = fields[9];
          if (gtString.equals("0|0")) {
View Full Code Here

Examples of htsjdk.variant.variantcontext.Genotype

    static MongoVariantContext createMVC(int allele0, int allele1, String callsetName, VariantContext variantContext, TruthStatus truthStatus, boolean isComplexEvent) {
        List<Allele> alleleList = variantContext.getAlleles();

        MongoGenotype mgt = new MongoGenotype(allele0, allele1);
        Genotype gt = mgt.toGenotype(alleleList);
        MongoVariantContext mvc = MongoVariantContext.create(callsetName, variantContext, truthStatus, gt);
        mvc.setReviewed(true);
        mvc.setChr(chromoNameToStandard(mvc.getChr()));
        mvc.setIsComplexEvent(isComplexEvent);
        mvc.setConfidence(NA12878KnowledgeBase.InputCallsetConfidence.REVIEW.confidence);
View Full Code Here

Examples of htsjdk.variant.variantcontext.Genotype

        //use that data.
        for (String sampleName : variant.getSampleNamesOrderedByName()) {
            boolean isPref = sampleName.equalsIgnoreCase(prefSampleName);
            if (isPref || mutationString == null) {
                mutationString = ParsingUtils.join("/", ParsingUtils.sortList(variant.getAlleles()));
                Genotype genotype = variant.getGenotype(sampleName);
                gtt = genotype.getType();
                if (isPref) break;
            } else {
                //If we have several samples with different mutations, don't know which
                //to pick. Make that obvious to the user
                if (gtt != variant.getGenotype(sampleName).getType()) {
View Full Code Here

Examples of htsjdk.variant.variantcontext.Genotype

            if ( currentBlock != null && ! currentBlock.isContiguous(vc) ) {
                // we've made a non-contiguous step (across interval, onto another chr), so finalize
                emitCurrentBlock();
            }

            final Genotype g = vc.getGenotype(0);
            if ( g.isHomRef() && vc.hasAlternateAllele(GATKVariantContextUtils.NON_REF_SYMBOLIC_ALLELE) && vc.isBiallelic() ) {
                // create bands
                final VariantContext maybeCompletedBand = addHomRefSite(vc, g);
                if ( maybeCompletedBand != null ) underlyingWriter.add(maybeCompletedBand);
            } else {
                // g is variant, so flush the bands and emit vc
View Full Code Here

Examples of htsjdk.variant.variantcontext.Genotype

    }

    @Test(enabled = true, dataProvider = "TestCombineGLs")
    public void testCombineGLsPrecise(final int altIndex, final int nAlts, final Genotype testg, final Genotype expected) {
        final IndependentAllelesDiploidExactAFCalculator calc = (IndependentAllelesDiploidExactAFCalculator) AFCalculatorImplementation.EXACT_INDEPENDENT.newInstance();
        final Genotype combined = calc.combineGLsPrecise(testg, altIndex, nAlts);

        Assert.assertEquals(combined.getPL(), expected.getPL(),
                "Combined PLs " + Utils.join(",", combined.getPL()) + " != expected " + Utils.join(",", expected.getPL()));
    }
View Full Code Here

Examples of htsjdk.variant.variantcontext.Genotype

    }

    @Test(enabled = true, dataProvider = "TestCombineGLs")
    public void testCombinePrecise(final int altIndex, final int nAlts, final Genotype testg, final Genotype expected) {
        final IndependentAllelesDiploidExactAFCalculator calc = (IndependentAllelesDiploidExactAFCalculator) AFCalculatorImplementation.EXACT_INDEPENDENT.newInstance();
        final Genotype combined = calc.combineGLsPrecise(testg, altIndex, nAlts);

        Assert.assertEquals(combined.getPL(), expected.getPL(),
                "Combined PLs " + Utils.join(",", combined.getPL()) + " != expected " + Utils.join(",", expected.getPL()));
    }
View Full Code Here

Examples of htsjdk.variant.variantcontext.Genotype

        final VariantContextBuilder vcAC = new VariantContextBuilder(root).alleles(Arrays.asList(A, C));
        final VariantContextBuilder vcAG = new VariantContextBuilder(root).alleles(Arrays.asList(A, G));
        final VariantContextBuilder vcACG = new VariantContextBuilder(root).alleles(Arrays.asList(A, C, G));
        final VariantContextBuilder vcAGC = new VariantContextBuilder(root).alleles(Arrays.asList(A, G, C));

        final Genotype gACG = makePL( 0, 1, 2, 3, 4, 5);
        final Genotype gAGC = makePL( 0, 4, 5, 1, 3, 2);
        final Genotype gACcombined = makePL(0, 2, 5);
        final Genotype gACcombined2 = makePL(0, 1, 4);
        final Genotype gAGcombined = makePL(0, 4, 9);

        // biallelic
        tests.add(new Object[]{vcAC.genotypes(gACcombined).make(), Arrays.asList(vcAC.genotypes(gACcombined).make())});

        // tri-allelic
View Full Code Here

Examples of htsjdk.variant.variantcontext.Genotype

                Assert.assertFalse(refModel.hasLog10PError());
                Assert.assertEquals(refModel.getAlternateAlleles().size(), 1);
                Assert.assertEquals(refModel.getAlternateAllele(0), GATKVariantContextUtils.NON_REF_SYMBOLIC_ALLELE);
                Assert.assertTrue(refModel.hasGenotype(sample));

                final Genotype g = refModel.getGenotype(sample);
                Assert.assertTrue(g.hasAD());
                Assert.assertTrue(g.hasDP());
                Assert.assertEquals(g.getDP(), expectedDP);
                Assert.assertTrue(g.hasGQ());
                Assert.assertTrue(g.hasPL());
            }

            final VariantContext vc = call == null ? refModel : call;
            if ( curPos.getStart() == vc.getStart() ) {
                for ( int pos = vc.getStart(); pos <= vc.getEnd(); pos++ ) {
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.