[Bioperl-l] UniGene modules and Bio::Cluster

Andrew Macgregor andrew@anatomy.otago.ac.nz
Mon, 06 May 2002 13:08:57 +1200


Hi Heikki (et al),

I've taken a look at what you wrote and also the Variation code and can see
what you mean.
> 
> $io = Bio::ClusterIO::IO->new(-file=>'myfile',
>                              -format=>'unigene');
> $clu = $str->next();
> 
> ... and $clu would be a Bio::Cluster::Unigene object.

So I think I'll go ahead with this:

1. rename UniGeneIO.pm --> IO.pm
2. rename the UniGeneIO dir --> IO
3. recode the new IO.pm appropriately.

The only thing is what to do with next in the end. What's the general
consensus? I have to say I like the sound of Hilmar's next_cluster() but if
there is a move to standardise this across bioperl I am not too worried what
it is called :) Sound like a good plan?

Other issues:

Allen Day said on the list:
> Is there a plan to make general Bio::Cluster and Bio::ClusterIO classes?
> I see that UnigeneIO is using Bio::SeqIO to do it's reading/writing, and
> isn't inheriting from the (non-existant) Bio::Cluster class.

So the steps above would make a more generic ClusterIO class. The only thing
there is that it currently reads only as I can't see why you would want to
write UniGene files. This might not be true for other clusters though?
Should it be able to write?

What I can't see I'm afraid is how you would code Bio::Cluster::ClusterI
that was sufficiently generic that UniGene.pm and other clusters could
inherit from it. Wouldn't the methods I need for a UniGene object be
completely different for some other cluster. Wouldn't the overlap only come
on the next_cluster method? And hence ClusterI wouldn't have much in it?
Sorry if this sounds dumb, I just can't quite get my head around what would
be in there. Perhaps there is something similar elsewhere in bioperl that
someone could point me towards.

Cheers, Andrew.