[Bioperl-l] Re: genbank accession from swissprot
Hilmar Lapp
hlapp at gmx.net
Thu Sep 2 12:00:48 EDT 2004
Sort by thread :-)
http://portal.open-bio.org/pipermail/bioperl-l/2004-July/016578.html
I did fix it, but since there is no context for annotations (and not a
MultiTaggedValue either as Ewan suggested in a response) you lose the
tags.
-hilmar
On Tuesday, August 31, 2004, at 09:17 PM, Jason Stajich wrote:
> 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
> <swiss_gn_patch>
> 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
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at portal.open-bio.org
> http://portal.open-bio.org/mailman/listinfo/bioperl-l
--
-------------------------------------------------------------
Hilmar Lapp email: lapp at gnf.org
GNF, San Diego, Ca. 92121 phone: +1-858-812-1757
-------------------------------------------------------------
More information about the Bioperl-l
mailing list