Package com.affymetrix.genoviz.glyph

Examples of com.affymetrix.genoviz.glyph.StretchContainerGlyph


     * @return a GlyphI
     * @see     com.affymetrix.genoviz.glyph.StretchContainerGlyph
     * @see     com.affymetrix.genoviz.bioviews.GlyphI
     */
    GlyphI getSummaryGlyph(Collection<GlyphI> glyphsToSummarize) {
        GlyphI summaryGlyph = new StretchContainerGlyph();
    int[] transitions = determineTransitions(glyphsToSummarize);
    int[] unique_transitions = determineUniqueTransitions(transitions);
        int segCount = unique_transitions.length - 1;
        for (int i = 0; i < segCount; i++) {
            /**
             * Construct a glyph summarySegment for every sequential pair of transition points,
             *    with x = array[i] and width = array[i+1] - array[i],
             *    and y = FLOAT_MIN/2 and height = FLOAT_MAX (???)
             */
            int segStart = unique_transitions[i];
            int segEnd = unique_transitions[i + 1];

            GlyphI newgl = new FillRectGlyph();
            newgl.setColor(glyph_color);

      int hitCount = determineGlyphHits(glyphsToSummarize, segEnd, segStart);

            /**
             * reset y = 0 and height = # of hits
             */
            //      newgl.setCoords(segStart, 0, segEnd - segStart, hitCount);
            // just hardwiring height multiple till get normalization code implemented
            //      newgl.setCoords(segStart, 0, segEnd - segStart, hitCount*10);
            // if want to filter out regions with no hits, uncomment out conditional
            newgl.setCoords(segStart, -hitCount * scale_factor, segEnd - segStart, hitCount * scale_factor);
      summaryGlyph.addChild(newgl);
        }

        /**
         * 5) normalize height somehow...
         *  NOT YET IMPLEMENTED
View Full Code Here

TOP

Related Classes of com.affymetrix.genoviz.glyph.StretchContainerGlyph

Copyright © 2018 www.massapicom. 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.