Skip to content

Commit

Permalink
Here is the big commit, removing all PVM support, removing all autoto…
Browse files Browse the repository at this point in the history
…ols, enabling a static build system with Makefiles, always using pthreads, and adding a default suffix of '2' to all programs and manual pages.
  • Loading branch information
Josh Marshall committed Apr 10, 2018
1 parent dd8f71f commit 4a9327d
Show file tree
Hide file tree
Showing 55 changed files with 412 additions and 1,013 deletions.
32 changes: 18 additions & 14 deletions Makefile
Expand Up @@ -19,15 +19,15 @@ CC = gcc
# package will install. There must be a man page for each one of them
# in the appropriate places (documentation/man for HMMER)
#
PROGS = binaries/hmmalign\
binaries/hmmbuild\
binaries/hmmcalibrate\
binaries/hmmconvert\
binaries/hmmemit\
binaries/hmmfetch\
binaries/hmmindex\
binaries/hmmpfam\
binaries/hmmsearch
PROGS = hmmalign\
hmmbuild\
hmmcalibrate\
hmmconvert\
hmmemit\
hmmfetch\
hmmindex\
hmmpfam\
hmmsearch

HMMER2_LIBS = libsquid.a \
libhmmer.a
Expand Down Expand Up @@ -58,19 +58,23 @@ src/libhmmer.a:
# Prefix those paths with ${DESTDIR} (rarely used, usually null;
# may be set on a make command line when building contrib RPMs).
install:
cd src ; install -D -t ${DESTDIR}/$(BINDIR)/ $(PROGS)$(PROGSUFFIX)
for file in hmmer $(PROGS); do\
mkdir -p ${DESTDIR}/$(BINDIR)/

for file in $(PROGS) ; do\
cp src/$$file "${DESTDIR}/$(BINDIR)/$$file""$(PROGSUFFIX)" ;\
done
for file in hmmer2 $(ls documentation/man/); do\
install -D documentation/man/$$file.man ${DESTDIR}/$(MANDIR)/man$(MANSUFFIX)/$$file.$(MANSUFFIX);\
done

# Reverses the steps of "make install". However, this should be handled
# managed by a package management system like apt, rpm, pacman, or similar.
uninstall:
for file in $(PROGS) ; do\
rm ${BINDIR}/$$file;\
rm "${BINDIR}/$$file""$(PROGSUFFIX)";\
done
for file in hmmer $(PROGS); do\
rm $(MANDIR)/man$(MANSUFFIX)/$$file.$(MANSUFFIX);\
for file in hmmer2 $(ls documentation/man/); do\
rm -f $(MANDIR)/man$(MANSUFFIX)/$$file.$(MANSUFFIX);\
done

# after building, prep the whole directory for a binary distribution: symlink
Expand Down
14 changes: 14 additions & 0 deletions Release-Notes/RELEASE-2.5j
@@ -0,0 +1,14 @@
HMMER 2.5j release notes
Mon Apr 9 23:05:53 2018
________________________________________________________________

2.5j is a touch-up release. There are no additional features, but a
few stability enhancements, simplifications, and even feature removals.
These changes are to allow co-installation with Hmmer3 and the coming
Hmmer4. The autotools build system and Parallel Virtual Machine
support have been removed, as well as posix threads will now
unconditionally be built. This is not intended for further development
as it was abandoned for a good reason.

- Josh Marshall
- Michigan Technological University
18 changes: 8 additions & 10 deletions src/alphabet.c
@@ -1,10 +1,16 @@
/************************************************************
* @LICENSE@
* HMMER - Biological sequence analysis with profile HMMs
* Copyright (C) 1992-2006 HHMI Janelia Farm
* All Rights Reserved
*
* This source code is distributed under the terms of the
* GNU General Public License. See the files COPYING and LICENSE
* for details.
************************************************************/

/* alphabet.c
* Configuration of the global symbol alphabet information.
* CVS $Id$
* CVS $Id: alphabet.c 910 2003-10-02 16:39:41Z eddy $
*/

#include "config.h"
Expand All @@ -13,9 +19,7 @@
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#ifdef HMMER_THREADS
#include <pthread.h>
#endif /* HMMER_THREADS */

