[Bioperl-l] Re: Quick bio::graphics question

Lincoln Stein lstein at cshl.edu
Tue May 4 12:29:23 EDT 2004


Hi Adam,

You need to read further than the synopsis and see that the 
Bio::Graphics::Panel->new() method provides a wealth of options for 
setting the position of the leftmost edge of the panel.  In 
particular, look at the -offset, -start and -segment options.

Lincoln

On Tuesday 04 May 2004 12:19 pm, you wrote:
> In reply to this, Im also trying to get the ruler to show not
> 1-130000 but from 60000-130000 when I try doing this using the
> following code:
>
> 	$seqlength = 130000;
> 	$start = 60000;
> 	$end = $seqlength;
> 	$length = $seqlength - $start;
>
> 	#create a new Panel object
> 	my $panel = Bio::Graphics::Panel->new(-length => $length,
>                                      	      -key_style=>'between',
> 				     	      -width  =>1100,
>                                               -pad_left => 10,
>                                               -pad_right => 10,
> 				              -pad_top => 10,
> 				              -pad_bottom => 10);
>
>
> 	my $full_length =
> Bio::SeqFeature::Generic->new(-start=>$start,-end=>$seqlength);
>
> 	$panel->add_track($full_length,
>       		            -glyph   => 'arrow',
>                		    -tick    => 2,
>                		    -fgcolor => 'black',
>                 	    -double  => 1,
> 		 	    -base => 'true');
>
>
> then it doesnt work. If you try and smaller figure to start (e.g.
> 5000) then it works but it just shifts the ruler to the right and
> draws it as it did before but just missing out the first 5000,
> which is obviously no good. I also want to give it co-ordinates as
> before for exon structures in the same place but I want it to draw
> it in the correct place in relation to the new ruler. Can you do
> this?
>
> cheers,
>
> Adam
>
>
> Adam Woolfe
> Comparative Genomics Group
> MRC Rosalind Franklin Centre for Genomics Research
> Wellcome Trust Genome Campus, Hinxton, Cambridge, CB10 1SB, UK
> Tel: +44 1223 494500  Fax: +44 1223 494512
> E-mail: awoolfe at rfcgr.mrc.ac.uk  Web: http://www.rfcgr.mrc.ac.uk
>
> On Sat, 1 May 2004, Lincoln Stein wrote:
> > Hi Tim,
> >
> > Sorry it took so long for me to respond, but I've been traveling
> > and reading my e-mail intermittently.  If you create a feature
> > that starts and stops in chromosomal coordinates, rather than
> > going from 1 to $length, then the ruler will show the appropriate
> > coordinates.  Simple, eh?
> >
> > I hope this fixes your problem.
> >
> > Lincoln
> >
> > On Thursday 22 April 2004 09:41 am, Tim Nugent wrote:
> > > Hi Lincoln,
> > >
> > > Quick bio::graphics question. How can I get the ruler to show
> > > actual chromosomal coordinates rather than 0 to the end of
> > > panel in 10K increments?
> > >
> > > Cheers,
> > >
> > > Tim
> > >
> > > 	my $full_length = Bio::SeqFeature::Generic->new(-start=>1,
> > >
> > > -end=>$length);
> > >
> > > 	$panel->add_track($full_length,
> > > 			      -glyph   => 'arrow',
> > > 			      -tick    => 2,
> > > 			      -fgcolor => 'black',
> > > 			      -double  => 1
> > > 			  );
> >
> > --
> > Lincoln Stein
> > lstein at cshl.edu
> > Cold Spring Harbor Laboratory
> > 1 Bungtown Road
> > Cold Spring Harbor, NY 11724
> > (516) 367-8380 (voice)
> > (516) 367-8389 (fax)
> > _______________________________________________
> > Bioperl-l mailing list
> > Bioperl-l at portal.open-bio.org
> > http://portal.open-bio.org/mailman/listinfo/bioperl-l

-- 
Lincoln D. Stein
Cold Spring Harbor Laboratory
1 Bungtown Road
Cold Spring Harbor, NY 11724


More information about the Bioperl-l mailing list