Examples of alleles()


Examples of htsjdk.variant.variantcontext.GenotypeBuilder.alleles()

    @Test
    public void testMinMedian() {
        //TODO - might be better to make this test use a data provider?
        final HomRefBlock band = new HomRefBlock(vc, 10, 20, HomoSapiensConstants.DEFAULT_PLOIDY);
        final GenotypeBuilder gb = new GenotypeBuilder("NA12878");
        gb.alleles(vc.getAlleles());

        int pos = vc.getStart();
        band.add(pos++, gb.DP(10).GQ(11).PL(new int[]{0,11,100}).make());
        Assert.assertEquals(band.getStop(), pos - 1);
        assertValues(band, 10, 10, 11, 11);
View Full Code Here

Examples of htsjdk.variant.variantcontext.GenotypeBuilder.alleles()

    @Test
    public void testBigGQIsCapped() {
        final HomRefBlock band = new HomRefBlock(vc, 10, 20, HomoSapiensConstants.DEFAULT_PLOIDY);
        final GenotypeBuilder gb = new GenotypeBuilder("NA12878");
        gb.alleles(vc.getAlleles());

        band.add(vc.getStart(), gb.DP(1000).GQ(1000).PL(new int[]{0,10,100}).make());
        assertValues(band, 1000, 1000, 99, 99);
    }
View Full Code Here

Examples of htsjdk.variant.variantcontext.VariantContextBuilder.alleles()

            ref = deletion.getReference();
            alt = insertion.getAlternateAllele(0);
            b.stop(deletion.getEnd());
        }

        return b.alleles(Arrays.asList(ref, alt)).make();
    }

    // TODO -- warning this is an O(N^3) algorithm because I'm just lazy.  If it's valuable we need to reengineer it
    @Requires("getNumberOfEvents() > 0")
    protected void replaceClumpedEventsWithBlockSubstitutions() {
View Full Code Here

Examples of htsjdk.variant.variantcontext.VariantContextBuilder.alleles()

        final byte[] refBases = Arrays.copyOfRange(ref, refStartOffset, refEndOffset + 1);
        final byte[] hapBases = AlignmentUtils.getBasesCoveringRefInterval(refStartOffset, refEndOffset, haplotype.getBases(), haplotype.getAlignmentStartHapwrtRef(), haplotype.getCigar());

        final VariantContextBuilder builder = new VariantContextBuilder(first);
        builder.stop(first.getStart() + refBases.length - 1);
        builder.alleles(Arrays.asList(Allele.create(refBases, true), Allele.create(hapBases)));
        final VariantContext block = builder.make();

        // remove all merged events
        for ( final VariantContext merged : neighbors ) {
            if ( remove(merged.getStart()) == null )
View Full Code Here

Examples of htsjdk.variant.variantcontext.VariantContextBuilder.alleles()

    /** Makes a new VariantContext with only the desired samples. */
    private static VariantContext subsetToSamplesWithOriginalAnnotations(final VariantContext ctx, final Set<String> samples) {
        final VariantContextBuilder builder = new VariantContextBuilder(ctx);
        final GenotypesContext newGenotypes = ctx.getGenotypes().subsetToSamples(samples);
        builder.alleles(ctx.getAlleles());
        return builder.genotypes(newGenotypes).make();
    }
}
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.