1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103
|
/*This software and documentation is copyright © 2009 by Christopher Quince.*/
/*Permission is granted for anyone to copy, use, or modify these programs and documents for purposes of research or education, provided this copyright notice is retained, and note is made of any changes that have been made.*/
/* These programs and documents are distributed without any warranty, express or implied. As the programs were written for research purposes only, they have not been tested to the degree that would be advisable in any important application. All use of these programs is entirely at the user's own risk.*/
#ifndef NDIST_MPI_H
#define NDIST_MPI_H
typedef struct s_Params
{
char *szInputFile;
char *szLookUpFile;
int bIdent;
int bPhylip;
} t_Params;
typedef struct s_Data
{
char* acSequences;
char** aszID;
int nSeq;
int nMaxLen;
int* anLen;
} t_Data;
/**Constants**/
#define MAX_LINE_LENGTH 65536
#define DELIM " \n"
#define FALSE 0
#define TRUE 1
/* Input Definitions */
#define OPTION 0 /* optional */
#define ALWAYS 1 /* required */
#define LOOKUP_FILE_FLAG "-rin"
#define INPUT_FILE "-in"
#define IDENT "-i"
#define PHYLIP "-p"
#define GAP_PENALTY 15.0
#define HOMOPOLYMER_PENALTY 4.0
#define GAP '-'
#define T_GAP '.'
#define COMMA ","
#define DIAG 0
#define LEFT 1
#define UP 2
#define MAX_PACKET_SIZE 1048576
#define N_BASES 4
#ifndef min
#define min(x, y) ((x) < (y) ? (x) : (y))
#endif
#ifndef max
#define max(x, y) ((x) > (y) ? (x) : (y))
#endif
/* User defined structures */
#define LOOKUP_FILE "/usr/share/ampliconnoise/Data/Tran.dat"
typedef struct s_Align
{
// char* acA;
//char* acB;
int nLen;
int nComp;
double dDist;
} t_Align;
/*User defined functions*/
void getCommandLineParams(t_Params *ptParams,int argc,char *argv[]);
void readData(t_Data *ptData, t_Params *ptParams);
void getCommandLineParams(t_Params *ptParams,int argc,char *argv[]);
double needlemanWunsch(const char* acA, const char* acB, int nLenA, int nLenB, int nM);
void initLookUp(t_Params *ptParams);
#endif
|