Package com.affymetrix.genoviz.glyph

Examples of com.affymetrix.genoviz.glyph.LineContainerGlyph


   * @param childcount - exon count
   * @return
   */
  private GlyphI glyphifyExons(
      SeqSymmetry mrna2genome, MutableSeqSymmetry annot2genome, int childcount) {
    GlyphI tGlyph = new LineContainerGlyph();
    seqmap.setDataModel(tGlyph, mrna2genome);
    SeqSpan tSpan = annot2genome.getSpan(vseq);
    tGlyph.setCoords(tSpan.getMin(), 0, tSpan.getLength(), 20);
    tGlyph.setColor(col_ts);
    for (int i = 0; i < childcount; i++) {
      SeqSymmetry exon2genome = annot2genome.getChild(i);
      SeqSpan gSpan = exon2genome.getSpan(vseq);
      GlyphI cglyph = new OutlineRectGlyph();
      seqmap.setDataModel(cglyph, exon2genome);
      // can't give this a type and therefore signal
      // to the selection logic that this is first class selectable
      // object
      // so let's put it in a list
      exonList.add(exon2genome);
      cglyph.setColor(col_ts);
      cglyph.setCoords(gSpan.getMin(), 0, gSpan.getLength(), 20);
      exonGlyphs.add(cglyph);
      tGlyph.addChild(cglyph);
      //  testing display of "exon segments" for transcripts that have
      //     base inserts relative to the genomic sequence
      //  haven't dealt with display of base deletions in transcript relative to genomic yet
      //  if exon is segmented by inserts, then it will have children
      //     that specify this segmentation
      for (int seg_index = 0; seg_index < exon2genome.getChildCount(); seg_index++) {
        SeqSymmetry eseg2genome = exon2genome.getChild(seg_index);
        SeqSpan seg_gspan = eseg2genome.getSpan(vseq);
        if (seg_gspan.getLength() == 0) {
          // only mark the inserts (those whose genomic extent is zero
          GlyphI segGlyph = new OutlineRectGlyph();
          segGlyph.setColor(col_bg);
          segGlyph.setCoords(seg_gspan.getMin(), 0, seg_gspan.getLength(), 25);
          tGlyph.addChild(segGlyph);
        }
      }
    }
    return tGlyph;
  }
View Full Code Here


      amino_acid = protein.getResidues(0, protein.getLength());
    }catch(Exception ex){
      System.out.println("*** Warning: No amino acid found ");
    }

        GlyphI aGlyph = new LineContainerGlyph();
        SeqSpan aSpan = annot2genome.getSpan(vseq);
        aGlyph.setCoords(aSpan.getMin(), 0, aSpan.getLength(), 20);
        aGlyph.setColor(col_ts);
        seqmap.setDataModel(aGlyph, annot2mrna);
    glyphifyCDSs(annot2genome, protein, aGlyph, amino_acid, vseq);
        trans_parent.addChild(aGlyph);
    displayAssociatedmRNAforProtein(protein, path2view, annot2mrna, tier);
    }
View Full Code Here

        SeqUtils.transformSymmetry(annot2genome, path2view);
        if (DEBUG_PROTEIN_ANNOTS) {
            SeqUtils.printSymmetry(annot2genome);
        }

        GlyphI aGlyph = new LineContainerGlyph();
        seqmap.setDataModel(aGlyph, annot2protein);

        SeqSpan aSpan = annot2genome.getSpan(vseq);
        aGlyph.setCoords(aSpan.getMin(), 0, aSpan.getLength(), 20);
        // will return a color from the prefs for the protein annotation
        // span -- or else the default - col_domain
        Color color = pick_color_for_domain(aSpan, prefs_hash);
        aGlyph.setColor(color);

        // for now, need to descend two levels because that is depth of path --
        //    eventually will use some sort of flattening method (probably
        //    first set up as part of SeqUtils)
        int count1 = annot2genome.getChildCount();
        for (int i = 0; i < count1; i++) {

            SeqSymmetry child = annot2genome.getChild(i);
            int count2 = child.getChildCount();

            // reach "back" and get actual symmetry (rather than transformed symmetry)
            //   really need some sort of tracking in transform mechanism to associate calculated
            //   symmetries with original symmetries that they map back to...
            SymWithProps original_child = (SymWithProps) annot2protein.getChild(i);

            for (int j = 0; j < count2; j++) {
                SeqSymmetry grandchild = child.getChild(j);
                SeqSpan gSpan = grandchild.getSpan(vseq);
                LabelledRectGlyph cglyph = new LabelledRectGlyph();
        if(i%2 == 0) {
          cglyph.setColor(color);
        }
        else {
          cglyph.setColor(color.darker());
        }

        String spanno = "Span " + String.valueOf(i+1) + " of ";
        String interpro = (String) ((SymWithProps)annot2protein).getProperty("InterPro Name");
        if(interpro != null){
          spanno += interpro;
        }
        cglyph.setText(spanno);
                cglyph.setCoords(gSpan.getMin(), 0, gSpan.getLength(), 20);
                aGlyph.addChild(cglyph);
                seqmap.setDataModel(cglyph, original_child);
                original_child.setProperty("type", "protspan");
            }
        }
        tier.addChild(aGlyph);
View Full Code Here

TOP

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

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.