[Bioperl-l] Build new Seq in SwissProt
Marc Logghe
Marc.Logghe at devgen.com
Sat Sep 18 07:53:37 EDT 2004
Hi,
The object you created is a Bio::Seq object.
Such object can not deal with dates. You should create a Bio::Seq::RichSeq object instead.
There the add_date() method is available.Or you can pass the dates directly to the new() method (-dates => [$date1,$date]) Have a look at the Bio::Seq::RichSeq docs.
HTH,
Marc
> -----Original Message-----
> From: hafiz hafiz [mailto:khufaz83 at yahoo.com]
> Sent: Saturday, September 18, 2004 12:04 PM
> To: bioperl-l at portal.open-bio.org
> Subject: [Bioperl-l] Build new Seq in SwissProt
>
>
>
> 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
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at portal.open-bio.org
> http://portal.open-bio.org/mailman/listinfo/bioperl-l
>
More information about the Bioperl-l
mailing list