#! /usr/bin/perl # We assume that a HMMER2 build tree is in $top_builddir # $top_srcdir is unused: pass "." or $top_builddir # # Example: # mkdir foo-test # ./x-hmmer2 ~/releases/hmmer-2.3.2 . foo-test test.list 1 Pfam-A.seed uniprot/trembl-shuf-10k test.out # use Benchmark qw(:hireswallclock) ; $top_builddir = shift; $top_srcdir = shift; $resultdir = shift; $tblfile = shift; $nthreads = shift; $querydb = shift; $targetdb = shift; $outfile = shift; $hmmbuild = "$top_builddir/src/hmmbuild"; $hmmsearch = "$top_builddir/src/hmmsearch"; $opts = "--cpu $nthreads"; if (! -d $top_builddir) { die "didn't find HMMER2 build directory $top_builddir"; } if (! -x $hmmbuild) { die "didn't find hmmbuild executable $hmmbuild"; } if (! -x $hmmsearch) { die "didn't find hmmsearch executable $hmmsearch"; } if ($top_srcdir ne "." && $top_srcdir ne $top_builddir) { die "$top_srcdir is unused. pass ."; } if (! -e $resultdir) { die "$resultdir doesn't exist"; } open(OUTFILE,">$outfile") || die "failed to open output $outfile"; open(TABLE, "$tblfile") || die "failed to open work unit list $tblfile"; $output = `esl-seqstat $targetdb | grep "^Total"`; if ($?) { die("esl-seqstat failed"); } if ($output =~ /^Total \# residues:\s+(\d+)/) { $L = $1; } $n = 0; MSA: while (