1
/* $Id: optimize_target_freq.h,v 1.6 2005/12/01 13:54:04 gertz Exp $
1
/* $Id: optimize_target_freq.h,v 1.7 2005/12/19 15:38:01 gertz Exp $
2
2
* ===========================================================================
4
4
* PUBLIC DOMAIN NOTICE
27
27
* @file optimize_target_freq.h
28
* Routines for finding an optimal set of target frequencies for the
29
* purpose of generating a compositionally adjusted score matrix.
28
31
* @author E. Michael Gertz
30
* Exports for optimized_target_freq.c
33
34
#ifndef __OPTIMIZE_TARGET_FREQ__
44
* Find an optimal set of target frequencies for the purpose of
45
* generating a compositionally adjusted score matrix.
47
* @param x On exit, the optimal set of target frequencies,
48
* interpreted as a two dimensional array in
49
* row-major order. x need not be initialized on
50
* entry; any initial value will be ignored.
51
* @param alphsize the size of the alphabet for this optimization
53
* @param *iterations the total number of iterations used in finding
54
* the target frequencies
55
* @param q a set of target frequencies from a standard
57
* @param row_sums the required row sums for the target frequencies;
58
* the composition of one of the sequences being compared.
59
* @param col_sums the required column sums for the target frequencies;
60
* the composition of the other sequence being compared.
61
* @param constrain_rel_entropy if true, constrain the relative
62
* entropy of the optimal target
63
* frequencies to equal
65
* @param relative_entropy if constrain_rel_entropy is true, then this
66
* is the required relative entropy for the
67
* optimal target frequencies. Otherwise,
68
* this argument is ignored.
69
* @param maxits the maximum number of iterations permitted for the
70
* optimization algorithm; a good value is 2000.
71
* @param tol the solution tolerance; the residuals of the optimization
72
* program must have Euclidean norm <= tol for the
73
* algorithm to terminate.
75
* @returns if an optimal set of target frequencies is
76
* found, then 0, if the iteration failed to
77
* converge, then 1, if there was some error, then -1.
44
81
Blast_OptimizeTargetFrequencies(double x[],