Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

sync with run trunk

svn path=/bioperl-run/branches/branch-1-6/; revision=15456
  • Loading branch information...
commit 8af630d2ca55fc74c29f937775c2b5ed9b54c6e5 1 parent 384e621
cjfields authored
View
17 Bio/Tools/Run/Alignment/MAFFT.pm
@@ -243,15 +243,16 @@ sub version {
# slightly. i've tried to make the change compatible with both...
# version="v5.860 (2006/06/12)"; export version
- if( open(NAME, "grep 'export version' $exe | ") ) {
- while(<NAME>) {
- if( /version.*?([\d.]+)\s+/ ) {
- return $1;
- }
- }
- close(NAME);
+ if( open(my $NAME, "grep 'export version' $exe | ") ) {
+ while(<$NAME>) {
+ if( /version.*?([\d.a-z]+)\s+/ ) {
+ return $1;
+ }
+ }
+ $self->warn("No version found");
+ close($NAME);
} else {
- $self->warn("$!");
+ $self->warn("$!");
}
return;
}
View
3  Bio/Tools/Run/Primer3.pm
@@ -420,7 +420,8 @@ sub run {
my($self) = @_;
my $executable = $self->executable;
my $input = $self->{'primer3_input'};
- unless (-e $executable) {
+ unless ($executable && -e $executable) {
+ $self->throw("Executable was not found. Do not know where primer3 is!") if !$executable;
$self->throw("$executable was not found. Do not know where primer3 is!");
exit(-1);
}
View
13 t/AnalysisFactory_soap.t
@@ -44,9 +44,12 @@ SKIP: {
isa_ok( $array_ref, 'ARRAY' );
ok( grep(/seqret/i, @$array_ref), 'available_analyses("edit") returned something' );
- eval {
- my $service = $factory->create_analysis('edit.seqret');
- isa_ok( $service, 'Bio::Tools::Run::Analysis::soap' );
- };
- ok (!$@) || diag("create_analysis failed :$@");
+ TODO: {
+ local $TODO = 'create_analysis() is failing';
+ eval {
+ my $service = $factory->create_analysis('edit.seqret');
+ isa_ok( $service, 'Bio::Tools::Run::Analysis::soap' );
+ };
+ ok (!$@) || diag("create_analysis failed :$@");
+ }
}
View
2  t/Primer3.t
@@ -21,7 +21,7 @@ $seq=$seqio->next_seq;
ok $primer3 = Bio::Tools::Run::Primer3->new(-seq=>$seq);
SKIP: {
- test_skip(-requires_executable => $primer3,,
+ test_skip(-requires_executable => $primer3,
-tests => 5);
$args = $primer3->arguments;
View
10 t/Probcons.t
@@ -71,6 +71,12 @@ SKIP: {
$aln2 = $factory2->align($seq_array_ref);
my $s2_avg_perid = $aln2->average_percentage_identity;
my $s2_ovl_perid = $aln2->overall_percentage_identity;
- is(int($s2_avg_perid), 43);
- is(int($s2_ovl_perid), 15);
+ cmp_ok(int($s2_avg_perid), '>=', 42);
+ cmp_ok(int($s2_ovl_perid), '>=', 15);
+}
+
+END {
+ if (-e 'iterative-refinement') {
+ unlink('iterative-refinement');
+ }
}
View
23 t/TCoffee.t
@@ -51,7 +51,7 @@ SKIP: {
my $str = Bio::SeqIO->new('-file' =>
test_input_file("cysprot.fa"),
- '-format' => 'Fasta');
+ '-format' => 'fasta');
my @seq_array =();
while ( my $seq = $str->next_seq() ) {
@@ -64,10 +64,13 @@ SKIP: {
is $aln->no_sequences, 7;
my $s1_perid = $aln->average_percentage_identity;
-
my $profile1 = test_input_file("cysprot1a.msf");
my $profile2 = test_input_file("cysprot1b.msf");
- $aln = $factory->profile_align($profile1,$profile2);
+
+ # convert any warnings about program to an actual exception
+ $factory->verbose(2);
+ lives_ok {$aln = $factory->profile_align($profile1,$profile2)};
+ skip("T-COFFEE error, skipping tests", 13) if $@;
is $aln->no_sequences, 7;
my $str1 = Bio::AlignIO->new(-file=> test_input_file("cysprot1a.msf"));
@@ -122,4 +125,16 @@ SKIP: {
'-seq' => test_input_file("cysprot.fa"));
is ($aln->no_sequences, 7);
is ($aln->percentage_identity,$s1_perid); #calculated before
-}
+}
+
+END {
+ # warnings are already given above, no need to keep report
+ if (-e 'error_report.T-COFFEE') {
+ unlink('error_report.T-COFFEE');
+ }
+ if (my @dnds = glob('*.dnd')) {
+ for my $file (@dnds) {
+ unlink($file)
+ }
+ }
+}
Please sign in to comment.
Something went wrong with that request. Please try again.