#include "structs.h"
#include "funcs.h"
Expand Down Expand Up @@ -82,15 +86,13 @@ void
SetAlphabet(int type)
{
int x;
#ifdef HMMER_THREADS
pthread_mutex_t alphabet_lock; /* alphabet is global; must protect to be threadsafe */
int rtn; /* return code from pthreads */

if ((rtn = pthread_mutex_init(&alphabet_lock, NULL)) != 0)
Die("pthread_mutex_init FAILED; %s\n", strerror(rtn));
if ((rtn = pthread_mutex_lock(&alphabet_lock)) != 0)
Die("pthread_mutex_lock FAILED: %s\n", strerror(rtn));
#endif

/* Because the alphabet information is global, we must
* be careful to make this a thread-safe function. The mutex
Expand All @@ -105,10 +107,8 @@ SetAlphabet(int type)
if (type != Alphabet_type)
Die("An alphabet type conflict occurred.\nYou probably mixed a DNA seq file with a protein model, or vice versa.");

#ifdef HMMER_THREADS
if ((rtn = pthread_mutex_unlock(&alphabet_lock)) != 0)
Die("pthread_mutex_unlock failure: %s\n", strerror(rtn));
#endif
return;
}

Expand Down Expand Up @@ -159,10 +159,8 @@ SetAlphabet(int type)
default: Die("No support for non-nucleic or protein alphabets");
}

#ifdef HMMER_THREADS
if ((rtn = pthread_mutex_unlock(&alphabet_lock)) != 0)
Die("pthread_mutex_unlock failure: %s\n", strerror(rtn));
#endif
}

/* Function: SymbolIndex()
Expand Down
8 changes: 4 additions & 4 deletions src/config.h
Expand Up @@ -9,7 +9,7 @@
#pragma once

/*****************************************************************
* 1. This first section consists of compile-time constants that control
* 1. This first section consists of compile-time constants that control
* HMMER's computational behavior (memory and processor use).
* It can be edited and configured manually before compilation.
*****************************************************************/
Expand All @@ -30,7 +30,7 @@


/*****************************************************************
* 2. The next section consists of compile-time constants that control
* 2. The next section consists of compile-time constants that control
* empirically tuned HMMER default parameters.
* You can edit it, but you ought not to, unless you're trying to
* improve on our empirical data.
Expand Down Expand Up @@ -67,14 +67,14 @@

/*****************************************************************
* 4. The final section isn't human editable at all.
* It is configured automatically by the ./configure script.
* It is configured automatically by the ./configure script.
* DO NOT EDIT BELOW THIS LINE.
*****************************************************************/

/* Version info - set once for whole package in configure.ac
*/
#define PACKAGE_NAME "HMMER"
#define PACKAGE_VERSION "2.4i"
#define PACKAGE_VERSION "2.5j"
#define PACKAGE_DATE "December 2006"
#define PACKAGE_COPYRIGHT "Copyright (C) 1992-2006 HHMI Janelia Farm"
#define PACKAGE_LICENSE "Freely distributed under the GNU General Public License (GPL)"
Expand Down
22 changes: 15 additions & 7 deletions src/core_algorithms.c
@@ -1,10 +1,16 @@
/************************************************************
* @LICENSE@
* HMMER - Biological sequence analysis with profile HMMs
* Copyright (C) 1992-2006 HHMI Janelia Farm
* All Rights Reserved
*
* This source code is distributed under the terms of the
* GNU General Public License. See the files COPYING and LICENSE
* for details.
************************************************************/

/* core_algorithms.c
* SRE, Mon Nov 11 15:58:52 1996
* CVS $Id$
* CVS $Id: core_algorithms.c 977 2004-12-12 00:02:03Z eddy $
*
* Simple and robust "research" implementations of Forward, Backward,
* and Viterbi for Plan7. For optimized replacements for some of these functions,
Expand Down Expand Up @@ -684,7 +690,7 @@ P7ViterbiTrace(struct plan7_s *hmm, unsigned char *dsq, int N,
int curralloc; /* current allocated length of trace */
int tpos; /* position in trace */
int i; /* position in seq (1..N) */
int k; /* position in model (1..M) */
int k = 0; /* position in model (1..M) */
int **xmx, **mmx, **imx, **dmx;
int sc; /* temp var for pre-emission score */

Expand Down Expand Up @@ -1180,6 +1186,7 @@ P7ParsingViterbi(unsigned char *dsq, int L, struct plan7_s *hmm, struct p7trace_
* - When we enter B, we record the i of the best previous E, or 0 if there
* isn't one, in btr.
*/
cur = 1;
for (i = 1; i <= L; i++) {
cur = i % 2;
prv = !cur;
Expand Down Expand Up @@ -1343,8 +1350,8 @@ P7WeeViterbi(unsigned char *dsq, int L, struct plan7_s *hmm, struct p7trace_s **
int *endlist; /* stack of end points on sequence to work on */
int *startlist; /* stack of start points on sequence to work on */
int lpos; /* position in endlist, startlist */
int k1, k2, k3; /* start, mid, end in model */
char t1, t2, t3; /* start, mid, end in state type */
int k1, k2 = 0, k3; /* start, mid, end in model */
char t1, t2 = 0, t3; /* start, mid, end in state type */
int s1, s2, s3; /* start, mid, end in sequence */
float sc; /* score of segment optimal alignment */
float ret_sc; /* optimal score over complete seq */
Expand All @@ -1371,6 +1378,8 @@ P7WeeViterbi(unsigned char *dsq, int L, struct plan7_s *hmm, struct p7trace_s **
tassign[1] = STS; /* temporary boundary condition! will become N or M */
tassign[L] = STT; /* temporary boundary condition! will become M or C */

t2 = k2 = 0;

/* Recursive divide-and-conquer alignment.
*/
while (lpos >= 0)
Expand Down Expand Up @@ -1604,11 +1613,10 @@ Plan7ESTViterbi(unsigned char *dsq, int L, struct plan7_s *hmm, struct dpmatrix_
mmx[i][0] = imx[i][0] = dmx[i][0] = -INFTY;

/* crude calculation of lookup value for codon */
codon = 64; /* ambiguous codon; punt */
if (i > 2) {
if (dsq[i-2] < 4 && dsq[i-1] < 4 && dsq[i] < 4)
codon = dsq[i-2] * 16 + dsq[i-1] * 4 + dsq[i];
else
codon = 64; /* ambiguous codon; punt */
}

for (k = 1; k <= hmm->M; k++) {
Expand Down
10 changes: 8 additions & 2 deletions src/debug.c
@@ -1,5 +1,11 @@
/*****************************************************************
* @LICENSE@
* HMMER - Biological sequence analysis with profile HMMs
* Copyright (C) 1992-2006 HHMI Janelia Farm
* All Rights Reserved
*
* This source code is distributed under the terms of the
* GNU General Public License. See the files COPYING and LICENSE
* for details.
*****************************************************************/

/* debug.c
Expand All @@ -8,7 +14,7 @@
* Printing out or naming various useful things from HMMER
* innards.
*
* CVS $Id$
* CVS $Id: debug.c 910 2003-10-02 16:39:41Z eddy $
*/

#include "config.h"
Expand Down
10 changes: 8 additions & 2 deletions src/display.c
@@ -1,6 +1,12 @@
/************************************************************
* Copyright (C) 1998 Ian Holmes
* @LICENSE@
* HMMER - Biological sequence analysis with profile HMMs
* Copyright (C) 1992-2006 HHMI Janelia Farm
* All Rights Reserved
*
* This source code is distributed under the terms of the
* GNU General Public License. See the files COPYING and LICENSE
* for details.
************************************************************/

/* display.c
Expand All @@ -10,7 +16,7 @@
*
* Functions for displaying HMMer2.0 structures.
*
* CVS $Id$
* CVS $Id: display.c 910 2003-10-02 16:39:41Z eddy $
*/

#include "config.h"
Expand Down
10 changes: 8 additions & 2 deletions src/emit.c
@@ -1,10 +1,16 @@
/************************************************************
* @LICENSE@
* HMMER - Biological sequence analysis with profile HMMs
* Copyright (C) 1992-2006 HHMI Janelia Farm
* All Rights Reserved
*
* This source code is distributed under the terms of the
* GNU General Public License. See the files COPYING and LICENSE
* for details.
************************************************************/

/* emit.c
* SRE, Sun Mar 8 12:26:58 1998
* CVS $Id$
* CVS $Id: emit.c 913 2003-10-04 18:26:49Z eddy $
*
* Generation of sequences/traces from an HMM.
*/
Expand Down
10 changes: 8 additions & 2 deletions src/emulation.c
@@ -1,13 +1,19 @@
/************************************************************
* @LICENSE@
* HMMER - Biological sequence analysis with profile HMMs
* Copyright (C) 1992-2006 HHMI Janelia Farm
* All Rights Reserved
*
* This source code is distributed under the terms of the
* GNU General Public License. See the files COPYING and LICENSE
* for details.
************************************************************/

/* emulation.c
* SRE, Wed Jan 21 07:50:01 1998
*
* Interfaces between HMMER and other software packages.
*
* CVS $Id$
* CVS $Id: emulation.c 878 2003-04-14 16:00:17Z eddy $
*/

#include "config.h"
Expand Down
10 changes: 8 additions & 2 deletions src/evolution.c
@@ -1,11 +1,17 @@
/************************************************************
* @LICENSE@
* HMMER - Biological sequence analysis with profile HMMs
* Copyright (C) 1992-2006 HHMI Janelia Farm
* All Rights Reserved
*
* This source code is distributed under the terms of the
* GNU General Public License. See the files COPYING and LICENSE
* for details.
************************************************************/

/* evolution.c
* Routines for phylogenetic "extrapolation" of profile HMMs.
*
* CVS $Id$
* CVS $Id: evolution.c 992 2005-01-21 17:02:32Z eddy $
* incept: SRE, Sun Oct 31 08:13:33 2004 [St. Louis]
*/

Expand Down
10 changes: 8 additions & 2 deletions src/fast_algorithms.c
@@ -1,10 +1,16 @@
/************************************************************
* @LICENSE@
* HMMER - Biological sequence analysis with profile HMMs
* Copyright (C) 1992-2006 HHMI Janelia Farm
* All Rights Reserved
*
* This source code is distributed under the terms of the
* GNU General Public License. See the files COPYING and LICENSE
* for details.
************************************************************/

/* fast_algorithms.c
* SRE, Sun Nov 10 08:54:48 2002 [AA 3080, Denver to StL]
* CVS $Id$
* CVS $Id: fast_algorithms.c 998 2005-01-26 22:11:49Z eddy $
*
* Optimized routines to replace slower implementations in core_algorithms.c.
*
Expand Down

0 comments on commit 4a9327d

Please sign in to comment.