[Bioperl-l] Testing BioPerl objects for equality

Ewan Birney birney at ebi.ac.uk
Thu Jan 29 04:38:51 EST 2004

On Thu, 29 Jan 2004, Peter van Heusden wrote:

> I've got an idea for testing where I'd like to 'round-trip' through
> SeqIO: read in from a file on disk, write out again with write_seq() and
> then read in the file written by write_seq() and compare the two
> sequence objects. If they aren't equal, it means we've got a problem.

That sounds like a great idea... we've always had problems with diff'ing
the files because of whitespace issues, but diff'ing the objects sounds

> To make this work requires some kind of equals() method on Seq,
> SeqFeature, etc. This doesn't seem to be there at the moment - or am I
> missing something? Maybe there should probably be some kind of
> Bio::ComparableI interface which provides an equals() abstract method.

I would be ok with this, but I do note in passing that this precisely the
sort of minature abstract interface that really has newbie's scratching
their heads -

  - why did they do this?
  - is this interface important?
  - does this mean I can use '=' signs with objects?
  - do I need to make on of these to compare two objects?

In the documentation to the interface can you give some reassurance that
this is really just a little aide-memoire for the developers, and it is
not that important or crucial, and certainly noone should be creating one
of these beasts directly :)

> Peter
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at portal.open-bio.org
> http://portal.open-bio.org/mailman/listinfo/bioperl-l

More information about the Bioperl-l mailing list