[Bioperl-l] Having problems with parsing SwissProt Records

Hilmar Lapp hlapp at gmx.net
Wed Oct 27 03:36:20 EDT 2004


On Tuesday, October 26, 2004, at 09:44  PM, Anand Venkatraman wrote:

> Hi,
>
> I am using Bioperl to parse SwissProt Records.
>
> The bioperl version is 1.4.
>
> I am having 2 problems :
>
> Problem 1: I am unable to get all the accession
> numbers   from the line starting with AC on the
> SwissProt Record.

Other accessions than the first are available via 
$seq->get_secondary_accessions().

>
> Problem 2:  I am also trying to get the associated
> EMBL and GO cross-references fro a given Swissprot
> entry. The problem I am having is that
> [a]: I am only getting the Nucleotide Id and Not the
> Protein Id from the EMBL tag and

What do you mean by EMBL tag? Dbxrefs to EMBL?

> [b]: In some cases, I am unable to get the GO ids.

This should not happen. Can you send the accession numbers for those 
sequences, or better yet, the swissprot-formatted file with those (or a 
selection thereof) that fail?

	-hilmar


>  For
> example, from the code below, I am only getting the GO
> id for some records, and missing it for some. Also, if
> a particular record has 3 or 4 lines of GO, the code
> just captures the 1st occurence of the GO Id(if and
> when it does so).
>
>
>
> This is the code
> -------------------------------------------------------
> #!/usr/bin/perl -w
> use strict;
> use Bio::SeqIO;
>
> my $sp_file = shift @ARGV or die$!;
> my $seqio_object = Bio::SeqIO->new(-file => $sp_file,
> -format => "swiss");
>
> while (my  $seq_object = $seqio_object->next_seq) {
>     if ($seq_object->species->binomial =~ m/Homo
> sapiens/) {
>         print "Accession:
> ",$seq_object->accession_number(), "\t";
>         my $annotation = $seq_object->annotation();
>
>         foreach my $dblink (
> $annotation->get_all_Annotations('dblink') ) {
>
>             if ( ( $dblink->database eq "EMBL" ) || (
> $dblink->database eq "GO" )  ) {
>                 print "\t",$dblink->database, ":",
> $dblink->primary_id, "\t";
>             }
>         }
>     }
>     print "\n";
>
> }
>
> -------------------------------------------------------
>
> Any suggestions,
>
> Thanks in advance for the help.
>
> Anand
>
>
> 	
> 		
> __________________________________
> Do you Yahoo!?
> Yahoo! Mail - You care about security. So do we.
> http://promotions.yahoo.com/new_mail
> _______________________________________________
> 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