Commit 9f856017 authored by Andreas Tille's avatar Andreas Tille

Merge tag 'upstream/1.2.4'

Upstream version 1.2.4
parents 417cc013 e110e702
2016-12-20 Release 1.2.4 (AndreaGiacomo, r317)
- made code gcc-6 compliant
(no new command-line flags)
2016-07-20 Release 1.2.3 (AndreaGiacomo, r313)
- fixed consensus line in ClustalW format, 'H' in NHQK not recognised as strong (bug in Squid)
......
......@@ -31,7 +31,7 @@ PROJECT_NAME = "Clustal Omega"
# This could be handy for archiving the generated documentation or
# if some version control system is used.
PROJECT_NUMBER = 1.2.3
PROJECT_NUMBER = 1.2.4
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
# base path where the generated documentation will be put.
......
The impatient can try:
$ ./configure
$ make
$ make install
Clustal-Omega needs argtable2 (http://argtable.sourceforge.net/). If
argtable2 is installed in a non-standard directory you might have to
point configure to its installation directory. For example, if you are
on a Mac and have argtable installed via MacPorts then you should use
the following command line:
$ ./configure CFLAGS='-I/opt/local/include' LDFLAGS='-L/opt/local/lib'
ClustalO will automatically support multi-threading if your compiler
supports OpenMP. For some reason automake's OpenMP detection for
Apple's gcc is broken. You can force OpenMP detection by calling configure
like so:
$ ./configure OPENMP_CFLAGS='-fopenmp' CFLAGS='-DHAVE_OPENMP'
You could use a non-Apple gcc installed via MacPorts, adding
CC=/opt/local/bin/gcc-mp-4.5
to the configure call (you will have to change the exact string to match
your gcc version).
See below for generic installation instructions:
----------------------------------------------------------------------
Installation Instructions
*************************
Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
2006, 2007, 2008, 2009 Free Software Foundation, Inc.
Copyright (C) 1994-1996, 1999-2002, 2004-2013 Free Software Foundation,
Inc.
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
......@@ -47,8 +12,8 @@ without warranty of any kind.
Basic Installation
==================
Briefly, the shell commands `./configure; make; make install' should
configure, build, and install this package. The following
Briefly, the shell command `./configure && make && make install'
should configure, build, and install this package. The following
more-detailed instructions are generic; see the `README' file for
instructions specific to this package. Some packages provide this
`INSTALL' file but do not implement all of the features documented
......@@ -261,6 +226,11 @@ order to use an ANSI C compiler:
and if that doesn't work, install pre-built binaries of GCC for HP-UX.
HP-UX `make' updates targets which have the same time stamps as
their prerequisites, which makes it generally unusable when shipped
generated files such as `configure' are involved. Use GNU `make'
instead.
On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
parse its `<wchar.h>' header file. The option `-nodtk' can be used as
a workaround. If GNU CC is not installed, it is therefore recommended
......@@ -282,70 +252,6 @@ not `/usr/local'. It is recommended to use the following options:
./configure --prefix=/boot/common
On Windows do
1. Preparation
1.1. Install free MinGW64 on Windows 7. Download
mingw-w64-bin_x86_64-mingw_20111101_sezero.zip from
http://sourceforge.net/projects/mingw-w64/files/Toolchains
targetting Win64/Personal Builds/sezero_4.5_20111101/, extract
it, move mingw64 folder to C:\ and rename it to mingw. MinGW64
provides tools to develop 64-bit Windows applications using
gcc and g++. With MinGW64, some software developed for Linux
platform can be built on Windows.
1.2. There is a file named pthreads-w64.zip in C:\mingw
folder. Extract it under C:\mingw folder.
1.3. Download MSYS-1.0.11.exe from
http://sourceforge.net/projects/mingw/files/MSYS/Base/msys-core/msys-1.0.11/
and install it.
1.4. Download Clustal Omega source from
http://www.clustal.org/omega/clustal-omega-x.x.x.tar.gz (where
x.x.x is the current version)
1.5. Copy downloaded file to MSYS. If you installed MSYS in
C:\msys and your account is Administrator, copy it to
C:\msys\1.0\home\Administrator. You can do it using Windows
explorer.
1.6. Download argtable2-13.tar.gz from
http://argtable.sourceforge.net/ and copy it to MSYS. This is
required by Clustal Omega.
2. Configuration and Build process
2.1. Launch MSYS and extract argtable2 source as tar xfz
argtable2-13.tar.gz.
2.2. Extract Clustal Omega source as tar xfz
clustal-omega-1.2.0.tar.gz.
2.3. cd argtable2-13; ./configure; make; make install
2.4. cd ~/clustal-omega-1.2.0
2.5. ./configure CFLAGS='-I/usr/local/include
-DSRE_STRICT_ANSI' LDFLAGS='-L/usr/local/lib'
2.6. make; make install
2.7. You can find clustalo.exe in /usr/local/bin folder which
is C:\msys\1.0\local/bin.
2.8. Following DLLs are necessary to run clustalo.exe. Put
them in the same folder where clustalo.exe
exists. C:\mingw\bin\libcc_sjlj-1.dll,
C:\mingw\bin\libgomp-1.dll, C:\mingw\bin\libstdc++-6.dll,
C:\mingw\bin\pthreadGC2-w64.dll
(lifted from
http://www.blaststation.com/freestuff/en/howtoBuildx64ClustalO.php,
as of 2014-10-14)
Specifying the System Type
==========================
......@@ -403,9 +309,10 @@ causes the specified `gcc' to be used as the C compiler (unless it is
overridden in the site shell script).
Unfortunately, this technique does not work for `CONFIG_SHELL' due to
an Autoconf bug. Until the bug is fixed you can use this workaround:
an Autoconf limitation. Until the limitation is lifted, you can use
this workaround:
CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash
`configure' Invocation
======================
......@@ -461,4 +368,3 @@ operates.
`configure' also accepts some other, not widely useful, options. Run
`configure --help' for more details.
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.63 for Clustal Omega 1.2.3.
# Generated by GNU Autoconf 2.63 for Clustal Omega 1.2.4.
#
# Report bugs to <clustalw@ucd.ie>.
#
......@@ -745,8 +745,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
# Identity of this package.
PACKAGE_NAME='Clustal Omega'
PACKAGE_TARNAME='clustal-omega'
PACKAGE_VERSION='1.2.3'
PACKAGE_STRING='Clustal Omega 1.2.3'
PACKAGE_VERSION='1.2.4'
PACKAGE_STRING='Clustal Omega 1.2.4'
PACKAGE_BUGREPORT='clustalw@ucd.ie'
# Factoring default headers for most tests.
......@@ -1483,7 +1483,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures Clustal Omega 1.2.3 to adapt to many kinds of systems.
\`configure' configures Clustal Omega 1.2.4 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
......@@ -1553,7 +1553,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of Clustal Omega 1.2.3:";;
short | recursive ) echo "Configuration of Clustal Omega 1.2.4:";;
esac
cat <<\_ACEOF
......@@ -1659,7 +1659,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
Clustal Omega configure 1.2.3
Clustal Omega configure 1.2.4
generated by GNU Autoconf 2.63
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
......@@ -1673,7 +1673,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by Clustal Omega $as_me 1.2.3, which was
It was created by Clustal Omega $as_me 1.2.4, which was
generated by GNU Autoconf 2.63. Invocation command line was
$ $0 $@
......@@ -2492,7 +2492,7 @@ fi
# Define the identity of the package.
PACKAGE='clustal-omega'
VERSION='1.2.3'
VERSION='1.2.4'
cat >>confdefs.h <<_ACEOF
......@@ -21790,7 +21790,7 @@ exec 6>&1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by Clustal Omega $as_me 1.2.3, which was
This file was extended by Clustal Omega $as_me 1.2.4, which was
generated by GNU Autoconf 2.63. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
......@@ -21853,7 +21853,7 @@ Report bugs to <bug-autoconf@gnu.org>."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_version="\\
Clustal Omega config.status 1.2.3
Clustal Omega config.status 1.2.4
configured by $0, generated by GNU Autoconf 2.63,
with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
......
# configure.ac for Clustal Omega
#
# RCS $Id: configure.ac 313 2016-07-20 13:30:29Z fabian $
# RCS $Id: configure.ac 317 2016-12-16 17:44:50Z fabian $
# release
......@@ -32,7 +32,10 @@
#AC_INIT([Clustal Omega], [1.2.2], [clustalw@ucd.ie])
#PACKAGE_CODENAME="AndreaGiacomo"
# r313
AC_INIT([Clustal Omega], [1.2.3], [clustalw@ucd.ie])
#AC_INIT([Clustal Omega], [1.2.3], [clustalw@ucd.ie])
#PACKAGE_CODENAME="AndreaGiacomo"
# r317
AC_INIT([Clustal Omega], [1.2.4], [clustalw@ucd.ie])
PACKAGE_CODENAME="AndreaGiacomo"
# The AC_INIT macro can take any source file as an argument. It just
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -228,7 +228,7 @@
/* Define to the full name and version of this package. */
#ifndef CLUSTAL_OMEGA_PACKAGE_STRING
#define CLUSTAL_OMEGA_PACKAGE_STRING "Clustal Omega 1.2.3"
#define CLUSTAL_OMEGA_PACKAGE_STRING "Clustal Omega 1.2.4"
#endif
/* Define to the one symbol short name of this package. */
......@@ -238,7 +238,7 @@
/* Define to the version of this package. */
#ifndef CLUSTAL_OMEGA_PACKAGE_VERSION
#define CLUSTAL_OMEGA_PACKAGE_VERSION "1.2.3"
#define CLUSTAL_OMEGA_PACKAGE_VERSION "1.2.4"
#endif
/* The size of `fpos_t', as computed by sizeof. */
......@@ -301,7 +301,7 @@
/* Version number of package */
#ifndef CLUSTAL_OMEGA_VERSION
#define CLUSTAL_OMEGA_VERSION "1.2.3"
#define CLUSTAL_OMEGA_VERSION "1.2.4"
#endif
/* Define if using the dmalloc debugging malloc package */
......
......@@ -15,7 +15,7 @@
********************************************************************/
/*
* RCS $Id: mbed.c 300 2016-06-13 13:29:58Z fabian $
* RCS $Id: mbed.c 316 2016-12-16 16:14:39Z fabian $
*
*
* Reimplementation from scratch of mBed (Blackshields et al., 2010;
......@@ -88,8 +88,10 @@ static const int RESTARTS_PER_SPLIT = 10;
#define USE_KMEANS_LLOYDS 0
#ifndef HAVE_LOG2
#define log2(x) (log(x) / 0.69314718055994530942)
//#ifndef HAVE_LOG2
#ifndef CLUSTAL_OMEGA_HAVE_LOG2
//#define log2(x) (log(x) / 0.69314718055994530942)
#define log2(x) ( x<=0 ? (float)(-100000) : 1.442695041*log(x) )
#endif
#define NUMBER_OF_SEEDS(n) pow(log2(((double)n)), 2)
......
This diff is collapsed.
......@@ -15,7 +15,7 @@
********************************************************************/
/*
* RCS $Id: hhfullalignment-C.h 309 2016-06-13 14:10:11Z fabian $
* RCS $Id: hhfullalignment-C.h 315 2016-12-15 17:18:30Z fabian $
*/
// hhfullalignment.C
......@@ -357,8 +357,8 @@ FullAlignment::PrintHHR(FILE* outf, Hit& hit)
int iq=hit.i1; // match state counter for query HMM (displayed in consensus line)
int jt=hit.j1; // match state counter for template HMM (displayed in consensus line)
lq = new(short unsigned int[qa->n+2]);
lt = new(short unsigned int[ta->n+2]);
lq = new short unsigned int[qa->n+2];
lt = new short unsigned int[ta->n+2];
for (k=0; k<qa->n; k++) lq[k]=qa->l[k][hit.i1];
for (k=0; k<ta->n; k++) lt[k]=ta->l[k][hit.j1];
......
......@@ -15,7 +15,7 @@
********************************************************************/
/*
* RCS $Id: hhhalfalignment-C.h 309 2016-06-13 14:10:11Z fabian $
* RCS $Id: hhhalfalignment-C.h 315 2016-12-15 17:18:30Z fabian $
*/
// hhfullalignment.C
......@@ -64,10 +64,10 @@ HalfAlignment::HalfAlignment(int maxseqdis)
n=0;
sname=seq=NULL;
nss_dssp = nss_pred = nss_conf = nsa_dssp = ncons= -1;
h = new(int[maxseqdis]); //h[k] = next position of sequence k to be written
s = new(char*[maxseqdis]); //s[k][h] = character in column h, sequence k of output alignment
l = new(int*[maxseqdis]); //counts non-gap residues: l[k][i] = index of last residue AT OR BEFORE match state i in seq k
m = new(int*[maxseqdis]); //counts positions: m[k][i] = position of match state i in string seq[k]
h = new int[maxseqdis]; //h[k] = next position of sequence k to be written
s = new char*[maxseqdis]; //s[k][h] = character in column h, sequence k of output alignment
l = new int*[maxseqdis]; //counts non-gap residues: l[k][i] = index of last residue AT OR BEFORE match state i in seq k
m = new int*[maxseqdis]; //counts positions: m[k][i] = position of match state i in string seq[k]
}
/////////////////////////////////////////////////////////////////////////////////////
......
......@@ -15,7 +15,7 @@
********************************************************************/
/*
* RCS $Id: hhhit-C.h 308 2016-06-13 14:07:35Z fabian $
* RCS $Id: hhhit-C.h 316 2016-12-16 16:14:39Z fabian $
*/
// hhhit.C
......@@ -177,20 +177,20 @@ void
Hit::AllocateBacktraceMatrix(int Nq, int Nt)
{
int i;
bMM=new(char*[Nq]);
bMI=new(char*[Nq]);
bIM=new(char*[Nq]);
bDG=new(char*[Nq]);
bGD=new(char*[Nq]);
cell_off=new(char*[Nq]);
bMM=new char*[Nq];
bMI=new char*[Nq];
bIM=new char*[Nq];
bDG=new char*[Nq];
bGD=new char*[Nq];
cell_off=new char*[Nq];
for (i=0; i<Nq; i++)
{
bMM[i]=new(char[Nt]);
bMI[i]=new(char[Nt]);
bIM[i]=new(char[Nt]);
bGD[i]=new(char[Nt]);
bDG[i]=new(char[Nt]);
cell_off[i]=new(char[Nt]);
bMM[i]=new char[Nt];
bMI[i]=new char[Nt];
bIM[i]=new char[Nt];
bGD[i]=new char[Nt];
bDG[i]=new char[Nt];
cell_off[i]=new char[Nt] ;
if (!bMM[i] || !bMI[i] || !bIM[i] || !bGD[i] || !bDG[i] || !cell_off[i])
{
fprintf(stderr,"Error: out of memory while allocating row %i (out of %i) for dynamic programming matrices \n",i+1,Nq);
......@@ -237,19 +237,19 @@ Hit::DeleteBacktraceMatrix(int Nq)
void
Hit::AllocateForwardMatrix(int Nq, int Nt)
{
F_MM=new(double*[Nq]);
F_MI=new(double*[Nq]);
F_DG=new(double*[Nq]);
F_IM=new(double*[Nq]);
F_GD=new(double*[Nq]);
scale=new(double[Nq+1]); // need Nq+3?
F_MM=new double*[Nq];
F_MI=new double*[Nq];
F_DG=new double*[Nq];
F_IM=new double*[Nq];
F_GD=new double*[Nq];
scale=new double[Nq+1] ; // need Nq+3?
for (int i=0; i<Nq; i++)
{
F_MM[i] = new(double[Nt]);
F_MI[i] = new(double[Nt]);
F_DG[i] = new(double[Nt]);
F_IM[i] = new(double[Nt]);
F_GD[i] = new(double[Nt]);
F_MM[i] = new double[Nt];
F_MI[i] = new double[Nt];
F_DG[i] = new double[Nt];
F_IM[i] = new double[Nt];
F_GD[i] = new double[Nt];
if (!F_MM[i] || !F_MI[i] || !F_IM[i] || !F_GD[i] || !F_DG[i])
{
fprintf(stderr,"Error: out of memory while allocating row %i (out of %i) for dynamic programming matrices \n",i+1,Nq);
......@@ -294,14 +294,14 @@ Hit::DeleteForwardMatrix(int Nq)
void
Hit::AllocateBackwardMatrix(int Nq, int Nt)
{
B_MM=new(double*[Nq]);
B_MM=new double*[Nq];
B_MI=F_MI;
B_DG=F_DG;
B_IM=F_IM;
B_GD=F_GD;
for (int i=0; i<Nq; i++)
{
B_MM[i] = new(double[Nt]);
B_MM[i] = new double[Nt];
if (!B_MM[i])
{
fprintf(stderr,"Error: out of memory while allocating row %i (out of %i) for dynamic programming matrices \n",i+1,Nq);
......@@ -374,11 +374,11 @@ Hit::Viterbi(HMM& q, HMM& t, float** Sstruc)
//float sDG[MAXRES]; // sDG[i][j] = score of best alignment up to indices (i,j) ending in (Delete,Gap)
//float sIM[MAXRES]; // sIM[i][j] = score of best alignment up to indices (i,j) ending in (Ins,Match)
//float sMI[MAXRES]; // sMI[i][j] = score of best alignment up to indices (i,j) ending in (Match,Ins)
float *sMM = new(float[par.maxResLen]); // sMM[i][j] = score of best alignment up to indices (i,j) ending in (Match,Match)
float *sGD = new(float[par.maxResLen]); // sGD[i][j] = score of best alignment up to indices (i,j) ending in (Gap,Delete)
float *sDG = new(float[par.maxResLen]); // sDG[i][j] = score of best alignment up to indices (i,j) ending in (Delete,Gap)
float *sIM = new(float[par.maxResLen]); // sIM[i][j] = score of best alignment up to indices (i,j) ending in (Ins,Match)
float *sMI = new(float[par.maxResLen]); // sMI[i][j] = score of best alignment up to indices (i,j) ending in (Match,Ins)
float *sMM = new float[par.maxResLen]; // sMM[i][j] = score of best alignment up to indices (i,j) ending in (Match,Match)
float *sGD = new float[par.maxResLen]; // sGD[i][j] = score of best alignment up to indices (i,j) ending in (Gap,Delete)
float *sDG = new float[par.maxResLen]; // sDG[i][j] = score of best alignment up to indices (i,j) ending in (Delete,Gap)
float *sIM = new float[par.maxResLen]; // sIM[i][j] = score of best alignment up to indices (i,j) ending in (Ins,Match)
float *sMI = new float[par.maxResLen]; // sMI[i][j] = score of best alignment up to indices (i,j) ending in (Match,Ins)
float smin=(par.loc? 0:-FLT_MAX); //used to distinguish between SW and NW algorithms in maximization
int i=0,j=0; //query and template match state indices
float sMM_i_j=0, sMI_i_j=0, sIM_i_j=0, sGD_i_j=0, sDG_i_j=0;
......@@ -697,8 +697,8 @@ Hit::Forward(HMM& q, HMM& t, float** Pstruc)
}
// Calculate log2(P_forward)
score = log2(Pforward)-10.0f;
for (i=1; i<=q.L+1; i++) score -= log2(scale[i]);
score = Log2(Pforward)-10.0f;
for (i=1; i<=q.L+1; i++) score -= Log2(scale[i]);
// state = MM;
if (par.loc)
......@@ -1124,9 +1124,9 @@ Hit::Backtrace(HMM& q, HMM& t)
nsteps=step;
// Allocate new space for alignment scores
if (t.Xcons) Xcons = new( char[q.L+2]); // for template consensus sequence aligned to query
S = new( float[nsteps+1]);
S_ss = new( float[nsteps+1]);
if (t.Xcons) Xcons = new char[q.L+2]; // for template consensus sequence aligned to query
S = new float[nsteps+1];
S_ss = new float[nsteps+1];
if (!S_ss) MemoryError("space for HMM-HMM alignments");
// Add contribution from secondary structure score, record score along alignment,
......@@ -1226,7 +1226,7 @@ Hit::StochasticBacktrace(HMM& q, HMM& t, char maximize)
int i,j; // query and template match state indices
// float pmin=(par.loc? 1.0: 0.0); // used to distinguish between SW and NW algorithms in maximization
const float pmin=0;
double* scale_cum = new(double[q.L+2]);
double* scale_cum = new double[q.L+2];
scale_cum[0]=1;
......@@ -1245,7 +1245,7 @@ Hit::StochasticBacktrace(HMM& q, HMM& t, char maximize)
else
{
// float sumF[q.L+t.L];
double* sumF=new(double[q.L+t.L]);
double* sumF=new double[q.L+t.L];
sumF[0]=0.0;
for (j=1; j<=t.L; j++) sumF[j] = sumF[j-1] + F_MM[q.L][j]/scale_cum[q.L];;
for (j=t.L+1; j<t.L+q.L; j++) sumF[j] = sumF[j-1] + F_MM[j-t.L][t.L]/scale_cum[j-t.L];;
......@@ -1369,9 +1369,9 @@ Hit::StochasticBacktrace(HMM& q, HMM& t, char maximize)
nsteps=step;
// Allocate new space for alignment scores
if (t.Xcons) Xcons = new( char[q.L+2]); // for template consensus sequence aligned to query
S = new( float[nsteps+1]);
S_ss = new( float[nsteps+1]);
if (t.Xcons) Xcons = new char[q.L+2]; // for template consensus sequence aligned to query
S = new float[nsteps+1];
S_ss = new float[nsteps+1];
if (!S_ss) MemoryError("space for HMM-HMM alignments");
// Add contribution from secondary structure score, record score along alignment,
......@@ -1473,10 +1473,10 @@ Hit::BacktraceMAC(HMM& q, HMM& t)
nsteps=step;
// Allocate new space for alignment scores
if (t.Xcons) Xcons = new( char[q.L+2]); // for template consensus sequence aligned to query
S = new( float[nsteps+1]);
S_ss = new( float[nsteps+1]);
P_posterior = new( float[nsteps+1]);
if (t.Xcons) Xcons = new char[q.L+2]; // for template consensus sequence aligned to query
S = new float[nsteps+1];
S_ss = new float[nsteps+1];
P_posterior = new float[nsteps+1];
if (!P_posterior) MemoryError("space for HMM-HMM alignments");
// Add contribution from secondary structure score, record score along alignment,
......@@ -1681,9 +1681,9 @@ Hit::InitializeBacktrace(HMM& q, HMM& t)
if (irep==1) //if this is the first single repeat repeat hit with this template
{
//Copy information about template profile to hit and reset template pointers to avoid destruction
longname=new(char[strlen(t.longname)+1])();
name =new(char[strlen(t.name)+1])();
file =new(char[strlen(t.file)+1])();
longname=new char[strlen(t.longname)+1]();
name =new char[strlen(t.name)+1]();
file =new char[strlen(t.file)+1]();
if (!file) {
MemoryError("space for alignments with database HMMs. \nNote that all alignments have to be kept in memory");
}
......@@ -1694,8 +1694,8 @@ Hit::InitializeBacktrace(HMM& q, HMM& t)
strcpy(fold ,t.fold);
strcpy(cl ,t.cl);
strcpy(file,t.file);
sname=new(char*[t.n_display])(); // Call Compare only once with irep=1
seq =new(char*[t.n_display])(); // Call Compare only once with irep=1
sname=new char*[t.n_display](); // Call Compare only once with irep=1
seq =new char*[t.n_display](); // Call Compare only once with irep=1
if (!sname || !seq) {
MemoryError("space for alignments with database HMMs.\nNote that all sequences for display have to be kept in memory");
}
......@@ -1728,9 +1728,9 @@ Hit::InitializeBacktrace(HMM& q, HMM& t)
}
// Allocate new space
this->i = new( int[i2+j2+2])();
this->j = new( int[i2+j2+2])();
states = new( char[i2+j2+2])();
this->i = new int[i2+j2+2]();
this->j = new int[i2+j2+2]();
states = new char[i2+j2+2]();
S = S_ss = P_posterior = NULL; // set to NULL to avoid deleting data from irep=1 when hit with irep=2 is removed
Xcons = NULL;
} /* this is the end of Hit::InitializeBacktrace() */
......
This diff is collapsed.
......@@ -15,7 +15,7 @@
********************************************************************/
/*
* RCS $Id: hhhmm-C.h 309 2016-06-13 14:10:11Z fabian $
* RCS $Id: hhhmm-C.h 316 2016-12-16 16:14:39Z fabian $
*/
......@@ -186,12 +186,12 @@ HMM& HMM::operator=(HMM& q)
n_display=q.n_display;
for (int k=0; k<n_display; k++) {
sname[k]=new(char[strlen(q.sname[k])+1]);
sname[k]=new char[strlen(q.sname[k])+1];
if (!sname[k]) MemoryError("array of names for sequences to display");
strcpy(sname[k],q.sname[k]);
}
for (int k=0; k<n_display; k++) {
seq[k]=new(char[strlen(q.seq[k])+1]);
seq[k]=new char[strlen(q.seq[k])+1];
if (!seq[k]) MemoryError("array of names for sequences to display");
strcpy(seq[k],q.seq[k]);
}
......@@ -327,7 +327,7 @@ HMM::Read(FILE* dbf, char* path)
else if (!strcmp("SEQ",str3))
{
//char cur_seq[MAXCOL]=""; //Sequence currently read in
char *cur_seq = new(char[par.maxColCnt]); //Sequence currently read in
char *cur_seq = new char[par.maxColCnt]; //Sequence currently read in
int k; // sequence index; start with -1; after reading name of n'th sequence-> k=n
int h; // index for character in input line
int l=1; // index of character in sequence seq[k]
......@@ -358,14 +358,14 @@ HMM::Read(FILE* dbf, char* path)
//If this is not the first sequence then store residues of previous sequence
if (k>0) {
seq[k-1]=new(char[strlen(cur_seq)+1]);
seq[k-1]=new char[strlen(cur_seq)+1];
if (!seq[k-1]) MemoryError("array of sequences to display");
strcpy(seq[k-1],cur_seq);
}
// store sequence name
strcut(line+1); //find next white-space character and overwrite it with end-of-string character
sname[k] = new (char[strlen(line+1)+1]); //+1 for terminating '\0'
sname[k] = new char[strlen(line+1)+1]; //+1 for terminating '\0'
if (!sname[k]) MemoryError("array of names for sequences to display");
strcpy(sname[k],line+1); //store sequence name in **name
l=1; i=1;
......@@ -461,7 +461,7 @@ HMM::Read(FILE* dbf, char* path)
} //while(getline)
//If this is not the first sequence some residues have already been read in
if (k>=0) {
seq[k]=new(char[strlen(cur_seq)+1]);
seq[k]=new char[strlen(cur_seq)+1];
if (!seq[k]) MemoryError("array of sequences to display");
strcpy(seq[k],cur_seq);
}
......@@ -733,7 +733,7 @@ HMM::ReadHMMer(FILE* dbf, char* filestr)
if (nsa_dssp<0)
{
nsa_dssp=k++;
seq[nsa_dssp] = new(char[/*MAXRES*/par.maxResLen+2]);
seq[nsa_dssp] = new char[/*MAXRES*/par.maxResLen+2];
sname[nsa_dssp] = new(char[15]);
strcpy(seq[nsa_dssp]," ");
strcpy(sname[nsa_dssp],"sa_dssp");
......@@ -754,7 +754,7 @@ HMM::ReadHMMer(FILE* dbf, char* filestr)
if (nss_pred<0)
{
nss_pred=k++;
seq[nss_pred] = new(char[/*MAXRES*/par.maxResLen+2]);
seq[nss_pred] = new char[/*MAXRES*/par.maxResLen+2];
sname[nss_pred] = new(char[15]);
strcpy(seq[nss_pred]," ");
strcpy(sname[nss_pred],"ss_pred");
......@@ -775,7 +775,7 @@ HMM::ReadHMMer(FILE* dbf, char* filestr)
if (nss_conf<0)
{
nss_conf=k++;
seq[nss_conf] = new(char[/*MAXRES*/par.maxResLen+2]);
seq[nss_conf] = new char[/*MAXRES*/par.maxResLen+2];
sname[nss_conf] = new(char[15]);
strcpy(seq[nss_conf]," ");
strcpy(sname[nss_conf],"ss_conf");
......@@ -857,7 +857,7 @@ HMM::ReadHMMer(FILE* dbf, char* filestr)
// Prepare to store DSSP states (if there are none, delete afterwards)
nss_dssp=k++;
seq[nss_dssp] = new(char[/*MAXRES*/par.maxResLen+2]);
seq[nss_dssp] = new char[/*MAXRES*/par.maxResLen+2];
sname[nss_dssp] = new(char[15]);
strcpy(sname[nss_dssp],"ss_dssp");
......@@ -1033,12 +1033,12 @@ HMM::ReadHMMer(FILE* dbf, char* filestr)
{
sname[k]=new(char[10]);
strcpy(sname[k],"Consensus");
sname[k+1]=new(char[strlen(longname)+1]);
sname[k+1]=new char[strlen(longname)+1];
strcpy(sname[k+1],longname);
seq[k]=new(char[L+2]);
seq[k]=new char[L+2];
seq[k][0]=' ';
seq[k][L+1]='\0';
seq[k+1]=new(char[L+2]);
seq[k+1]=new char[L+2];
seq[k+1][0]=' ';
seq[k+1][L+1]='\0';
for (i=1; i<=L; ++i)
......@@ -1056,11 +1056,11 @@ HMM::ReadHMMer(FILE* dbf, char* filestr)
}
else
{
sname[k]=new(char[strlen(longname)+1]);
sname[k]=new char[strlen(longname)+1];
/* FIXME valgrind says bytes get lost here during hmm iteration --
fixed in HMM::ClobberGlobal(), I (FS) think */
strcpy(sname[k],longname);
seq[k]=new(char[L+2]);
seq[k]=new char[L+2];
seq[k][0]=' ';
seq[k][L+1]='\0';
}
......@@ -1235,7 +1235,7 @@ HMM::ReadHMMer3(FILE* dbf, char* filestr)
if (nsa_dssp<0)
{
nsa_dssp=k++;
seq[nsa_dssp] = new(char[/*MAXRES*/par.maxResLen+2]);
seq[