Chromosome 20
Analysed using standard human sequence analysis pipeline. Annotated twice, and checked by Chr. 20 group. Gene structures imported into EnsEMBL db. EnsEMBL analysis pipeline used to run RepeatMasker and CpG island prediction. EnsEMBL db used to generate the statistics for the paper. Need to make fold-out figure of the chromosome
for the paper. Chr. 22 was a big GIF. Decided
to use PostScript, and to use
Perl TkUse Tk v8Tried using the site installed Tk v4, but immediately found that I could not create a MainWindow via the OO interface: my $mw = MainWindow->new; produces a fatal error. Installed Tk v800.022, which does what it says. Tk::CanvasDrawing graphic itemsItems are drawn on the canvas using the
# Draw a red rectangle with no outline my $rec = $canvas->createRectangle( $x1, $y1, $x2, $y2, -fill => 'red', -outline => undef, -tags => [@tags], ); Coordinates are 0,0 in top left of canvas, and are floating points. The return value, Tags, which are strings, can be added to items, and are used to group items. In many Canvas methods, they can be used interchangeably with the integer identifiers of the items. Canvas has lots of useful methods, eg: # Find the bounding box of all the # items with the tag "gene" my @bbox = $canvas->bbox('gene'); Image dataWe have about 90,000 repeat features on Chr. 20. Didn't want to draw a separate rectangle for each feature, because they would be too small, and would produce too big a PostScript file. Created images with Lincoln Stein's GD module, where each pixel is coloured according to the density of repeats under it. Tried to place images without using an intermediate file: my $image = $canvas->Photo( '-format' => 'gif', -data => $gd->gif, ); $canvas->createImage( $x, $y, -anchor => 'nw', -image => $image, ); This fails. The reason, which isn't in the documentation, is that the data needs to be base64 encoded: use MIME::Base64 'encode_base64'; my $image = $canvas->Photo( '-format' => 'gif', -data => encode_base64($gd->gif), ); Scaling$mw->scaling(1); X displays have a resolution which is set
accoring to their size. This affects the size of
the fonts relative to the other items in the
PostScript output from Tk::Canvas, but
setting You need to call What's Missing?Biggest feature missing is the ability to rotate Canvas items. Particularly useful for text. GenomeCanvasGenomeCanvas is a set of modules for drawing an overview of a genomic region. ![]() Dotted arrows show inheritance, solid arrows references. CanvasWindow::MainWindowmy $mw = CanvasWindow::MainWindow->new;
Sets default background colour, X resources, key bindings and scaling.
GenomeCanvasmy $gc = GenomeCanvas->new($mw); my $canvas = $gc->canvas;
The It is a container for a number of
$gc->add_Band($band); Objects are drawn on the Canvas by calling the
$gc->render; GenomeCanvas::BandThere is a different
Each Band module implements a
The GenomeCanvas object also gives each Band a tag, which the Band attaches to everything it draws. After calling the
Bio::EnsEMBL::Virtual::ContigEach band typically holds a reference to an EnsEMBL VirtualContig object. This is a convenient data structure, which presents sequence features in arbitrary genomic coordinates via a number of methods. my @repeats = $vc->get_all_RepeatFeatures; GenomeCanvas::StateBoth State is used to hold information common to the whole GenomeCanvas, such as the current y-axis offset, and a reference to the Canvas object. The State is actually held in a single
anonymous hash, which everything in a
GenomeCanvas has a reference to. Because
everything inherits from the
# GenomeCanvas sets the y-axis offset $gc->y_offset(203); ... # Which is retrieved by the Band object my $y_offset = $band->y_offset; EnsEMBLGenomeCanvas can be pointed at any EnsEMBL database. The code will be released as an EnsEMBL CVS
module, probably |