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

Cook, Malcolm MEC at stowers-institute.org
Thu Sep 7 14:16:18 EDT 2006


Jey, et al,

I like this idea and have wondered the same in the past.

I have sometimes done exactly what Jay is suggesting:  I code a script,
validate its output independently, and then save the 'validated' output
as reference for future tests.  For instance, I wrote a script TFBSscan
(basically a wrapper around TFBS modules) whose test.t looks like this:

use Test::More tests => 6;

my $diff;

#./TFBSscan --notag_db --DBmatrix JASPAR=PFM:ID:MA0026,MA0100,MA0002
./t/testseqs.fasta > ./t/t1.out &
# I manaully validated ./t/t1.out, so, now lets it the basis for a test:
$diff = `TFBSscan --notag_db --DBmatrix
JASPAR=PFM:ID:MA0026,MA0100,MA0002 ./t/testseqs.fasta | diff ./t/t1.out
- `;
ok (! $diff, 'JASPAR') or  diag("here's the unexpected difference
:\n$diff");

etc, etc...

I figured that there are some useful abstractions one could put on top
of this, perhaps in another Test:: module, but I've not seen it.  

I'm curious in general as to others' approaches to this both in BioPerl
project and elsewhere.

Cheers,

Malcolm

>-----Original Message-----
>From: bioperl-l-bounces at lists.open-bio.org 
>[mailto:bioperl-l-bounces at lists.open-bio.org] On Behalf Of Jay Hannah
>Sent: Thursday, September 07, 2006 12:37 PM
>To: bioperl-l
>Subject: [Bioperl-l] t/SeqIO.t -- improvements?
>
>So if I understand t/SeqIO.t correctly it reads (for example) 
>
>   t/data/test.fasta
>
>and writes
>  
>   t/data/fasta.out
>
>and if nothing explodes the test passes.
>
>...
>
>Wouldn't it be better if:
>(1) fasta.out was generated to contain *all* sequences, not 
>just the first.
>(2) a test was added to verify that fasta.out exactly matches 
>test.fasta (diff is blank).
>
>Or have I misunderstood something? 
>
>Are patches welcome? Shall I submit the patch to this mailing 
>list or elsewhere? Should I worry about Windows compatibility?
>
>Thanks,
>
>j
>
>_______________________________________________
>Bioperl-l mailing list
>Bioperl-l at lists.open-bio.org
>http://lists.open-bio.org/mailman/listinfo/bioperl-l
>



More information about the Bioperl-l mailing list