[Bioperl-l] Odd behaviour in Bio::SeqFeature::Gene::Transcript

Oliver Burren oliver.burren at cimr.cam.ac.uk
Thu May 12 07:30:37 EDT 2005


Dear Developers,

I'm working with Bio::SeqFeature::Gene::Transcript and I am getting some
odd behaviour. In a nutshell I'm getting an error depending on which
order i add exons to a transcript when I try and dump introns.

Best illustrated with a script which I attach (test_intron.pl).

Here is the output that I get :
229 machine /home/xxx % perl test_intron.pl
Building transcript on -ve strand
Exon Order is utr3prime,exon3,exon2,exon1,utr5prime
Strand is set to -1
SEQ             intron  31      30      .       -       .
SEQ             intron  21      25      .       -       .
SEQ             intron  11      15      .       -       .
SEQ             intron  6       5       .       -       .
Exon Order is utr5prime,exon1,exon2,exon3,utr3prime
Strand is set to -1

------------- EXCEPTION  -------------
MSG: Intron gap begins after '10' and ends before '1'
STACK Bio::SeqFeature::Gene::Intron::location /home/xxxxx/bioperl-
live/Bio/SeqFeature/Gene/Intron.pm:288
STACK Bio::SeqFeature::Generic::strand /home/xxxxx/bioperl-
live/Bio/SeqFeature/Generic.pm:356
STACK Bio::Tools::GFF::_gff2_string /home/xxxxx/bioperl-
live/Bio/Tools/GFF.pm:777
STACK Bio::Tools::GFF::gff_string /home/xxxxx/bioperl-
live/Bio/Tools/GFF.pm:680STACK
Bio::SeqFeature::Generic::gff_string /home/xxxxx/bioperl-
live/Bio/SeqFeature/Generic.pm:762
STACK toplevel test_intron.pl:56

--------------------------------------



Is this the expected behaviour or a feature or more likely have I made a
mistake somwhere ?


I can fix it by the following. However this is probably the wrong thing
to do. It can also be fixed by sorting exons before addition to
transcript.


cvs diff Transcript.pm
Index: Transcript.pm
===================================================================
RCS file: /home/repository/bioperl/bioperl-
live/Bio/SeqFeature/Gene/Transcript.pm,v
retrieving revision 1.33
diff -r1.33 Transcript.pm
287c287
<     $rev_order = ($exons[0]->end() < $exons[1]->start() ? 0 : 1);
---
>     #$rev_order = ($exons[0]->end() < $exons[1]->start() ? 0 : 1);
291c291,292
<     if((! defined($strand)) || ($strand != -1) || (! $rev_order)) {
---
>     #if((! defined($strand)) || ($strand != -1) || (! $rev_order)) {
>     if((! defined($strand)) || ($strand != -1)) {


Thanks

Olly Burren
JDRF/WT DIL
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_intron.pl
Type: application/x-perl
Size: 1506 bytes
Desc: not available
Url : http://portal.open-bio.org/pipermail/bioperl-l/attachments/20050512/e8785459/test_intron.bin


More information about the Bioperl-l mailing list