[Bioperl-l] automation of translation based on alignment

Chris Fields cjfields at illinois.edu
Tue Mar 23 08:46:37 EDT 2010

On Mar 23, 2010, at 12:20 AM, Ross KK Leung wrote:

> my $streamobj = $gb->get_Stream_by_acc(@ids);
> while (my $seqobj = $stream->next_seq) {
>   # do stuff here
> }
> The above retrieves a stream of Bio::Seq objects (specifically, a Bio::SeqIO
> stream). '$stream->next_seq()' iterates through them one at a time.  Unless
> you call a stream in some way, that code will not work.  If you call the
> methods below directly on the *sequence* object ($seqobj, retrieved from
> get_Seq_by_*), NOT the *stream* object (get_Stream_by_*), it should work.
>> for my $feat_object ($seqobj->get_SeqFeatures) {
>>     if ($feat_object->primary_tag eq "CDS") {
>>         print $feat_object->spliced_seq->seq,"\n";
>>         if ($feat_object->has_tag('gene')) {
>>             for my $val ($feat_object->get_tag_values('gene')){
>>                 print "gene: ",$val,"\n";
>>             }
>>         }
>>     }
>> }                                         
> Chris, in fact I did have this code before, but then it goes back to the old
> problem that the spliced sequence is incorrect. Please try using the
> following codes with "DQ089804" as the argument. If you check the printed
> result with:
> http://www.ncbi.nlm.nih.gov/nuccore/DQ089804.1?ordinalpos=2&itool=EntrezSyst
> em2.PEntrez.Sequence.Sequence_ResultsPanel.Sequence_RVDocSum
> you'll discover, for example, the sequence of gene P, is derived from
> splicing 1-1623 (starts with CTC...) and 2307-3215 (starts with ATG...),
> rather than 2307-3215 and 1-1623.

Okay, as I mentioned before, then that would be a bug.  The best way to handle this is to file it in Bugzilla:


I can likely look at it today, whether it's filed or not, just need to make some time.  Please file the bug report, though, just in case I can't get to it right away.  BTW, we had some discussion about circular genome support recently at the GMOD conference, and some code was added that was supposed to address the issues raised.  I'm guessing we'll need to add more tests just to be sure.



More information about the Bioperl-l mailing list