Examples of AlignmentContext


Examples of org.apache.fop.layoutmgr.inline.AlignmentContext

        TraitSetter.addFontTraits(curArea, font);
        curArea.addTrait(Trait.COLOR, fobj.getColor());

        // TODO: may need some special handling for fo:character
        alignmentContext = new AlignmentContext(font
                                    , font.getFontSize()
                                    , fobj.getAlignmentAdjust()
                                    , fobj.getAlignmentBaseline()
                                    , fobj.getBaselineShift()
                                    , fobj.getDominantBaseline()
View Full Code Here

Examples of org.apache.fop.layoutmgr.inline.AlignmentContext

        TraitSetter.addFontTraits(curArea, font);
        curArea.addTrait(Trait.COLOR, fobj.getColor());

        // TODO: may need some special handling for fo:character
        alignmentContext = new AlignmentContext(font
                                    , font.getFontSize()
                                    , fobj.getAlignmentAdjust()
                                    , fobj.getAlignmentBaseline()
                                    , fobj.getBaselineShift()
                                    , fobj.getDominantBaseline()
View Full Code Here

Examples of org.apache.fop.layoutmgr.inline.AlignmentContext

        TraitSetter.addFontTraits(curArea, font);
        curArea.addTrait(Trait.COLOR, fobj.getColor());

        // TODO: may need some special handling for fo:character
        alignmentContext = new AlignmentContext(font
                                    , font.getFontSize()
                                    , fobj.getAlignmentAdjust()
                                    , fobj.getAlignmentBaseline()
                                    , fobj.getBaselineShift()
                                    , fobj.getDominantBaseline()
View Full Code Here

Examples of org.apache.fop.layoutmgr.inline.AlignmentContext

        curArea.addTrait(Trait.FONT_NAME, font.getFontName());
        curArea.addTrait(Trait.FONT_SIZE, new Integer(font.getFontSize()));
        curArea.addTrait(Trait.COLOR, fobj.getColor());

        // TODO: may need some special handling for fo:character
        alignmentContext = new AlignmentContext(font
                                    , font.getFontSize()
                                    , fobj.getAlignmentAdjust()
                                    , fobj.getAlignmentBaseline()
                                    , fobj.getBaselineShift()
                                    , fobj.getDominantBaseline()
View Full Code Here

Examples of org.broadinstitute.gatk.engine.contexts.AlignmentContext

            PerReadAlleleLikelihoodMap indelLikelihoodMap = null;
            ReadBackedPileup pileup = null;


            if (stratifiedContexts != null) { // the old UG SNP-only path through the annotations
                final AlignmentContext context = stratifiedContexts.get(genotype.getSampleName());
                if ( context != null )
                    pileup = context.getBasePileup();
            }
            if (stratifiedPerReadAlleleLikelihoodMap != null )
                indelLikelihoodMap = stratifiedPerReadAlleleLikelihoodMap.get(genotype.getSampleName());

            if (indelLikelihoodMap != null && indelLikelihoodMap.isEmpty())
View Full Code Here

Examples of org.broadinstitute.gatk.engine.contexts.AlignmentContext

       
        int[][] table = new int[2][2];

        for ( String sample : stratifiedContexts.keySet() ) {
            final PerReadAlleleLikelihoodMap indelLikelihoodMap = stratifiedLikelihoodMap.get(sample);
            final AlignmentContext context = stratifiedContexts.get(sample);
            if ( context == null || indelLikelihoodMap == null )
                continue;

            ReadBackedPileup pileup = context.getBasePileup();
            if (pileup == null)
                 continue;

            for (final PileupElement p: pileup) {
                if ( p.getRead().getMappingQuality() < 20)
View Full Code Here

Examples of org.broadinstitute.gatk.engine.contexts.AlignmentContext

       
        int[][] table = new int[2][2];

        for ( String sample : stratifiedContexts.keySet() ) {
            final PerReadAlleleLikelihoodMap indelLikelihoodMap = stratifiedLikelihoodMap.get(sample);
            final AlignmentContext context = stratifiedContexts.get(sample);
            if ( context == null || indelLikelihoodMap == null )
                continue;

            ReadBackedPileup pileup = context.getBasePileup();
            if (pileup == null)
                 continue;

            for (final PileupElement p: pileup) {
                if ( p.getRead().getMappingQuality() < 20)
View Full Code Here

Examples of org.broadinstitute.gatk.engine.contexts.AlignmentContext

                standardDepth += totalADdepth;
                continue;
            }

            if (stratifiedContexts!= null && !stratifiedContexts.isEmpty()) {
                final AlignmentContext context = stratifiedContexts.get(genotype.getSampleName());
                if ( context == null )
                    continue;
                standardDepth += context.getBasePileup().depthOfCoverage();

            } else if (perReadAlleleLikelihoodMap != null) {
                final PerReadAlleleLikelihoodMap perReadAlleleLikelihoods = perReadAlleleLikelihoodMap.get(genotype.getSampleName());
                if (perReadAlleleLikelihoods == null || perReadAlleleLikelihoods.isEmpty())
                    continue;
View Full Code Here

Examples of org.broadinstitute.gatk.engine.contexts.AlignmentContext

                                        final VariantContext vc) {

        if (stratifiedContexts.size() == 0) // size 0 means that call was made by someone else and we have no data here
            return null;

        final AlignmentContext context = AlignmentContextUtils.joinContexts(stratifiedContexts.values());

        final int contextWingSize = Math.min((ref.getWindow().size() - 1) / 2, MIN_CONTEXT_WING_SIZE);
        final int contextSize = contextWingSize * 2 + 1;

        final int locus = ref.getLocus().getStart() + (ref.getLocus().getStop() - ref.getLocus().getStart()) / 2;

        final ReadBackedPileup pileup = context.getBasePileup();

        // Compute all haplotypes consistent with the current read pileup
        final List<Haplotype> haplotypes = computeHaplotypes(pileup, contextSize, locus, vc);

        final MathUtils.RunningAverage scoreRA = new MathUtils.RunningAverage();
        if (haplotypes != null) {
            for (final Genotype genotype : vc.getGenotypes()) {
                final AlignmentContext thisContext = stratifiedContexts.get(genotype.getSampleName());
                if (thisContext != null) {
                    final ReadBackedPileup thisPileup = thisContext.getBasePileup();
                    scoreRA.add(scoreReadsAgainstHaplotypes(haplotypes, thisPileup, contextSize, locus)); // Taking the simple average of all sample's score since the score can be negative and the RMS doesn't make sense
                }
            }
        }

View Full Code Here

Examples of org.broadinstitute.gatk.engine.contexts.AlignmentContext

        if ( stratifiedContexts != null ) {
            if ( stratifiedContexts.size() == 0 )
                return null;

            for ( final Map.Entry<String, AlignmentContext> sample : stratifiedContexts.entrySet() ) {
                final AlignmentContext context = sample.getValue();
                for ( final PileupElement p : context.getBasePileup() )
                    fillMappingQualitiesFromPileup(p.getRead().getMappingQuality(), qualities);
            }
        }
        else if (perReadAlleleLikelihoodMap != null) {
            if ( perReadAlleleLikelihoodMap.size() == 0 )
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.