[Bioperl-l] Bio::Graphics::Glyph::translation how to show the correct sequences

Christine Hoogland christine.hoogland at gmail.com
Tue Mar 18 06:15:28 UTC 2014


Hi,

I'm trying to display the frame translation sequences into images built 
with Bio::Graphics showing exons, introns, CDS... like the example shown 
in figure 13a and 13b on this page:
http://chlamycyc.mpimp-golm.mpg.de/gbrowse/tutorial/dbgff/tutorial.html

Currently sequences shown are always the same, whatever the CDS (see 
image attached), although sequences printed in the console for debugging 
are fine.

my @CDS = sort {$a->start <=> $b->start} $mRNA->CDS;
my $cdsft=Bio::Graphics::Feature->new();
for my $cds (@CDS) {
	$cdsft->add_segment(Bio::Graphics::Feature->new(
				-start=> $cds->start,
				-end  => $cds->end,
				-seq  => Bio::Seq->new(-seq=> $cds->dna, -alphabet => 'dna'),
				-strand => $cds->strand,
				-phase => $cds->phase
			       ));

}

$panel->add_track($cdsft,
             -glyph      => 'translation',
	    -show_sequence => 'true',
             -key        => 'Sequence',
	    -height   => 64,
	    -bump     => +1,
	    -translation => '3frame',
	    -label    => 1,
	    -description    => 1,
	 );

Is anybody able to see what's wrong with this code?

Thanks a lot!
Christine
-------------- next part --------------
A non-text attachment was scrubbed...
Name: crop.png
Type: image/png
Size: 6901 bytes
Desc: not available
URL: <http://lists.open-bio.org/pipermail/bioperl-l/attachments/20140318/b9fd4f95/attachment-0002.png>


More information about the Bioperl-l mailing list