The name stands for multiple sequence comparison by log-expectation. A range of options is provided that give you the choice of optimizing accuracy, speed, or some compromise between the two. Default parameters are those that give the best average accuracy in the published tests. MUSCLE can achieve both better average accuracy and better speed than CLUSTALW or T-Coffee, depending on the chosen options. Citation: Edgar, R. C. (2004) MUSCLE: multiple sequence alignment with high accuracy and high throughput. Nucleic Acids Research 32(5): 1792-1797. Edgar, R. C. (2004) MUSCLE: a multiple sequence alignment method with reduced time and space complexity. BMC Bioinformatics 5(1): 113. The NAR paper gives only a brief overview of the algorithm and implementation details. For a full discussion of the method and many of the non-default options that it offers, please see the BMC paper. WWW: http://www.drive5.com/muscle/ PR: ports/118460 Submitted by: Motomichi Matsuzaki <mzaki@biol.s.u-tokyo.ac.jp>
94 lines
1.8 KiB
C++
94 lines
1.8 KiB
C++
--- globalslinux.cpp.orig Tue Nov 30 05:09:50 2004
|
|
+++ globalslinux.cpp Mon Jul 4 11:13:18 2005
|
|
@@ -7,6 +7,12 @@
|
|
#include <errno.h>
|
|
#include <stdio.h>
|
|
#include <fcntl.h>
|
|
+#if __FreeBSD__ > 2
|
|
+#include <kvm.h>
|
|
+#include <sys/param.h>
|
|
+#include <sys/sysctl.h>
|
|
+#include <sys/user.h>
|
|
+#endif // __FreeBSD__ > 2
|
|
|
|
const int ONE_MB = 1000000;
|
|
const int MEM_WARNING_THRESHOLD = 20*ONE_MB;
|
|
@@ -39,6 +45,34 @@
|
|
return szCmdLine;
|
|
}
|
|
|
|
+#if __FreeBSD__ > 2
|
|
+double GetMemUseMB()
|
|
+ {
|
|
+ kvm_t *kd;
|
|
+ struct kinfo_proc *ki;
|
|
+ vm_size_t size;
|
|
+ int nproc;
|
|
+
|
|
+ kd = kvm_open(NULL, "/dev/null", NULL, O_RDONLY, "kvm_open");
|
|
+ if (kd == NULL)
|
|
+ {
|
|
+ static bool Warned = false;
|
|
+ if (!Warned)
|
|
+ {
|
|
+ Warned = true;
|
|
+ Warning("*Warning* Cannot open KVM");
|
|
+ }
|
|
+ return 0;
|
|
+ }
|
|
+
|
|
+ ki = kvm_getprocs(kd, KERN_PROC_PID, getpid(), &nproc);
|
|
+ size = ki->ki_size;
|
|
+
|
|
+ kvm_close(kd);
|
|
+
|
|
+ return ((double) size)/1e6;
|
|
+ }
|
|
+#else // __FreeBSD__ > 2
|
|
double GetMemUseMB()
|
|
{
|
|
static char statm[64];
|
|
@@ -83,6 +117,7 @@
|
|
|
|
return ((double) Pages * (double) PageSize)/1e6;
|
|
}
|
|
+#endif // __FreeBSD__ > 2
|
|
|
|
void SaveCmdLine(int argc, char *argv[])
|
|
{
|
|
@@ -118,6 +153,28 @@
|
|
dPeakMemUseMB = dMB;
|
|
}
|
|
|
|
+#if __FreeBSD__ > 2
|
|
+double GetRAMSizeMB()
|
|
+ {
|
|
+ const double DEFAULT_RAM = 500;
|
|
+ unsigned int physmem;
|
|
+ size_t len = sizeof physmem;
|
|
+ static int mib[2] = { CTL_HW, HW_PHYSMEM };
|
|
+
|
|
+ if (sysctl(mib, 2, &physmem, &len, NULL, 0))
|
|
+ {
|
|
+ static bool Warned = false;
|
|
+ if (!Warned)
|
|
+ {
|
|
+ Warned = true;
|
|
+ Warning("*Warning* Cannot get hw.physmem");
|
|
+ }
|
|
+ return DEFAULT_RAM;
|
|
+ }
|
|
+
|
|
+ return ((double) physmem)/1e6;
|
|
+ }
|
|
+#else // __FreeBSD__ > 2
|
|
double GetRAMSizeMB()
|
|
{
|
|
const double DEFAULT_RAM = 500;
|
|
@@ -168,5 +225,6 @@
|
|
int Bytes = atoi(pMem+9)*1000;
|
|
return ((double) Bytes)/1e6;
|
|
}
|
|
+#endif // __FreeBSD__ > 2
|
|
|
|
#endif // !WIN32
|