[Bioperl-l] Bio:;Annotation::Reference;

hafiz hafiz khufaz83 at yahoo.com
Sat Sep 18 02:07:02 EDT 2004



Hello , everybody can help me, i want to buid a new
sequence in swissprot but i have some trouble with my
reference.

This is my souces code;


#for feature
my $feat = new Bio::SeqFeature::Generic(-start
=>10,-end => 22, -strand =>1,
                                      
-primary=>”DOMAIN”);

#for seq, ID ,AC, alphabet.
my $seq_obj =Bio::Seq
->new(-seq=>"attcccccchkhkhkh",-display_id=>"BIO52",-accession_number
=>'X78121',-alphabet => 'dna',-is_circular => 1); );

$seq_obj->add_SeqFeature($feat);

        

#for comment
my $comment =Bio::Annotation::Comment->new;
$comment->text("this looks like a good TATA box");
my $coll =new Bio::Annotation::Collection;
$coll->add_Annotation('comment',$comment);
$seq_obj->annotation($coll);

  
  #reference
    $reg = Bio::Annotation::Reference->new( -title =>
'title line',
                                            -location
=> 'location line',
                                            -authors
=> 'author line',
                                            -medline
=> 998122 );


 $seq_obj->annotation($reg);

   
                                            
$file3="/home/database/Bioperl/test.gb";
                                            
my $io= Bio::SeqIO ->new(-format =>"swiss",-file =>
">$file3");
   
$io ->write_seq($seq_obj);


My output;

------------- EXCEPTION  -------------
MSG: object of class Bio::Annotation::Reference does
not implement Bio::AnnotationCollectionI. Too bad.
STACK Bio::Seq::annotation
/usr/lib/perl5/site_perl/5.8.0/Bio/Seq.pm:954
STACK main::update_database search10.pl:428
STACK toplevel search10.pl:46

--------------------------------------




________________________________________________________________________
Yahoo! Messenger - Communicate instantly..."Ping" 
your friends today! Download Messenger Now 
http://uk.messenger.yahoo.com/download/index.html


More information about the Bioperl-l mailing list