[Bioperl-l] help with PHRAP assembly & Bio::Graphics
Mariano Latorre A
malatorr at genoma.ciencias.uchile.cl
Wed Jan 19 08:57:00 EST 2005
Hi!
I'm developing a bioperl cgi to show a png PHRAP assembly using
Bio::Graphics + perl cgi.
The problem is that the Contig deffines the zero position and usually
the alignment ESTs are located before the contig. This implies I need to
use negative positions...but Bio::graphics doesn't allow to use negative
positions...it just cuts them off.
PD: I paste my source code.
--
Mariano Latorre A <malatorr at genoma.ciencias.uchile.cl>
Universidad de Chile
######################################################################################
#THE CGI "render.pl"
#!/usr/bin/perl
use CGI;
use lib "$ENV{HOME}/projects/bioperl-live";
use Bio::Graphics;
use Bio::SeqFeature::Generic;
my $form = new CGI;
print "Content-type: image/png\n\n";
my $panel = Bio::Graphics::Panel->new(-length => 2000,-width => 1800, -
pad_left => 10, -pad_right => 10,);
my $full_length = Bio::SeqFeature::Generic->new(-start=>$form->param
("start"),-end=>$form->param("end"));
$panel->add_track($full_length,
-glyph => 'arrow',
-tick => 2,
-fgcolor => 'black',
-double => 1,
);
my $track = $panel->add_track(-glyph => 'graded_segments',
-label => 1,
-bgcolor => 'blue',
-min_score => -200,
-max_score => 1000);
for($i=1;defined($form->param("est$i"));$i++){
my($name,$score,$start,$end) = split /\@/,$form->param("est$i");
my $feature = Bio::SeqFeature::Generic->new(-display_name=>$name,
-score=>$score,
-start=>$start,
-end=>$end);
$track->add_feature($feature);
}
print $panel->png;
######################################################################################
# The Url to call the CGI
render.pl?
est1=hola at 300@-200 at 367@&est2=chau at 50@300 at 600@&est3=nada at 50@310 at 25@&start=1&end=800
######################################################################################
More information about the Bioperl-l
mailing list