org.utgenome.graphics
Class GeneCanvas

java.lang.Object
  extended by org.utgenome.graphics.GeneCanvas

public class GeneCanvas
extends Object

Browser-side graphic canvas for drawing gene objects

Author:
leo

Nested Class Summary
 class GeneCanvas.LocusLayout
           
 
Constructor Summary
GeneCanvas()
           
GeneCanvas(int pixelWidth, int pixelHeight, GenomeWindow genomeWindow)
           
 
Method Summary
 int colorOffset(int color, float offset)
           
 void draw(Gene gene, Exon exon, CDS cds, int yPosition)
           
 void draw(Gene gene, int yPosition)
           
 void draw(Gene gene, List<Exon> exonList, CDS cds, int yPosition)
           
 void draw(GenomeRange locus, int yOffset)
           
<E extends GenomeRange>
void
draw(List<E> geneList)
           
 void drawGeneRect(long x1, long x2, int y, Color c)
           
 Color getCDSColor(GenomeRange g)
           
 Color getExonColor(GenomeRange g)
           
 String getExonColorText(GenomeRange g)
           
 Color getGeneColor(GenomeRange g)
           
 Color getGeneColor(GenomeRange g, float offset)
           
 Color getIntronColor(GenomeRange g)
           
 Color hexValue2Color(String hex, float offset)
           
 void setGapWidth(int gapWidth)
           
 void setGeneHeight(int height)
           
 void setPixelHeight(int height)
           
 void setThresholdGenes(int thresholdGeneNames)
           
 void toPNG(OutputStream out)
           
static int width(int x1, int x2)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GeneCanvas

public GeneCanvas()

GeneCanvas

public GeneCanvas(int pixelWidth,
                  int pixelHeight,
                  GenomeWindow genomeWindow)
Method Detail

setGeneHeight

public void setGeneHeight(int height)

setPixelHeight

public void setPixelHeight(int height)

width

public static int width(int x1,
                        int x2)

setThresholdGenes

public void setThresholdGenes(int thresholdGeneNames)

setGapWidth

public void setGapWidth(int gapWidth)

draw

public <E extends GenomeRange> void draw(List<E> geneList)

draw

public void draw(GenomeRange locus,
                 int yOffset)

draw

public void draw(Gene gene,
                 List<Exon> exonList,
                 CDS cds,
                 int yPosition)

draw

public void draw(Gene gene,
                 int yPosition)

draw

public void draw(Gene gene,
                 Exon exon,
                 CDS cds,
                 int yPosition)

drawGeneRect

public void drawGeneRect(long x1,
                         long x2,
                         int y,
                         Color c)

toPNG

public void toPNG(OutputStream out)
           throws IOException
Throws:
IOException

getExonColor

public Color getExonColor(GenomeRange g)

getGeneColor

public Color getGeneColor(GenomeRange g)

getGeneColor

public Color getGeneColor(GenomeRange g,
                          float offset)

getCDSColor

public Color getCDSColor(GenomeRange g)

getIntronColor

public Color getIntronColor(GenomeRange g)

getExonColorText

public String getExonColorText(GenomeRange g)

hexValue2Color

public Color hexValue2Color(String hex,
                            float offset)

colorOffset

public int colorOffset(int color,
                       float offset)


Copyright © 2007-2012 utgenome.org. All Rights Reserved.