Bio::Graphics::Panel 1.5.2_005

Description

Bio::Graphics::Panel is a Perl module to generate GD images of Bio::Seq objects. SYNOPSIS # This script parses a GenBank or EMBL file named on the command # line and produces a PNG rendering of it. Call it like this: # render.pl my_file.embl | display - use strict; use Bio::Graphics; use Bio::SeqIO; my $file = shift or die "provide a sequence file as the argument"; my $io = Bio::SeqIO->new(-file=>$file) or die "could not create Bio::SeqIO"; my $seq = $io->next_seq or die "could not find a sequence in the file"; my @features = $seq->all_SeqFeatures; # sort features by their primary tags my %sorted_features; for my $f (@features) { my $tag = $f->primary_tag; push @{$sorted_features{$tag}},$f; } my $panel = Bio::Graphics::Panel->new( -length => $seq->length, -key_style => between, -width => 800, -pad_left => 10, -pad_right => 10, ); $panel->add_track( arrow => Bio::SeqFeature::Generic->new(-start=>1, -end=>$seq->length), -bump => 0, -double=>1, -tick => 2); $panel->add_track(generic => Bio::SeqFeature::Generic->new(-start=>1, -end=>$seq->length), -glyph => generic, -bgcolor => blue, -label => 1, ); # general case my @colors = qw(cyan orange blue purple green chartreuse magenta yellow aqua); my $idx = 0; for my $tag (sort keys %sorted_features) { my $features = $sorted_features{$tag}; $panel->add_track($features, -glyph => generic, -bgcolor => $colors[$idx++ % @colors], -fgcolor => black, -font2color => red, -key => "${tag}s", -bump => +1, -height => 8, -label => 1, -description => 1, ); } print $panel->png; $panel->finished; exit 0; The Bio::Graphics::Panel class provides drawing and formatting services for any object that implements the Bio::SeqFeatureI interface, including Ace::Sequence::Feature and Das::Segment::Feature objects. It can be used to draw sequence annotations, physical (contig) maps, or any other type of map in which a set of discrete ranges need to be laid out on the number line. The module supports a drawing style in which each type of feature occupies a discrete "track" that spans the width of the display. Each track will have its own distinctive "glyph", a configurable graphical representation of the feature. The module also supports a more flexible style in which several different feature types and their associated glyphs can occupy the same track. The choice of glyph is under run-time control. Semantic zooming (for instance, changing the type of glyph depending on the density of features) is supported by a callback system for configuration variables. The module has built-in support for Bio::Das stylesheets, and stylesheet-driven configuration can be intermixed with semantic zooming, if desired. You can add a key to the generated image using either of two key styles. One style places the key captions at the top of each track. The other style generates a graphical key at the bottom of the image. Note that this module depends on GD. The optional SVG output depends on GD::SVG and SVG..

Rcb - Gd - Svg - Biographicspanel - Perl Module - Features - Module - Track - Tag - Style - Libraries

Published By:Lincoln Stein

License Type:Freeware

Date Added:25 October, 2010

Version:RCb

Price:Free

Downloads:13

Size:5.7 MB

Platform: Linux

What people say
- required fields
     
Related Downloads

GD::Map is Perl extension for creating geographic map files with GD.

DateAug 22, 2010

AuthorChris Sutton

Size8.2 KB

LicenseFreeware

PriceFree

PlatformLinux

CategoryLinux Programming

GD::Dashboard is a Perl module to create JPEG graphics of meters and dials. SYNOPSIS my $dash = new GD::Dashboard(); my $g1 = new GD::Dashboard::Gauge( MIN=>0, MAX=>$empcnt, VAL=>$nopwp_cnt, NA1=>3.14/2+0.85, NA2=>3.14/2-0.

DateSep 14, 2010

AuthorDavid Ferrance

Size23.6 KB

LicenseFreeware

PriceFree

PlatformLinux

CategoryLinux Programming

GD::Graph::Thermometer is a Perl module to generate progress graph on the fly. SYNOPSIS use GD::Graph::Thermometer; my $result = GD::Graph::Thermometer->new({ image_path => /path/to/image.

DateOct 14, 2010

AuthorHugh Esco

Size7.2 KB

LicenseFreeware

PriceFree

PlatformLinux

CategoryLinux Programming

MassSpec::ViewSpectrum is a Perl extension for viewing a mass spectrum. SYNOPSIS use MassSpec::ViewSpectrum; open PNG, ">mygraphic.png" or die "Unable to open output filen"; binmode PNG; my @masses = (1036.

DateAug 25, 2010

AuthorJonathan Epstein

Size7.2 KB

LicenseFreeware

PriceFree

PlatformLinux

CategoryLinux Programming

SYNOPSIS ex.

DateOct 14, 2010

AuthorKawai Takanori

Size890.9 KB

LicenseFreeware

PriceFree

PlatformLinux

CategoryLinux Programming