[Bioperl-l] t/SeqIO.t -- improvements?

Chris Fields cjfields at uiuc.edu
Thu Sep 7 16:27:52 EDT 2006


> > Wouldn't it be better if:
> > (1) fasta.out was generated to contain *all* sequences, not just
> > the first.
> 
> Possibly.

My view on that was to demonstrate that you get separate PrimarySeqI objects
from a SeqIO stream and you can write one or the other.  It would be fairly
straightforward to send both sequence for each format to the file.

> > (2) a test was added to verify that fasta.out exactly matches
> > test.fasta (diff is blank).
> 
> No. The goal is not exact reproduction (you'd use cp for that) but
> writing out a file that is valid FASTA format and contains the same
> information as the input file.
> 
> You could (and should) still do a semantic diff; just that's a lot
> harder to implement. There have been threads previously about
> comparing objects for equality (in the notion that two files which
> are semantically equal should result in 'equal' objects once read
> into the object model).
>
> 	-hilmar

For diffs, you might be able to try a line-for-line 'diff' using Test::More
and like() (yes, I know I'm beating that drum to death).  I remember seeing
some direct file comparisons somewhere in the test suite, genbank.t maybe,
in relation to Bio::Species output.  I think there was a little cheating
though as the input test data looks like it was already passed through
SeqIO! 

Chris




More information about the Bioperl-l mailing list