| 1 |
#! /usr/bin/perl |
| 2 |
|
| 3 |
# bug i43 - opt acc parsetrees can contain illegal local begins |
| 4 |
# |
| 5 |
# EPN, Fri Jul 18 13:32:00 2014 |
| 6 |
# |
| 7 |
|
| 8 |
$usage = "perl bug-i43.pl <cmsearch> <path to bug-i43.cm> <path to bug-i43.fa>\n"; |
| 9 |
if ($#ARGV != 2) { die "Wrong argument number.\n$usage"; } |
| 10 |
|
| 11 |
$cmsearch = shift; |
| 12 |
$cmfile = shift; |
| 13 |
$seqfile = shift; |
| 14 |
$ok = 1; |
| 15 |
|
| 16 |
# original bug (latest version present is v1.1) causes a failure due to an esl_fatal() |
| 17 |
# command in cm_parsetree.c:ParsetreeToCMBounds, e.g.: |
| 18 |
# |
| 19 |
# Error: cm_pipeline() failed unexpected with status code 1 |
| 20 |
# ParsetreeToCMBounds(), std pipeline pass, cfrom_emit != cfrom_span (bug) |
| 21 |
# |
| 22 |
# Bug fix in v1.1.1 and later fixes this and cmsearch finishes without error. |
| 23 |
if ($ok) { |
| 24 |
$output = `$cmsearch --cpu 0 --mxsize 512.0 --toponly $cmfile $seqfile`; |
| 25 |
if ($? != 0) { $ok = 0; } |
| 26 |
# make sure output includes an 'ok' string indicating success |
| 27 |
if($output !~ /\n.ok.\n/) { |
| 28 |
$ok = 0; |
| 29 |
} |
| 30 |
} |
| 31 |
|
| 32 |
if ($ok) { print "ok\n"; exit 0; } |
| 33 |
else { print "FAILED\n"; exit 1; } |
| 34 |
|