Files
ecoprimers/src/libthermo/thermalign.h

106 lines
4.0 KiB
C
Raw Normal View History

//=============================================================================
// Module: thermalign.h
// Project: Diploma Thesis - Probe Selection for DNA Microarrays
// 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 CThermAlign - Thermodynamic Alignment Algorithm
// Author: kaderali
// Date: 9/2000 - 12/2000
// Copyright: (c) L. Kaderali, 9/2000 - 12/2000
//
// Revision History
// $ 00sep04 LK : created
// $ 00dec30 LK : changed to do local alignment of probe against
// one entire sequence
// $ 01feb07 LK : optimized
// #$
//=============================================================================
#if !defined(AFX_THERMALIGN_H__1B9227F7_82AB_11D4_9FFF_000000000000__INCLUDED_)
#define AFX_THERMALIGN_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 CThermAlign
//#pragma GCC visibility push(hidden)
//typedef class CThermAlign* PThermAlign;
typedef struct CThermAlign_t
{
//public:
#ifdef _output_alignment
/* void printAlignment(ostream &outputStream);
void OutputAlignment(ostream &outputStream);
bool OutputAlignment(ostream &outputStream, int, int, int, bool local=false);
void OutputLocalAlignment(ostream &outputStream);
void PrintDPTable(ostream&);*/
#endif
// lk01feb07: removed maxlocstuff as not requiered by thermtreealign...
float maxloctm; // maximum local temperature 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
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...
//private:
float *dH; // Dynamic Programming Table for Entropy
float *dS; // Dynamic Programming Table for Enthalpy
PNNParams NNParams; // Nearest Neighbor parameters
// float forbidden_entropy;
#ifdef _output_alignment
//ostrstream *s1aptr, *s2aptr, *atypptr;
// Used to buffer aligned sequences (on output)
//ostrstream s1align;
//ostrstream s2align;
//ostrstream aligntype; // insert, deletion, match, unmatch (for output)
// same for local alignment:
/* removed lk00jan08: use global instead!
ostrstream ls1align;
ostrstream ls2align;
ostrstream laligntype; // insert, deletion, match, unmatch (for output)
*/
#endif
}CThermAlign, * PThermAlign;
//#pragma GCC visibility pop
float therm_GetEntropy(PThermAlign thrma, int, int);
float therm_GetEnthalpy(PThermAlign thrma, int, int);
float therm_GetFreeEnergy(PThermAlign thrma, int, int);
float therm_GetFreeEnergyK(PThermAlign thrma, int, int, float);
float therm_GetFreeEnergyC(PThermAlign thrma, int, int, float);
float therm_GetMeltingTempC(PThermAlign thrma, int, int);
float therm_GetMeltingTempK(PThermAlign thrma, int, int);
void therm_initCThermAlign(PThermAlign thrma, int, int, PNNParams);
void therm_finiCThermAlign(PThermAlign thrma);
//void therm_InitStrings(PThermAlign thrma, char*,char*,int,int,int=0);
void therm_InitStrings(PThermAlign thrma, char*,char*,int,int,int);
void therm_InitBorder(PThermAlign thrma);
//void therm_CalculateTable(PThermAlign thrma, int=1);
void therm_CalculateTable(PThermAlign thrma, int);
#endif // !defined(AFX_THERMALIGN_H__1B9227F7_82AB_11D4_9FFF_000000000000__INCLUDED_)