| 1 |
#! /usr/bin/perl |
| 2 |
|
| 3 |
# bug i32 - cmbuild --refine failed on input alignments with |
| 4 |
# individual sequence SS annotation. |
| 5 |
# |
| 6 |
# EPN, Wed Oct 10 16:38:30 2012 |
| 7 |
# |
| 8 |
# cmbuild --refine will fail if built from an alignment with |
| 9 |
# individual (per-sequence) SS annotation. |
| 10 |
# |
| 11 |
# i32.1 = simple example alignment (1 seq) |
| 12 |
# i32.2 = refined alignment (output from cmbuild) |
| 13 |
|
| 14 |
$usage = "perl bug-i32.pl <cmbuild>\n"; |
| 15 |
if ($#ARGV != 0) { die "Wrong argument number.\n$usage"; } |
| 16 |
|
| 17 |
$cmbuild = shift; |
| 18 |
$ok = 1; |
| 19 |
|
| 20 |
# Make our test alignment file, i11.1 |
| 21 |
# |
| 22 |
open (OUT, ">i32.1") || die; |
| 23 |
print OUT <<END; |
| 24 |
# STOCKHOLM 1.0 |
| 25 |
|
| 26 |
human ACG |
| 27 |
#=GR human SS :<> |
| 28 |
#=GC SS_cons :<> |
| 29 |
#=GC RF xxx |
| 30 |
// |
| 31 |
END |
| 32 |
close OUT; |
| 33 |
|
| 34 |
if ($ok) { |
| 35 |
system("$cmbuild -F --hand --refine i32.2 i32.cm i32.1 > /dev/null 2> /dev/null"); |
| 36 |
if ($? != 0) { $ok = 0; } |
| 37 |
} |
| 38 |
|
| 39 |
foreach $tmpfile ("i32.1", "i32.2", "i32.cm") { |
| 40 |
unlink $tmpfile if -e $tmpfile; |
| 41 |
} |
| 42 |
|
| 43 |
if ($ok) { print "ok\n"; exit 0; } |
| 44 |
else { print "FAILED\n"; exit 1; } |
| 45 |
|
| 46 |
|