[Bioperl-l] Drawing gene structures without SeqIO in Bio::Graphics

Adam Woolfe awoolfe at rfcgr.mrc.ac.uk
Thu Apr 29 11:53:53 EDT 2004


hi. Im currently trying to get to grips with the Bio::Graphics module and
have been trying to draw a gene structure using my own co-ordinates (or
which in the future will come from my database) using the glyph
'transcript2' which connects up exons with diagonal lines.

Now all the examples in the HowTo module documentation use sequence
features from an EMBL file read in using Bio::SeqIO. This produces a hash
of arrays of hashes to SeqFeatures which are then fed to the panel->add
track
as so...

my $track = $panel->add_track($sorted_features{CDS},
     			      -glyph => 'transcript2',
                              -label  => 1,
                              -bgcolor => 'blue',
                              -min_score => 30,
                              -max_score => 100,
			      -bump=> +1,
			      -connector=>'hat',
			      -key =>'CDS');

Now I dont want to use SeqIO. I just have a set of start end ends for my
exons which I want to be connected as a gene structure. When i try and do
that it treats each start and end as a separate gene and doesnt connect
them as it should.

e.g.

@exonstartend = (100, 200, 300, 400, 700, 800);

for ($i=0;$i<@exons;$i=$i+2) {

     $feature =
Bio::SeqFeature::Generic->new(-start=>$exonstartend[$i],-end=>$exonstartend[$i+1]);

	push @ref, $feature;

			    } #end of for ($i=0;$i<@starts;$i++)

my $track = $panel->add_track(\@ref,
     			      -glyph => 'transcript2',
                              -label  => 1,
                              -bgcolor => 'blue',
                              -min_score => 30,
                              -max_score => 100,
			      -bump=> +1,
			      -connector=>'hat',
			      -key =>'CDS');

This prints out each of the exons as seperate 1-exon genes instead of
connecting them together into one gene.

What information am I missing to make them into a 3 exon gene!

thanks

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



More information about the Bioperl-l mailing list