[Bioperl-l] Re: coding custom Gene object

David Block dblock@gene.pbi.nrc.ca
Thu, 23 Aug 2001 15:11:41 -0600 (CST)


I am just about to commit a Transcript class to bioperl-live in
Bio/SeqFeature/Gene/Transcript.pm
that allows you to have a structured gene class.
The class you want to use is
bioperl-live/Bio/SeqFeature/Gene/GeneStructure.pm
which uses said Transcript module.

This has methods to get,add,flush:
Promoter
utr
Exon
Intron
poly_A_site

objects to your transcript.  They become those types of features when you
add them, ie $feature might be a SeqFeature::Generic, but when you do
$mygene->add_promoter($feature);
$feature becomes a Promoter.

HTH

-Dave

On Thu, 23 Aug 2001, Gene Cutler wrote:

> I'm looking for some coding guidance for creating some 
> Gene/Transcript/Exon objects to allow me to work with my own gene 
> database.  I am following the ExternalFeature model and have a class 
> based on ExternalFeatureFactoryI that pulls out my gene information 
> from MySQL.  I now need to implement my genes based on 
> Bio::SeqFeatureI.  However, I'd prefer not to write that from scratch 
> but use some of the existing bioperl modules.  I'm a little lost on 
> where to begin with that.  I see three different Gene.pms:
> 
> ./bioperl-live/Bio/Tools/Prediction/Gene.pm
> ./bioperl-live/Bio/LiveSeq/Gene.pm
> ./ensembl/modules/Bio/EnsEMBL/Gene.pm
> 
> And, when I took a look at what got returned by 
> $contig->get_all_Genes, it was an array of yet another class: 
> Gene_Obj.pm.  And along with these are various modules for 
> transcripts and exons.
> 
> Having stared at the code for all of these modules, they are now 
> blurring in my mind.  I need a Gene class that implements 
> Bio::SeqFeatureI and to which I can add a few custom annotations. 
> Would any of the existing Gene classes meet my needs?  If not, which 
> module(s) should I extend?
> 
> Thanks.
> 

-- 
David Block
dblock@gene.pbi.nrc.ca
http://bioinfo.pbi.nrc.ca/dblock/wiki
NRC Plant Biotechnology Institute
Saskatoon, SK, Canada