[Bioperl-l] Build new Seq in SwissProt

hafiz hafiz khufaz83 at yahoo.com
Sat Sep 18 06:03:39 EDT 2004


hello, help me, which bioperl modul should we use to
insert Date  in swiss prot?

example;

ID   GRAA_HUMAN     STANDARD;      PRT;   262 AA.
AC   P12544;

this date i mean
DT   01-OCT-1989 (Rel. 12, Created)
DT   01-OCT-1989 (Rel. 12, Last sequence update)
DT   28-FEB-2003 (Rel. 41, Last annotation update)

my soure code; any suggestion

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



    
#my @arr = $feat->get_all_tags;
#for my $tag (@arr){
#       print $tag,":",$feat->get_tag_values($tag),"
";
#} 
    
                                 
my $seq_obj =Bio::Seq
->new(-seq=>"attcccccchkhkhkhaaaaaaaa",-display_id
=>"BIO52",-accession_number =>
'X78121',-alphabet => 'dna',-is_circular => 1);
                                            
$seq_obj->add_SeqFeature($feat);

    
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);
    
$species = Bio::Species->new(-classification =>
[@classification]);
           # Can also pass classification
           # array to new as below
 $species->classification(qw( sapiens Homo Hominidae
                                 Catarrhini Primates
Eutheria
                                 Mammalia Vertebrata
Chordata
                                 Metazoa Eukaryota ));
                                            
    $genus = $species->genus();

    $bi = $species->binomial();     # $bi is now "Homo
sapiens"

    # For storing common name
    $species->common_name("human");

    # For storing subspecies
    $species->sub_species("accountant");
     $seq_obj->species($species);
my $reg = Bio::Annotation::Reference->new(  -title
=>"SwissProt Data",
                                            -location
=> "Gerik" ,
                                            -authors
=>"Muhammad hafiz Mohamed Yusof",
                                            -medline
=> "998122",-comment=>"sdasd",-position=>"sdsadd" );

    

$seq_obj->annotation->add_Annotation('reference',
$reg);
    

$link2 = new Bio::Annotation::DBLink();
   $link2->database('dbSNP');
   $link2->primary_id('2367');   
                                    
   # DBLink is-a Bio::AnnotationI object, can be added
to annotation
   # collections, e.g. the one on features or seqs
   $seq_obj->annotation->add_Annotation('dblink',
$link2);
                                 

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



________________________________________________________________________
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