Commit f142d0e9 by Eric Coissac

Added thermodynamics properties

git-svn-id: https://www.grenoble.prabi.fr/svn/LECASofts/ecoPrimers/trunk@221 60f365c0-8329-0410-b2a4-ec073aeeaa1d
parent b4d8842f
......@@ -6,10 +6,12 @@ PRIMER_OBJ= $(patsubst %.c,%.o,$(PRIMER_SRC))
SRCS= $(PRIMER_SRC)
LIB= -lecoprimer -lecoPCR -lz -lm
LIB= -lecoprimer -lecoPCR -lthermo -lz -lm
LIBFILE= libecoPCR/libecoPCR.a \
libecoprimer/libecoprimer.a
libecoprimer/libecoprimer.a \
libthermo/libthermo.a \
include global.mk
......@@ -41,6 +43,8 @@ libecoPCR/libecoPCR.a:
libecoprimer/libecoprimer.a:
$(MAKE) -C libecoprimer
libthermo/libthermo.a:
$(MAKE) -C libthermo
########
#
......@@ -53,6 +57,7 @@ clean:
rm -f $(EXEC)
$(MAKE) -C libecoPCR clean
$(MAKE) -C libecoprimer clean
$(MAKE) -C libthermo clean
......@@ -6,6 +6,7 @@
*/
#include "libecoprimer/ecoprimer.h"
#include "libthermo/libthermo.h"
#include <stdio.h>
#include <string.h>
#include <ctype.h>
......@@ -13,14 +14,48 @@
#include <getopt.h>
#include <time.h>
#include <sys/time.h>
#include <dlfcn.h>
#define VERSION "0.3"
/* TR: by default, statistics are made on species level*/
#define DEFAULTTAXONRANK "species"
static int cmpprintedpairs(const void* p1,const void* p2);
//float _Z27calculateMeltingTemperature_ (char * seq1, char * seq2);
void* lib_handle = NULL;
float (*calcMelTemp)(char*, char*);
void openlibman ()
{
// Open the library.
char* lib_name = "./libPHunterLib.dylib";
lib_handle = dlopen(lib_name, RTLD_NOW);
if (lib_handle) {
fprintf(stderr, "[%s] dlopen(\"%s\", RTLD_NOW): Successful\n", __FILE__, lib_name);
}
else {
fprintf(stderr, "[%s] Unable to open library: %s\n",
__FILE__, dlerror());
exit(EXIT_FAILURE);
}
// Get the symbol addresses.
calcMelTemp = dlsym(lib_handle, "_Z27calculateMeltingTemperaturePcS_");
if (calcMelTemp) {
fprintf(stderr, "[%s] dlsym(lib_handle, \"addRating\"): Successful\n", __FILE__);
}
else {
fprintf(stderr, "[%s] Unable to get symbol: %s\n",
__FILE__, dlerror());
exit(EXIT_FAILURE);
}
}
void closlibman ()
{
if (lib_handle) dlclose(lib_handle);
}
/* ----------------------------------------------- */
/* printout help */
/* ----------------------------------------------- */
......@@ -162,8 +197,11 @@ void printapair(int32_t index,ppair_t pair, poptions_t options)
bool_t goodtmp;
bool_t strand;
uint32_t i;
float temp;
char *c;
char p1[32];
char p2[32];
if (!asdirect1)
w1=ecoComplementWord(w1,options->primer_length);
......@@ -189,8 +227,41 @@ void printapair(int32_t index,ppair_t pair, poptions_t options)
printf("%6d\t",index);
printf("%s\t",ecoUnhashWord(w1,options->primer_length));
printf("%s",ecoUnhashWord(w2,options->primer_length));
c = ecoUnhashWord(w1,options->primer_length);
strcpy (p1, c);
c = ecoUnhashWord(w2,options->primer_length);
strcpy (p2, c);
printf("%s\t", p1);
printf("%s", p2);
/*For thermo: first word should be 5'-3'*/
/*if (!asdirect1)
{
wtmp = ecoComplementWord(w1,options->primer_length);
c = ecoUnhashWord(wtmp,options->primer_length);
strcpy (p1, c);
}*/
/*For thermo: first word should be 5'-3'*/
/*if (asdirect2)
{
wtmp = ecoComplementWord(w2,options->primer_length);
c = ecoUnhashWord(wtmp,options->primer_length);
strcpy (p2, c);
}*/
/*temp = calculateMeltingTemperature (p1, p2);*/
//float temp = calculateMeltingTemperature ("CTGTTTACCAAAAACATC", "GGTCTGAACTCAGATCAC");
temp = calculateMeltingTemperatureBasic(p1);
printf ("\t%4.3f", temp);
temp = calculateMeltingTemperatureBasic(p2);
printf ("\t%4.3f", temp);
printf ("\t%d",countGCContent(p1));
printf ("\t%d",countGCContent(p2));
printf("\t%c%c", "bG"[(int)good1],"bG"[(int)good2]);
......@@ -401,6 +472,7 @@ void printpairs (ppairtree_t pairs, poptions_t options,ecotaxonomy_t *taxonomy)
for (i=0;i < count;i++)
printapair(i,sortedpairs[i],options);
}
......@@ -479,7 +551,12 @@ int main(int argc, char **argv)
//printcurrenttime();
//return 0;
//openlibman ();
//float temp = calculateMeltingTemperature ("GGTCTGAACTCAGATCAC", "CTGTTTACCAAAAACATC");
//float temp = calculateMeltingTemperatureBasic ("CTGTTTACCAAAAACATC");
//printf ("temp = %f\n", temp);
//return 0;
initoptions(&options);
while ((carg = getopt(argc, argv, "hfvcUDSd:l:L:e:i:r:R:q:3:s:x:t:O:")) != -1) {
......@@ -715,11 +792,11 @@ int main(int argc, char **argv)
/*TR: Added*/
pairs = buildPrimerPairs(seqdb, seqdbsize, primers, &options);
//fprintf(stderr,"buildPrimerPairs finished\n");
// setoktaxforspecificity (&pairs);
printpairs (pairs, &options,taxonomy);
// closlibman ();
//ECOFREE(pairs.pairs,"Free pairs table");
......
MACHINE=MAC_OS_X
LIBPATH= -Llibapat -LlibecoPCR -Llibecoprimer
LIBPATH= -Llibapat -LlibecoPCR -Llibecoprimer -Llibthermo
MAKEDEPEND = gcc -D$(MACHINE) -M $(CPPFLAGS) -o $*.d $<
CC=gcc
......
SOURCES = dinkelbach.c \
galign.c \
libthermo.c \
nnparams.c \
thermalign.c
SRCS=$(SOURCES)
OBJECTS= $(patsubst %.c,%.o,$(SOURCES))
LIBFILE= libthermo.a
RANLIB= ranlib
include ../global.mk
all: $(LIBFILE)
clean:
rm -rf $(OBJECTS) $(LIBFILE)
$(LIBFILE): $(OBJECTS)
ar -cr $@ $?
$(RANLIB) $@
dinkelbach.o dinkelbach.P : dinkelbach.c nnparams.h /usr/include/math.h \
/usr/include/architecture/i386/math.h /usr/include/sys/cdefs.h \
/usr/include/string.h /usr/include/_types.h /usr/include/sys/_types.h \
/usr/include/machine/_types.h /usr/include/i386/_types.h galign.h \
dinkelbach.h
/*
* dinkelbach.cpp
* PHunterLib
*
* Created by Tiayyba Riaz on 6/7/09.
* Copyright 2009 __MyCompanyName__. All rights reserved.
*
*/
//#include <iostream>
//#include <strstream>
//#include <cstring>
#include "nnparams.h"
#include "galign.h"
#include "dinkelbach.h"
void dnkl_initdinkelbach(pdinkelbach dnkl, PNNParams myDiParams, GGAlign mGAlign)
{
dnkl->myDinkParams = myDiParams;
dnkl->myGAlign = mGAlign;
}
int dnkl_iteration(pdinkelbach dnkl, float TempK)
{
int iteration = 0;
nparam_AlterTM(dnkl->myDinkParams, TempK);
float precursor_oldTM = TempK;
float newTM = TempK;
float oldTM = TempK, lambda, oldlambda;
lambda = 999999999999999999.9;
int positive=0;
do
{
iteration++;
galn_InitBorder(dnkl->myGAlign);
galn_CalculateTable(dnkl->myGAlign, 1);
oldlambda=lambda;
lambda =galn_GetFreeEnergyK(dnkl->myGAlign, dnkl->myGAlign->maxloci,dnkl->myGAlign->maxlocj,newTM);
if(lambda < 0.0)
{
if(!positive)
{
//Initial melting temperature greater than expected
newTM = galn_GetEnthalpy(dnkl->myGAlign, dnkl->myGAlign->maxloci,dnkl->myGAlign->maxlocj)/galn_GetEntropy(dnkl->myGAlign, dnkl->myGAlign->maxloci,dnkl->myGAlign->maxlocj)-1;
lambda = oldlambda;
nparam_AlterTM(dnkl->myDinkParams, newTM);
}
else
{
precursor_oldTM = oldTM;
}
}
else
{
positive = 1;
oldTM = newTM;
newTM = galn_GetMeltingTempK(dnkl->myGAlign, dnkl->myGAlign->maxloci,dnkl->myGAlign->maxlocj);
nparam_AlterTM(dnkl->myDinkParams, newTM);
}
}
while(!positive || (newTM - oldTM > 0.001 && (lambda>0.0)&&(lambda<oldlambda)));
if(newTM - oldTM > 0.001 && ((lambda<0.0)||(lambda>oldlambda)))
{
iteration++;
nparam_AlterTM(dnkl->myDinkParams, precursor_oldTM);
galn_InitBorder(dnkl->myGAlign);
galn_CalculateTable(dnkl->myGAlign, 1);
lambda = galn_GetFreeEnergyK(dnkl->myGAlign, dnkl->myGAlign->maxloci,dnkl->myGAlign->maxlocj,precursor_oldTM);
newTM = galn_GetMeltingTempK(dnkl->myGAlign, dnkl->myGAlign->maxloci,dnkl->myGAlign->maxlocj);
nparam_AlterTM(dnkl->myDinkParams, newTM);
}
return iteration;
}
/*
* dinkelbach.h
* PHunterLib
*
* Created by Tiayyba Riaz on 7/2/09.
* Copyright 2009 __MyCompanyName__. All rights reserved.
*
*/
//Module: Achievement of the Dinkelbach algorithm
#ifndef __dinkelbach_h
#define __dinkelbach_h
//#include <iostream>
//#include <strstream>
//#include <cstring>
#include "nnparams.h"
#include "galign.h"
//using namespace std;
//typedef class dinkelbach* DINKEL;
//#pragma GCC visibility push(hidden)
typedef struct dinkelbach_st
{
PNNParams myDinkParams;
GGAlign myGAlign;
}dinkelbach, * pdinkelbach;
//#pragma GCC visibility pop
void dnkl_initdinkelbach(pdinkelbach dnkl, PNNParams, GGAlign);
int dnkl_iteration(pdinkelbach dnkl, float TempK);
#endif /* __dinkelbach_h */
galign.o galign.P : galign.c /usr/include/math.h \
/usr/include/architecture/i386/math.h /usr/include/sys/cdefs.h \
/usr/include/assert.h /usr/include/stdio.h /usr/include/_types.h \
/usr/include/sys/_types.h /usr/include/machine/_types.h \
/usr/include/i386/_types.h /usr/include/stdlib.h \
/usr/include/available.h /usr/include/sys/wait.h \
/usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \
/usr/include/machine/signal.h /usr/include/i386/signal.h \
/usr/include/i386/_structs.h /usr/include/sys/_structs.h \
/usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \
/usr/include/sys/resource.h /usr/include/machine/endian.h \
/usr/include/i386/endian.h /usr/include/sys/_endian.h \
/usr/include/libkern/_OSByteOrder.h \
/usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \
/usr/include/machine/types.h /usr/include/i386/types.h galign.h \
nnparams.h /usr/include/string.h
/*
* galign.h
* PHunterLib
*
* Created by Tiayyba Riaz on 7/2/09.
* Copyright 2009 __MyCompanyName__. All rights reserved.
*
*/
//=============================================================================
// Module: galign.h
// Project: Cubic Project - Calculation of melting temperature and free
// energy of two DNA strands
// Type: header file - Thermodynamic Alignment.
// Language: c++
// Compiler: microsoft visual c++ 6.0, unix/linux gcc
// System/OS: Windows 32, Sun solaris, Linux, other unix systems (untested)
// Database: none
// Description: class GAlign - Thermodynamic Alignment Algorithm
// Author: leber
// Date: 01/2002 - 02/2002
// Copyright: (c) L. Kaderali & M. Leber, 01/2002 - 02/2002
//
// Revision History
// $ 00sep04 LK : created
// $ 00dec30 LK : changed to do local alignment of probe against
// one entire sequence
// $ 01feb07 LK : optimized
// #$
//=============================================================================
#if !defined(AFX_GAlign_H__1B9227F7_82AB_11D4_9FFF_000000000000__INCLUDED_)
#define AFX_GAlign_H__1B9227F7_82AB_11D4_9FFF_000000000000__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
//#include <iostream>
//#include <strstream>
//#include <ostream>
#include "nnparams.h" // Nearest Neighbor Parameters
//#include "../gsfxtree/gsfxtree.h" // Suffix Tree Stuff
//using namespace std;
#ifdef _pack
#pragma pack(1)
#endif
//-----------------------------------------------------------------------------
// class GAlign
//#pragma GCC visibility push(hidden)
//typedef class GAlign* GGAlign;
typedef struct GAlign_st
{
//public:
// lk01feb07: removed maxlocstuff as not requiered by thermtreealign...
float maxlocg; // maximum local dG value found
int maxloci; // i position thereof
int maxlocj; // j position thereof
int maxloct; // and type of maximum alignment!
int targetNumber; // id number of target sequence
// PGSfxLeaf probeNode; // identifier for probe sequence
//private:
char *seq1; // Sequence 1
char *seq2; // Sequence 2
int seq1len; // Length of Sequence 1
int seq2len; // Length of Sequence 2
int maxseq1len; // length of longest target...
float *dH; // Dynamic Programming Table for Entropy
float *dS; // Dynamic Programming Table for Enthalpy
PNNParams GNNParams; // Nearest Neighbor parameters
// float forbidden_entropy;
}GAlign, * GGAlign;
void galn_initGAlign(GGAlign galn, int, int, PNNParams);
void galn_finiGAlign(GGAlign galn);
//void galn_InitStrings(GGAlign galn, char*,char*,int,int,int=0);
void galn_InitStrings(GGAlign galn, char*,char*,int,int,int);
void galn_InitBorder(GGAlign galn);
//void galn_CalculateTable(GGAlign galn, int=1);
void galn_CalculateTable(GGAlign galn, int);
float galn_GetEntropy(GGAlign galn, int, int);
float galn_GetEnthalpy(GGAlign galn, int, int);
float galn_GetFreeEnergyK(GGAlign galn, int, int, float);
float galn_GetFreeEnergyC(GGAlign galn, int, int, float);
float galn_GetMeltingTempC(GGAlign galn, int, int);
float galn_GetMeltingTempK(GGAlign galn, int, int);
void galn_printEnthalpyTable(GGAlign galn, int level);
void galn_printEntropyTable(GGAlign galn, int level);
//#pragma GCC visibility pop
#endif //!defined(AFX_GAlign_H__1B9227F7_82AB_11D4_9FFF_000000000000__INCLUDED_)
libthermo.o libthermo.P : libthermo.c /usr/include/stdlib.h /usr/include/available.h \
/usr/include/_types.h /usr/include/sys/_types.h \
/usr/include/sys/cdefs.h /usr/include/machine/_types.h \
/usr/include/i386/_types.h /usr/include/sys/wait.h \
/usr/include/sys/signal.h /usr/include/sys/appleapiopts.h \
/usr/include/machine/signal.h /usr/include/i386/signal.h \
/usr/include/i386/_structs.h /usr/include/sys/_structs.h \
/usr/include/machine/_structs.h /usr/include/mach/i386/_structs.h \
/usr/include/sys/resource.h /usr/include/machine/endian.h \
/usr/include/i386/endian.h /usr/include/sys/_endian.h \
/usr/include/libkern/_OSByteOrder.h \
/usr/include/libkern/i386/_OSByteOrder.h /usr/include/alloca.h \
/usr/include/machine/types.h /usr/include/i386/types.h libthermo.h \
nnparams.h /usr/include/math.h /usr/include/architecture/i386/math.h \
/usr/include/string.h thermalign.h galign.h dinkelbach.h
/*
* PHunterLib.cp
* PHunterLib
*
* Created by Tiayyba Riaz on 6/7/09.
* Copyright 2009 __MyCompanyName__. All rights reserved.
*
*/
#include <stdlib.h>
#include "libthermo.h"
#include "nnparams.h"
#include "thermalign.h"
#include "galign.h"
#include "dinkelbach.h"
//#define EXPORT __attribute__((visibility("default")))
//char targetsFile [1000]="";
//char nonTargetsFile [1000]="";
//char primersFile [1000]="";
//char primersOutputFile [1000]="";
//int minLength = DEF_MIN_PRIMER_LENGTH;
//int maxLength = DEF_MAX_PRIMER_LENGTH;
//int productMinLength = DEF_MIN_PROD_LENGTH;
//int productMaxLength = DEF_MAX_PROD_LENGTH;
//char forwardPrimer [PRIMERS_MAX_SIZE] = DEF_FORWARD_PRIMER;
//char reversePrimer [PRIMERS_MAX_SIZE] = DEF_REVERSE_PRIMER;
//int beginPosForward = DEF_BEGINPOS_FORWARD;
//int endPosForward = DEF_ENDPOS_FORWARD;
//int beginPosReverse = DEF_BEGINPOS_REVERSE;
//int endPosReverse = DEF_ENDPOS_REVERSE;
//char maskTargets [PRIMERS_MAX_SIZE] = DEF_MASK_TARGETS;
//char maskNonTargets [PRIMERS_MAX_SIZE] = DEF_MASK_NONTARGETS;
//char degeneracy[PRIMERS_MAX_SIZE]=DEF_DEGENERACY;
//int nseqForCandidates = DEF_SEQ_FOR_CANDS;
//float minCoverageTargets = DEF_MIN_COVERAGE_TARGETS;
//float maxCoverageNonTargets = DEF_MAX_COVERAGE_NONTARGETS;
//float maxSelfScore = DEF_MAX_SELF_SCORE;
//float maxEndScore = DEF_MAX_END_SCORE;
//float minGCContent = DEF_MIN_GCCONTENT;
//float maxGCContent = DEF_MAX_GCCONTENT;
//int gcClamp = DEF_GCCLAMP;
//int maxPolyX = DEF_MAX_POLY_X;
float concPrimers = DEF_CONC_PRIMERS;
float concSequences = DEF_CONC_SEQUENCES;
float salt = DEF_SALT;
int salMethod = SALT_METHOD_SANTALUCIA;
//float minTempTargets=DEF_MIN_TEMP_TARGETS;
//float maxTempTargets=DEF_MAX_TEMP_TARGETS;
//float maxTempNonTargets=DEF_MAX_TEMP_NONTARGETS;
//float deltaTempNonTargets=DEF_DELTA_TEMP_NONTARGETS;
//float maxPairTempDiff=DEF_MAX_PAIR_TEMP_DIFF;
//char primersLabel [1000] = DEF_PRIMERS_LABEL;
//int fullStats = DEF_FULL_STATS;
//char seqRank [10000] = DEF_SEQ_RANK;
int countGCContent(char * seq ) {
int lseq = strlen(seq);
int k;
int count = 0;
for( k=0;k<lseq;k++) {
if (seq[k] == 'G' || seq[k] == 'C' ) {
count+=1;
}
}
return count;
}
char getComplement(char base) {
if(base == 'A') return 'T';
else if(base == 'G') return 'C';
else if(base == 'C') return 'G';
else if(base == 'T') return 'A';
else if(base == 'N') return 'N';
return 'A';
}
void addDollarSigns(char * seq) {
int n = strlen(seq);
int i;
seq[n+2]=0;
seq[n+1]='$';
for( i=n;i>0;i--) {
seq[i]=seq[i-1];
}
seq[0] = '$';
}
void removeDollarSigns(char * seq) {
int n = strlen(seq);
int i;
for( i=0;i<n-2;i++) {
seq[i]=seq[i+1];
}
seq[n-2]=0;
}
float calculateMeltingTemperatureInt (char * seq1, char * seq2, PNNParams params) {
int length = strlen(seq2);
int perfectComplements = 1;
int k;
if(strlen(seq1)!= length) {
perfectComplements = 0;
}
for( k=0;k<length && perfectComplements;k++) {
if(seq2[k] != getComplement(seq1[k])) {
perfectComplements = 0;
}
}
addDollarSigns(seq1);
addDollarSigns(seq2);
CThermAlign myAlignment;//(strlen(seq1),strlen(seq2),params);
therm_initCThermAlign(&myAlignment, strlen(seq1),strlen(seq2),params);
therm_InitStrings (&myAlignment, seq1,seq2,strlen(seq1),strlen(seq2), 0);
therm_InitBorder(&myAlignment);
therm_CalculateTable(&myAlignment, 1);
float answer;
if(perfectComplements) {
answer = therm_GetMeltingTempC(&myAlignment, myAlignment.maxloci,myAlignment.maxlocj);
} else {
float tempK = therm_GetMeltingTempK (&myAlignment, myAlignment.maxloci,myAlignment.maxlocj);
GAlign mydGAlign;//(strlen(seq1),strlen(seq2),params);
galn_initGAlign(&mydGAlign, strlen(seq1),strlen(seq2),params);
galn_InitStrings(&mydGAlign, seq1,seq2,strlen(seq1),strlen(seq2), 0);
dinkelbach myDinkel;//(params, &mydGAlign);
dnkl_initdinkelbach(&myDinkel, params, &mydGAlign);
dnkl_iteration(&myDinkel, tempK);
answer = galn_GetMeltingTempC(&mydGAlign, mydGAlign.maxloci,mydGAlign.maxlocj);
galn_finiGAlign(&mydGAlign);
}
removeDollarSigns(seq1);
removeDollarSigns(seq2);
therm_finiCThermAlign(&myAlignment);
return answer;
}
float calculateMeltingTemperature (char * seq1, char * seq2) {
long len = strlen (seq1);
char *seq1new = (char *) calloc(len + 3, sizeof(char));//new char[len + 3];
len = strlen (seq2);
char *seq2new = (char *) calloc(len + 3, sizeof(char));//new char[len + 3];
strcpy (seq1new, seq1);
strcpy (seq2new, seq2);
PNNParams paramsPrimerSeq = (PNNParams) calloc (1, sizeof(CNNParams));
nparam_InitParams(paramsPrimerSeq, concPrimers,concSequences,salt,salMethod);
float temp = calculateMeltingTemperatureInt(seq1new, seq2new, paramsPrimerSeq);
free (seq1new);
free (seq2new);
return temp;
}
float calculateMeltingTemperatureBasic (char * seq) {
int gccount;
float temp;
int seqlen;
seqlen = strlen (seq);
gccount = countGCContent (seq);
temp = 64.9 + 41*(gccount - 16.4)/seqlen;
return temp;
}
/*
* PHunterLib.h
* PHunterLib
*
* Created by Tiayyba Riaz on 7/2/09.
* Copyright 2009 __MyCompanyName__. All rights reserved.
*
*/
#ifndef PHunterLib_
#define PHunterLib_
#define TARGETS_MAX_SIZE 2000
#define NON_TARGETS_MAX_SIZE 10000
#define SEQUENCES_MAX_SIZE 100000
#define PRIMERS_MAX_SIZE 100
#define CANDIDATES_MAX_SIZE 100000
#define SEEDS_MAX_SIZE 9
#define SEEDSTABLE_TAM 1000000
#define MAX_DEGENERACY 256
#define STAT_COUNTS 12
#define STAT_TOTAL_CANDIDATES 0
#define STAT_TEST_DEGENERACY 1
#define STAT_TEST_GCCONTENT 2
#define STAT_TEST_GCCLAMP 3
#define STAT_TEST_MAX_POLY_X 4
#define STAT_TEST_SELFCOMP 5
#define STAT_TEST_TMSELF 6
#define STAT_TEST_TARGETS 7
#define STAT_TEST_NONTARGETS 8
#define STAT_ALLTESTS 9
#define STAT_FAILED_SELFCOMP_LOW 10
#define STAT_FAILED_SELFCOMP_HIGH 11
#define DEF_MIN_PRIMER_LENGTH 20
#define DEF_MAX_PRIMER_LENGTH 25
#define DEF_MIN_PROD_LENGTH 75
#define DEF_MAX_PROD_LENGTH 200
#define DEF_FORWARD_PRIMER "NONE"
#define DEF_REVERSE_PRIMER "NONE"
#define DEF_BEGINPOS_FORWARD 0
#define DEF_ENDPOS_FORWARD SEQUENCES_MAX_SIZE
#define DEF_BEGINPOS_REVERSE 0
#define DEF_ENDPOS_REVERSE SEQUENCES_MAX_SIZE
#define DEF_MASK_TARGETS "11"
#define DEF_MASK_NONTARGETS "NONE"
#define DEF_DEGENERACY "1"
#define DEF_SEQ_FOR_CANDS 1
#define DEF_MIN_COVERAGE_TARGETS 100
#define DEF_MAX_COVERAGE_NONTARGETS 0
#define DEF_MAX_SELF_SCORE 800
#define DEF_MAX_END_SCORE 300
#define DEF_MIN_GCCONTENT 25
#define DEF_MAX_GCCONTENT 75
#define DEF_GCCLAMP 0
#define DEF_MAX_POLY_X 5
#define DEF_CONC_PRIMERS 0.0000008
#define DEF_CONC_SEQUENCES 0
#define DEF_SALT 0.05
#define DEF_MIN_TEMP_TARGETS 40
#define DEF_MAX_TEMP_TARGETS 70
#define DEF_MAX_TEMP_NONTARGETS 40
#define DEF_DELTA_TEMP_NONTARGETS 0
#define DEF_MAX_PAIR_TEMP_DIFF 40
#define DEF_PRIMERS_LABEL "P"
#define DEF_FULL_STATS 0
#define DEF_SEQ_RANK "NONE"
float calculateMeltingTemperature (char * seq1, char * seq2);
float calculateMeltingTemperatureBasic (char * seq);
int countGCContent(char * seq );
#endif