| 1 |
#! /usr/bin/perl |
| 2 |
|
| 3 |
# github issue 34 - when building a model with truncated parsetrees, those |
| 4 |
# that end with self-transiting inserts can lead to |
| 5 |
# insert states with problematically high self-transition |
| 6 |
# probabilities. One place this is a problem is in the |
| 7 |
# QDB calculation where the expected length of these |
| 8 |
# inserts is so high that W can be set to > 1000 * clen |
| 9 |
# (which causes cmbuild to fail becaue it is a fixed threshold |
| 10 |
# on how big W is allowed to get). |
| 11 |
# |
| 12 |
# iss34.sto is the RF01133 alignment from Rfam 14.8's Rfam.seed. |
| 13 |
# |
| 14 |
# EPN, Mon Mar 6 14:16:33 2023 |
| 15 |
# |
| 16 |
|
| 17 |
$usage = "perl iss34-bld-frg-slf-ins.pl <cmbuild> <path to iss34.sto>\n"; |
| 18 |
if ($#ARGV != 1) { die "Wrong argument number.\n$usage"; } |
| 19 |
|
| 20 |
$cmbuild = shift; |
| 21 |
$alifile = shift; |
| 22 |
$ok = 1; |
| 23 |
|
| 24 |
if ($ok) { |
| 25 |
$output = `$cmbuild --fragthresh 1.0 iss34.cm $alifile > /dev/null`; |
| 26 |
if ($? != 0) { $ok = 0; } |
| 27 |
} |
| 28 |
# if cmbuild finishes successfully, then we pass this test, no need to parse anything |
| 29 |
|
| 30 |
foreach $tmpfile ("iss34.cm") { |
| 31 |
unlink $tmpfile if -e $tmpfile; |
| 32 |
} |
| 33 |
|
| 34 |
if ($ok) { print "ok\n"; exit 0; } |
| 35 |
else { print "FAILED\n"; exit 1; } |
| 36 |
|
| 37 |
|