Examples of genotypes()


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

        gb.PL(block.getMinPLs());

        // This annotation is no longer standard
        //gb.attribute(MIN_GQ_FORMAT_FIELD, block.getMinGQ());

        return vcb.genotypes(gb.make()).make();
    }

    /**
     * Helper function to create a new HomRefBlock from a variant context and current genotype
     *
 
View Full Code Here

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

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

        // tri-allelic
        tests.add(new Object[]{vcACG.genotypes(gACG).make(), Arrays.asList(vcAC.genotypes(gACcombined).make(), vcAG.genotypes(gAGcombined).make())});
        tests.add(new Object[]{vcAGC.genotypes(gAGC).make(), Arrays.asList(vcAG.genotypes(gAGcombined).make(), vcAC.genotypes(gACcombined2).make())});

        return tests.toArray(new Object[][]{});
    }

View Full Code Here

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

                for ( final int position : MathUtils.log10LinearRange(0, vc.getNSamples(), 0.1) ) {
                    final VariantContextBuilder vcb = new VariantContextBuilder(vc);
                    final List<Genotype> genotypes = new ArrayList<Genotype>(vc.getGenotypes());
                    Collections.rotate(genotypes, position);
                    vcb.genotypes(genotypes);

                    timer.start();
                    final AFCalculationResult resultTracker = calc.getLog10PNonRef(vcb.make(), HomoSapiensConstants.DEFAULT_PLOIDY, testBuilder.numAltAlleles, priors);
                    final long runtime = timer.getElapsedTimeNano();
View Full Code Here

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

    /** 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

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

            else {
                gtBuilder.filters(filters);
            }
            newGenotypes.add(gtBuilder.make());
        }
        builder.genotypes(newGenotypes);

        return builder.make();
    }

    @Override public boolean hasNext() { return this.iterator.hasNext(); }
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.