5 $Id: gjutil.h,v 1.8 2002/08/09 12:30:31 geoff Exp $
11 typedef int GJ_LIM; /* type for limits - e.g. max buffer length */
12 typedef int GJ_PEN; /* type for gap penalties */
13 typedef int GJ_FLG; /* Flag type - usually just 1 or 0 */
14 typedef float GJ_FLOAT; /* Single precision floating point type */
15 typedef double GJ_DBL; /* a double precision floating point type */
16 typedef int GJ_S_COUNT; /* small counter */
17 typedef long GJ_L_COUNT; /* long counter */
19 typedef struct { /* structure to hold a filename and */
20 char *name; /* associated handle */
24 struct tokens { /* structure to hold tokens parsed from */
25 int ntok; /* string with strtok */
39 int Sworkcomp(const void *left, const void *right);
40 void GJindexxS(char **arrin,int n,int *indx);
42 #define STD_FILES extern FILE *std_in,*std_out,*std_err
44 /* utility.h function definitions */
46 void *GJmalloc(size_t);
47 void *GJrealloc(void *,size_t);
48 void *GJmallocNQ(size_t);
49 void *GJreallocNQ(void *,size_t);
51 void GJerror(const char *);
52 char *GJstrdup(const char *);
53 char *GJstoupper(const char *);
54 char *GJstolower(const char *);
55 char *GJstoup(char *);
56 char *GJstolo(char *);
58 FILE *GJfopen(const char *, const char *,int);
59 int GJfclose(FILE *,int);
60 GJFILE *GJfilemake(const char *name,const char *type,int action);
61 GJFILE *GJfilerename(GJFILE *ret_val, const char *name);
62 GJFILE *GJfileclose(GJFILE *ret_val,int action);
63 GJFILE *GJfileopen(GJFILE *ret_val,const char *type,int action);
64 GJFILE *GJfileclean(GJFILE *fval,int action);
65 void GJinitfile(void);
67 char *GJfnonnull(char *);
68 char *GJstrappend(char *,char *);
69 char *GJremovechar(char *,char);
70 char *GJremovechar2(char *string,char c);
71 char *GJstrcreate(size_t, char *);
72 char *GJstrlocate(char *,char *);
73 char *GJsubchar(char *,char,char);
74 char *GJstrtok(char *,const char *);
75 void error(const char *, int);
76 unsigned char **uchararr(int,int);
77 void ucharfree(unsigned char **array,int i);
78 double **GJdarr(int i,int j);
79 void GJdarrfree(double **array,int i);
80 signed char **chararr(int,int);
81 void GJCinit(signed char **,int ,int ,char );
82 void mcheck(void *, char *);
83 char *GJstrblank(char *, int);
84 void GJUCinit(unsigned char **,int ,int ,unsigned char );
85 char *GJcat(int N,...);
86 struct tokens *GJgettokens(const char *delims, char *buff);
87 void GJfreetokens(struct tokens *tok);
88 char * GJtoktostr(struct tokens *tok, char delim, int s, int e);
89 void GJ_start_clock(void);
90 void GJ_stop_clock(FILE *fp);
91 char *GJstrrename(char *old,const char *new);
92 void GJindexx(int *arrin,int n,int *indx);
93 void GJindexxD(double *arrin,int n,int *indx);
94 void GJindexxS(char **arrin,int n,int *indx);
95 int GJbsearchINXS(char **cod, int n, char *query);
96 int GJbsearchINX_IS(char **cod, int *inx, int n, char *query);
98 void GJpline(FILE *fp,char c,int n);
99 char *GJlocaltime(void);
100 void GJpstring(FILE *fp,char *s,int n);
102 IRANGE *irange(int *ivec, int n);
106 Revision 1.8 2002/08/09 12:30:31 geoff
107 Experiment with different weighting schemes.
108 Changes to build_profile to accommodate new schemes
109 pwf 3 Complex clustering to get sequence weights at each position
110 pwf 4 Dirichlet mixture alone
111 pwf 5 Dirichlet mixture + psiblast windowing + blosum weights
112 pwf 6 local blosum matrix calculation + HH sequence weights + blosum
114 Also add wander_check opton
115 Also add option to turn off sw7 bug work around.
116 Add option to suppress multiple alignment output
117 Add gjnoc2 to distribution
119 Revision 1.7 2000/12/21 17:25:44 geoff
120 Add the option to output the sequence fragments from the multiple alignment
121 output option in fasta or pir format. Unlike the block file output, these
122 fragments contain the complete sequence between the start and end points, including
123 any parts deleted in the alignment process.
124 Add appropriate commands to scanps_alias.dat, getpars and getcmd.
126 Revision 1.6 1999/11/17 21:06:47 geoff
127 Add setup_caleb and other changes to swpp2 and so on.
129 Revision 1.5 1997/06/27 07:17:32 gjb
130 Added rlic.c linfo.h and
131 changes to gjutil.c to give better support for
134 Revision 1.4 1997/05/12 11:10:54 gjb
135 Re-added gjutil.c and gjutil.h to repository
138 Revision 1.2 1997/05/12 10:47:52 gjb
139 Modified CVS header and log position
142 #endif /* GJ_UTIL_H */