[Bioperl-l] Testing BioPerl objects for equality

Bernhard Schmalhofer Bernhard.Schmalhofer at biomax.de
Mon Feb 2 04:15:20 EST 2004

Ewan Birney wrote:
> 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
> great.
>>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.
If the roundtrip is starting from a file is a specific format, shouldn't 
it be possiple to compare the data structures of the sequence object 
I was think of using something like Test::More::is_deeply(), which tells 
you where the data structures start to become different.

CU, Bernhard
Bernhard Schmalhofer
Senior Developer
Biomax Informatics AG
Lochhamer Str. 11
82152 Martinsried, Germany
Tel: +49 89 895574-839
Fax: +49 89 895574-825
eMail: Bernhard.Schmalhofer at biomax.com
Website: www.biomax.com

More information about the Bioperl-l mailing list