[Bioperl-l] Re: [Bioperl-guts-l] genbank accession from swissprot

Jason Stajich jason at cgt.duhs.duke.edu
Wed Sep 1 00:17:18 EDT 2004


Wow Oct 1, 2004 - futuristic annotations!

This is a new feature in SProt - per Boris' email in July.

It hasn't been fixed to my knowledge.
   http://portal.open-bio.org/pipermail/bioperl-l/2004-July/016493.html

Although Boris did send me a patch (attaching if you want to give it a 
try), it is a bit of work to incorporate all of the necessary changes 
that the format changes require.

Quite happy for someone to take this on as I don't currently need this 
for my own work it is not on the priority list...

-jason
-------------- next part --------------
A non-text attachment was scrubbed...
Name: swiss_gn_patch
Type: application/octet-stream
Size: 2090 bytes
Desc: not available
Url : http://portal.open-bio.org/pipermail/bioperl-l/attachments/20040901/ee157b72/swiss_gn_patch.obj
-------------- next part --------------

On Aug 31, 2004, at 5:53 AM, Jinal Jhaveri wrote:

> Hi everyone,
>
> I am trying to fetch the genbank locustag from the swissprot entry. My 
> entry
> looks like this:
>
> DT   01-OCT-2004 (Rel. 45, Last annotation update)
> DE   Protein apaG.
> GN   Name=apaG; OrderedLocusNames=Atu0431, AGR_C_759;
> OS   Agrobacterium tumefaciens (strain C58 / ATCC 33970).
> OC   Bacteria; Proteobacteria; Alphaproteobacteria; Rhizobiales;
> OC   Rhizobiaceae; Rhizobium/Agrobacterium group; Agrobacterium.
> OX   NCBI_TaxID=176299;
>
>
> I am interested in OrderedLocusNames i.e Atu0431 from the GN line. 
> Currently
> my code looks like follows. Its not giving me the requed field though. 
> Does
> anyone have any links / ideas / suggestions? Am I doing anything wrong?
>
> Code Snippet:
>
> my $sprotfile = shift; #name of the input sprot file
>
> if ($sprotfile eq '') {
>   print "Please error the input swissprot file name:\n Usage perl
> sprot_to_tab.pl";
>   exit(1);
>   }
>
> eval {
>     $seqio = Bio::SeqIO->new(-file => "$sprotfile",-format => 'swiss');
>     $seq = $seqio->next_seq;
> };
>
> if ($@ ne '') {
>     print "ERROR in opening the swissprot file",$@;
>     exit(1);
> }
>
>
> #Reading the seq_object from the sprot file
>
> print "NCBI:Sequence:Length\n";
> while( my $seq = $seqio->next_seq ){
>   print "\nSequence is 
> :".$seq->seq."\tAccnumber".$seq->accession_number;
>
>   $ac= $seq->annotation();
>   foreach $key ( $ac->get_all_annotation_keys() ) {
>        @values = $ac->get_Annotations($key);
>        foreach $value ( @values ) {
>                      print "Annotation ",$key," stringified value ",
> $value->as_text,"\n";
>          }
>   }
>
> ...
>
>
>
> _______________________________________________
> Bioperl-guts-l mailing list
> Bioperl-guts-l at portal.open-bio.org
> http://portal.open-bio.org/mailman/listinfo/bioperl-guts-l
>
>
--
Jason Stajich
Duke University
jason at cgt.mc.duke.edu


More information about the Bioperl-l mailing list