Skip to content
This repository
Browse code

Blat.t: Fixed skipped tests number and removed "$blat_present",

since test_skip() already check if the executable is available,
and executing it before test_skip() make the script crash if exe
is not present. Also removed some trailing whitespaces.
  • Loading branch information...
commit a7b046042e58704f55e4ad6f77472a5e9826f457 1 parent 27094fb
Francisco J. Ossandon authored December 11, 2013

Showing 1 changed file with 15 additions and 18 deletions. Show diff stats Hide diff stats

  1. 33  t/Blat.t
33  t/Blat.t
@@ -3,10 +3,10 @@
3 3
 
4 4
 use strict;
5 5
 
6  
-BEGIN { 
  6
+BEGIN {
7 7
   use Bio::Root::Test;
8  
-  test_begin(-tests => 40);
9  
-  
  8
+  test_begin(-tests => 39);
  9
+
10 10
   use_ok 'Bio::Tools::Run::Alignment::Blat';
11 11
   use_ok 'Bio::SeqIO';
12 12
   use_ok 'Bio::Seq';
@@ -18,12 +18,10 @@ my $query = test_input_file('blat_dna.fa');
18 18
 my $factory = Bio::Tools::Run::Alignment::Blat->new(-db => $db);
19 19
 ok $factory->isa('Bio::Tools::Run::Alignment::Blat');
20 20
 
21  
-my $blat_present = $factory->executable();
22  
-
23 21
 SKIP: {
24 22
     test_skip(-requires_executable => $factory,
25 23
               -tests => 24);
26  
-    
  24
+
27 25
     my $searchio = $factory->align($query);
28 26
     isa_ok $searchio, 'Bio::SearchIO';
29 27
 
@@ -37,9 +35,9 @@ SKIP: {
37 35
     is $hsp->hit->end, 1775;
38 36
     is $hsp->hsp_length, 1775;
39 37
 
40  
-    my $sio = Bio::SeqIO->new(-file => $query, -format => 'fasta');    
  38
+    my $sio = Bio::SeqIO->new(-file => $query, -format => 'fasta');
41 39
     my $seq = $sio->next_seq ;
42  
-    
  40
+
43 41
     $searchio = $factory->align($seq);
44 42
     like $searchio, qr/psl/, 'PSL parser (default)';
45 43
     $result = $searchio->next_result;
@@ -50,15 +48,15 @@ SKIP: {
50 48
     is $hsp->query->end, 1775;
51 49
     is $hsp->hit->start, 1;
52 50
     is $hsp->hit->end, 1775;
53  
-    
  51
+
54 52
     # test alternate formats (not all of these work!)
55 53
     $factory->reset_parameters(#-quiet  => 1,
56 54
                                -db  => $db,
57 55
                                -out => 'blast');
58 56
     $searchio = $factory->align($query);
59  
-    
  57
+
60 58
     like $searchio, qr/blast/, 'BLAST parser';
61  
-    
  59
+
62 60
     $result = $searchio->next_result;
63 61
     $hit    = $result->next_hit;
64 62
     $hsp    = $hit->next_hsp;
@@ -67,14 +65,14 @@ SKIP: {
67 65
     is $hsp->query->end, 1775;
68 66
     is $hsp->hit->start, 1;
69 67
     is $hsp->hit->end, 1775;
70  
-    
  68
+
71 69
     $factory->reset_parameters(#-quiet => 1,
72 70
                                -db  => $db,
73 71
                                -out => 'blast9');
74 72
     $searchio = $factory->align($query);
75  
-    
  73
+
76 74
     like $searchio, qr/blasttable/, 'Tabular BLAST parser';
77  
-    
  75
+
78 76
     $result = $searchio->next_result;
79 77
     $hit    = $result->next_hit;
80 78
     $hsp    = $hit->next_hsp;
@@ -113,11 +111,11 @@ SKIP: {
113 111
     is $hsp->query->end, 100;
114 112
     is $hsp->hit->start, 1;
115 113
     is $hsp->hit->end, 100;
116  
-    
  114
+
117 115
     # No on-the-fly conversion of Bio::Seq yet
118 116
     my $sio = Bio::SeqIO->new(-file=>$query,-format=>'fasta');
119 117
     my $seq = $sio->next_seq ;
120  
-    
  118
+
121 119
     $searchio = $factory->align($seq);
122 120
     $result = $searchio->next_result;
123 121
     $hit    = $result->next_hit;
@@ -129,5 +127,4 @@ SKIP: {
129 127
     is $hsp->hit->end, 1775;
130 128
 }
131 129
 
132  
-1; 
133  
-
  130
+1;

0 notes on commit a7b0460

Please sign in to comment.
Something went wrong with that request. Please try again.