Package htsjdk.variant.variantcontext

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


        VariantContextBuilder builder = new VariantContextBuilder(vContext).filters(filters);
        numRecords++;

        // add the info fields
        builder.attribute("NoCallPct", String.format("%.1f", 100.0 * noCallProp));
        builder.attribute("HomRefPct", String.format("%.1f", 100.0 * homRefProp));
        builder.attribute("HomVarPct", String.format("%.1f", 100.0 * homVarProp));
        builder.attribute("HetPct", String.format("%.1f", 100.0 * hetProp));
        builder.attribute("HW", String.format("%.2f", hwScore));
        Collection<Allele> altAlleles = vContext.getAlternateAlleles();
View Full Code Here


        VariantContextBuilder builder = new VariantContextBuilder(vContext).filters(filters);
        numRecords++;

        // add the info fields
        builder.attribute("NoCallPct", String.format("%.1f", 100.0 * noCallProp));
        builder.attribute("HomRefPct", String.format("%.1f", 100.0 * homRefProp));
        builder.attribute("HomVarPct", String.format("%.1f", 100.0 * homVarProp));
        builder.attribute("HetPct", String.format("%.1f", 100.0 * hetProp));
        builder.attribute("HW", String.format("%.2f", hwScore));
        Collection<Allele> altAlleles = vContext.getAlternateAlleles();
        int altAlleleCount = altAlleles.size() == 0 ? 0 : vContext.getCalledChrCount(altAlleles.iterator().next());
View Full Code Here

        numRecords++;

        // add the info fields
        builder.attribute("NoCallPct", String.format("%.1f", 100.0 * noCallProp));
        builder.attribute("HomRefPct", String.format("%.1f", 100.0 * homRefProp));
        builder.attribute("HomVarPct", String.format("%.1f", 100.0 * homVarProp));
        builder.attribute("HetPct", String.format("%.1f", 100.0 * hetProp));
        builder.attribute("HW", String.format("%.2f", hwScore));
        Collection<Allele> altAlleles = vContext.getAlternateAlleles();
        int altAlleleCount = altAlleles.size() == 0 ? 0 : vContext.getCalledChrCount(altAlleles.iterator().next());
        if ( !isViolation && altAlleleCount > 0 )
View Full Code Here

        // add the info fields
        builder.attribute("NoCallPct", String.format("%.1f", 100.0 * noCallProp));
        builder.attribute("HomRefPct", String.format("%.1f", 100.0 * homRefProp));
        builder.attribute("HomVarPct", String.format("%.1f", 100.0 * homVarProp));
        builder.attribute("HetPct", String.format("%.1f", 100.0 * hetProp));
        builder.attribute("HW", String.format("%.2f", hwScore));
        Collection<Allele> altAlleles = vContext.getAlternateAlleles();
        int altAlleleCount = altAlleles.size() == 0 ? 0 : vContext.getCalledChrCount(altAlleles.iterator().next());
        if ( !isViolation && altAlleleCount > 0 )
            numTrueVariants++;
View Full Code Here

        // add the info fields
        builder.attribute("NoCallPct", String.format("%.1f", 100.0 * noCallProp));
        builder.attribute("HomRefPct", String.format("%.1f", 100.0 * homRefProp));
        builder.attribute("HomVarPct", String.format("%.1f", 100.0 * homVarProp));
        builder.attribute("HetPct", String.format("%.1f", 100.0 * hetProp));
        builder.attribute("HW", String.format("%.2f", hwScore));
        Collection<Allele> altAlleles = vContext.getAlternateAlleles();
        int altAlleleCount = altAlleles.size() == 0 ? 0 : vContext.getCalledChrCount(altAlleles.iterator().next());
        if ( !isViolation && altAlleleCount > 0 )
            numTrueVariants++;
        builder.attribute(VCFConstants.ALLELE_COUNT_KEY, String.format("%d", altAlleleCount));
View Full Code Here

        builder.attribute("HW", String.format("%.2f", hwScore));
        Collection<Allele> altAlleles = vContext.getAlternateAlleles();
        int altAlleleCount = altAlleles.size() == 0 ? 0 : vContext.getCalledChrCount(altAlleles.iterator().next());
        if ( !isViolation && altAlleleCount > 0 )
            numTrueVariants++;
        builder.attribute(VCFConstants.ALLELE_COUNT_KEY, String.format("%d", altAlleleCount));
        builder.attribute(VCFConstants.ALLELE_NUMBER_KEY, String.format("%d", vContext.getCalledChrCount()));

        return builder.make();
    }
View Full Code Here

        Collection<Allele> altAlleles = vContext.getAlternateAlleles();
        int altAlleleCount = altAlleles.size() == 0 ? 0 : vContext.getCalledChrCount(altAlleles.iterator().next());
        if ( !isViolation && altAlleleCount > 0 )
            numTrueVariants++;
        builder.attribute(VCFConstants.ALLELE_COUNT_KEY, String.format("%d", altAlleleCount));
        builder.attribute(VCFConstants.ALLELE_NUMBER_KEY, String.format("%d", vContext.getCalledChrCount()));

        return builder.make();
    }

    private double hardyWeinbergCalculation(VariantContext vc) {
View Full Code Here

        } else {
            // have to do the work
            VariantContextBuilder builder = new VariantContextBuilder(vcsub);

            if ( isSingleton )
                builder.attribute(VariantEval.IS_SINGLETON_KEY, true);

            if ( ! hasChrCountAnnotations )
                VariantContextUtils.calculateChromosomeCounts(builder, true);

            return builder.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.