[Bioperl-l] UniGene modules now in CVS

Ewan Birney birney@ebi.ac.uk
Thu, 2 May 2002 11:33:51 +0100 (BST)


On Thu, 2 May 2002, Heikki Lehvaslaiho wrote:

> Lincoln Stein wrote:
> 
> >  > 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().
> 
> I know, but in my opinion it should be next(). Attaching the object type to
> the method name is again that kind of redundancy, I'd like not to have.
> Having a generic method name makes it easier to inherit and use the classes. 
> 


But *I* prefer having the object name as there is no point that I know
where someone wants to call ->next() on a clusterIO or ->next() on a seqIO
and somehow deal with either object - in other words, I think it is
helpful to remind people what sort of object is coming out of next.


YMMV of course.




> I've done this already in Bio::Variation::IO which inherits a lot from
> Bio::SeqIO a but uses read() and write().
> 
> 
> We could add read() and write() as an alternative to SeqIO so that all IO
> classes could use the same method names.
> 	-Heikki
> 
> -- 
> ______ _/      _/_____________________________________________________
>       _/      _/                      http://www.ebi.ac.uk/mutations/
>      _/  _/  _/  Heikki Lehvaslaiho          heikki@ebi.ac.uk
>     _/_/_/_/_/  EMBL Outstation, European Bioinformatics Institute
>    _/  _/  _/  Wellcome Trust Genome Campus, Hinxton
>   _/  _/  _/  Cambs. CB10 1SD, United Kingdom
>      _/      Phone: +44 (0)1223 494 644   FAX: +44 (0)1223 494 468
> ___ _/_/_/_/_/________________________________________________________
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l@bioperl.org
> http://bioperl.org/mailman/listinfo/bioperl-l
> 

-----------------------------------------------------------------
Ewan Birney. Mobile: +44 (0)7970 151230, Work: +44 1223 494420
<birney@ebi.ac.uk>. 
-----------------------------------------------------------------