[Bioperl-l] GeneStructure interfaces

Hilmar Lapp hilmarl@yahoo.com
Sun, 18 Feb 2001 21:44:21 -0800

I realize this was actually an excellent review by Alan. See below
for resulting changes. 

"Alan Robinson (EBI)" wrote:
> 1) There are three 'GeneStructure' files- Two implementations
>    'Bio::SeqFeature::GeneStructure' and

As mentioned, this is obsolete. Removed from the repository.
Anyone who was already using it (it's never been part of a
release!): please switch to Bio::SeqFeature::Gene::Transcript,
which is roughly equivalent.

> 2) The 'GeneStructureI' interface has no 'introns()' method.

Added for consistency as TranscriptI has it, too.

Note that the interface does not require implementors to provide
mutability. This is one of the rare examples where in fact none of
the implementations I provided allows you to add intron features
(they're computed on the fly).

> 3) The 'GeneStructureI' interface is documented as returning an array
>    of 'ExonI' objects from the 'utrs()' method, but both the
>    'GeneStructure' implementations are documented as returning arrays
>    of 'SeqFeatureI' objects.

Fixed. UTR objects are hereby required to implement
Bio::SeqFeature::Gene::ExonI (BTW the implementation Exon.pm will
automatically set is_coding() to FALSE if primary_tag contains the
string 'utr'. I'll double check that add_utr() enforces the right
type of object.

> 5) The 'utrs()' method of 'Bio::SeqFeature::Gene::GeneStructure' has
>    optional arguements that are not documented in the 'GeneStructureI'
>    interface for specifying the type of UTR to be returned.

I'm waiting for more feedback here. Actually, the longer I think
about this the more I think the interface should require
acceptance of a type argument. (5' and 3' UTR aren't really the

> 7) The 'Transcript' implementation includes as exon types in the sort
>    order 'utr5prime', 'utr3prime' and 'ployA'; whilst the 'Exon'
>    implementation only includes 'utr' as a valid exon type. Is there a
>    particular reason not to have the prime-ness included for the
>    'Exon' valid types?

As mentioned, in Exon.pm only the primary_tag is screened using
case-insensitive regexps. primary_tag() of objects is not used in
querying a certain exon type in $transcript->exons($type). I
updated the documentation in Exon.pm to hopefully be a bit

In the previous mail I claimed that mrna() takes the coding exons
and adds utrs() (on the respective side), polyA-site, as well as
promoters(). This was correct except for the promoter, which is in
fact NOT added to build the mRNA, sorry if this caused confusion.
I'd appreciate being told if that's biologically incorrect.

Hilmar Lapp                              email: hlapp@gmx.net
GNF, San Diego, Ca. 92122                phone: +1 858 812 1757