[Bioperl-l] For a SwissProt protein to get a DNA sequence

Hilmar Lapp hlapp at gmx.net
Sat Apr 16 15:21:52 EDT 2005


As the warning states $feature->spliced_seq() also accepts a module 
implementing an interface for fetching sequences by random access 
(i.e., Bio::DB::RandomAccessI). So, depending on where the sequences 
are to be fetched from instantiate the corresponding module from the 
Bio::DB::* collection and pass it to spliced_seq(). Also, check out the 
POD of the method to make sure you're calling it correctly.

	-hilmar

On Saturday, April 16, 2005, at 11:39  AM, Sang Chul Choi wrote:

>
> I want to get a DNA sequence coding a swissprot protein. My swissprot 
> ID
> is Q16637. I used Bio::DB::SwissProt to get the flat file. Then, there 
> were
>
> several db_xref (dblinks annotation) links including
>
> U43883 U43876 U43877 U43878 U43880 U43881 U43882 U18423 U80017 
> AC005031 U21914 BC000908 BC015308 BC062723 BC070242
>
> So, I have tried to fetch and parse the first one, U43883, or I've run 
> these codes and gotten
> the following warnings and so on. The reason why I have these 
> warnings, I think, would
> be there is no U43882, and U43880 in the current fetched U43883 flat 
> file because the last
> line of code, $nuc_seq_str = $f->spliced_seq->seq;, the spliced_seq 
> method is thought
> to be parsing the CDS feature. How can I put these DNA sequences 
> together without
> any warnings?
>
> Thank you,
>
> Sang Chul Choi
>
> CDS             join(U43876.1:608..688,U43877.1:104..175,
>                      
> U43878.1:118..237,U43879.1:84..284,U43880.1:69..221,
>                      U43881.1:103..198,U43882.1:53..163,209..259)
>
> CODE
>
>       my $gbseq = $gb->get_Seq_by_acc($xrefid);
>
>       # Get the CDS information
>       my @features = $gbseq->all_SeqFeatures;
>
>       # sort features by their primary tags
>       for my $f (@features) {
>           my $tag = $f->primary_tag;
>           if ( $tag eq "CDS" ) {
>               $nuc_seq_str = $f->spliced_seq->seq;
>
>
> -------------------- WARNING ---------------------
> MSG: cannot get remote location for U43882.1 without a valid 
> Bio::DB::RandomAccessI database handle (like Bio::DB::GenBank)
> ---------------------------------------------------
>
> -------------------- WARNING ---------------------
> MSG: cannot get remote location for U43880.1 without a valid 
> Bio::DB::RandomAccessI database handle (like Bio::DB::GenBank)
> ---------------------------------------------------
>
>
> _______________________________________________
> 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