[Bioperl-l] Bio::Graphics::Panel

Horvath Tamas hota.fin at freemail.hu
Thu Apr 14 09:38:35 EDT 2005

I gather information about certain sequences from some different files, 
and I want to display the gathered information. Therefore I create a 
Bio::Seq object, add features to it, and then I try to display it. 
Here's the code, that supposed to do that:

     my @features = ();
     my $id = $record->{SEQ_ID};
     #I had to type in a fake code, otherwise the script stopped complaining
     #that the 'abc' couldn't be guessed
     $seqobj = Bio::Seq->new( -seq => 
                                 -id  => $id,
                 -accession_number => $id,
     push( @features, new Bio::SeqFeature::Generic(-start   => 
                                       -end     => $record->{L_TIR_END},
                                       -primary => 'repeat_L',
                                       -source  => 'internal' ) );
     foreach $exon (@{$record->{EXON_LIST}}) {
         push( @features, new Bio::SeqFeature::Generic(-start   => 
                                       -end     => $exon->{END},
                                       -primary => 'exon',
                                       -source  => 'internal' ) );
     push( @features, new Bio::SeqFeature::Generic(-start   => 
                                       -end     => $record->{R_TIR_END},
                                       -primary => 'repeat_R',
                                       -source  => 'internal' ) );
     foreach $feat (@features) {$seqobj->add_SeqFeature($feat);}
     my %glypher = (
                    repeat_L => 'arrow',
                    exon => 'generic',
                    repeat_R => 'arrow'
     #would this work afterall? I know I can mix features, but can I mix 
connectors as               #well?
     my %connector= (
                      repeat_L => 'none',
                      exon => 'hat',
                      repeat_R => 'none'
     #the following add_track function will cause the error
           -glyph  => \%glypher,
           -bgcolor => 'green',
           -connector => \%connector,
           -label  => 0,
    print "track finished\n";

The error is:
Can't locate object method "seq_id" via package "Bio::Seq" at 
/usr/lib/perl5/site_perl/5.8.5/Bio/Graphics/Feature.pm line 269, <DATA> 
line 191.

Can u suggest me what the problem can be, or some other way you would do 
the same thing (displaying the info)


More information about the Bioperl-l mailing list