don't call executable()
[bioperl-run.git] / t / Promoterwise.t
blob784cbc5325fe5d255145625eb5813efedac4ad52
1 #!/usr/local/bin/perl
2 # -*-Perl-*-
3 ## Bioperl Test Harness Script for Modules
5 use strict;
6 BEGIN {
7 use Bio::Root::Test;
8 test_begin(-tests => 9);
9 use_ok('Bio::Tools::Run::Promoterwise');
10 use_ok('Bio::Seq');
13 my $verbose = -1;
14 my @params = ('-verbose' => test_debug(), 'silent' => 1, 'quiet' => 1);
15 my $factory = Bio::Tools::Run::Promoterwise->new(@params);
16 isa_ok $factory,'Bio::Tools::Run::Promoterwise';
18 SKIP: {
19 test_skip(-requires_executable => $factory,
20 -tests => 6);
22 my $bequiet = 1;
23 $factory->quiet($bequiet); # Suppress pseudowise messages to terminal
25 #test with one file with 2 sequences
26 my $inputfilename = test_input_file('sim4_cdna.fa');
27 my $seqstream1 = Bio::SeqIO->new(-file => $inputfilename,
28 -format => 'fasta');
29 my $seq1 = Bio::Seq->new();
30 $seq1 = $seqstream1->next_seq();
32 $inputfilename = test_input_file('sim4_genomic.fa');
33 my $seqstream2 = Bio::SeqIO->new(-file => $inputfilename,
34 -format => 'fasta');
35 my $seq2 = Bio::Seq->new();
36 $seq2 = $seqstream2->next_seq();
38 my @fp = $factory->run($seq1, $seq2);
39 my $first = $fp[0]->feature1;
40 my $second = $fp[0]->feature2;
42 my @sub = $first->sub_SeqFeature;
43 my @sub2 = $second->sub_SeqFeature;
45 is $sub[0]->start,4;
46 is $sub2[0]->start,29;
47 is $sub[0]->end,18;
48 is $sub2[0]->end,43;
49 is $sub[0]->seq->seq,'GTTGTGCTGGGGGGG';
50 is $sub[0]->score,1596.49;