[Bioperl-l] UniGene modules now in CVS

Hilmar Lapp hlapp@gnf.org
Sat, 4 May 2002 17:37:56 -0700


> -----Original Message-----
> From: bioperl-l-admin@bioperl.org 
> [mailto:bioperl-l-admin@bioperl.org]On
> Behalf Of Lincoln Stein
> Sent: Wednesday, May 01, 2002 8:21 PM
> To: Heikki Lehvaslaiho
> Cc: Andrew Macgregor; bioperl-l@bioperl.org
> Subject: Re: [Bioperl-l] UniGene modules now in CVS
> 
> 
> Heikki Lehvaslaiho writes:
>  > 
>  > Andrew,
>  > 
>  > Great work!
>  > 
>  > I have note about the module names, though. 
>  > 
>  > 
>  > Bio::Cluster::Unigene should be one implementation of 
> Bio::Cluster::ClusterI
>  > interface. 
>  > 
>  > 
>  > Reading in files you need to say now:
>  > 
>  > $io = Bio::ClusteIO::UnigeneIO->new(-file=>'myfile',
>  >                                      -format=>'unigene');
>  > $clu = $io->next_unigene();
>  > 
>  > 
>  > which is somewhat redundant. A more generic way would be:
>  > 
>  > $io = Bio::ClusterIO::IO->new(-file=>'myfile',
>  >                                -format=>'unigene');
>  > $clu = $str->next();
> 
> Yes, but Bio::SeqIO uses next_seq().
> 
>  > ... and $clu would be a Bio::Cluster::Unigene object.
>  > 
>  > Then when a Stack parser is written, you need to say only:
>  > 
>  > $str = Bio::ClusterIO::IO->new(-file=>'myfile',
>  >                                -format=>'stack');
>  > 
>  > $clu = $str->next();
>  > 
>  > To get an other Bio::Cluster::ClusterI impementing object.
>  > 

If it returns a Bio::Cluster::ClusterI implementing object, what about
naming the method next_cluster()? IMHO, that would be as generic as it
needs to be. And yes, I like the redundancy in the name; it does make
the code clearer (YMMV).

	-hilmar
-- 
-------------------------------------------------------------
Hilmar Lapp                            email: lapp@gnf.org
GNF, San Diego, Ca. 92121              phone: +1-858-812-1757
-------------------------------------------------------------