3 ## Bioperl Test Harness Script for Modules
7 eval { require Test
; };
14 plan tests => $NTESTS;
16 use Bio::Tools::Run::Promoterwise;
21 for ( $Test::ntest..$NTESTS ) {
22 skip("promoterwise program not found. Skipping. (Be sure you have the wise package > 2.2.0)",1);
28 my @params = ('-verbose' => $verbose, 'silent' => 1, 'quiet' => 1);
29 my $factory = Bio::Tools::Run::Promoterwise->new(@params);
30 ok $factory->isa('Bio::Tools::Run::Promoterwise');
31 unless ($factory->executable) {
32 warn("Promoterwise program not found. Skipping tests $Test::ntest to $NTESTS.\n");
37 $factory->quiet($bequiet); # Suppress pseudowise messages to terminal
39 #test with one file with 2 sequences
40 my $inputfilename = Bio::Root::IO->catfile(qw(t data sim4_cdna.fa));
41 my $seqstream1 = Bio
::SeqIO
->new(-file
=> $inputfilename,
43 my $seq1 = Bio
::Seq
->new();
44 $seq1 = $seqstream1->next_seq();
46 $inputfilename = Bio
::Root
::IO
->catfile(qw(t data sim4_genomic.fa));
47 my $seqstream2 = Bio
::SeqIO
->new(-file
=> $inputfilename,
49 my $seq2 = Bio
::Seq
->new();
50 $seq2 = $seqstream2->next_seq();
52 my @fp = $factory->run($seq1, $seq2);
53 my $first = $fp[0]->feature1;
54 my $second = $fp[0]->feature2;
56 my @sub = $first->sub_SeqFeature;
57 my @sub2 = $second->sub_SeqFeature;
60 ok
$sub2[0]->start,29;
63 ok
$sub[0]->seq->seq,'GTTGTGCTGGGGGGG';
64 ok
$sub[0]->score,1596.49;