1
/* $Id: blast_returns.h,v 1.7 2004/10/04 14:02:02 madden Exp $
1
/* $Id: blast_returns.h,v 1.12 2005/04/27 20:00:15 dondosha Exp $
2
2
* ===========================================================================
4
4
* PUBLIC DOMAIN NOTICE
22
22
* Please cite the author in any work or product based on this material.
24
* Author: Ilya Dondoshansky
24
25
* ===========================================================================*/
26
/*****************************************************************************
28
File name: blast_returns.h
30
Author: Ilya Dondoshansky
32
Contents: Manipulation of data returned from BLAST other than Seq-aligns
34
******************************************************************************
27
/** @file blast_returns.h
28
* Manipulation of data returned from BLAST other than Seq-aligns
37
31
#ifndef __BLAST_RETURNS__
38
32
#define __BLAST_RETURNS__
50
44
#include <algo/blast/core/blast_diagnostics.h>
51
45
#include <blfmtutl.h>
47
/** @addtogroup CToolkitAlgoBlast
53
52
/** Small structure containing the just those Karlin-Altschul parameters needed
54
53
* for the BLAST formatting */
55
54
typedef struct BLAST_KAParameters {
56
55
double Lambda; /**< Karlin-Altschul scaling parameter. */
57
56
double K; /**< Karlin-Altschul K parameter. */
58
57
double H; /**< Karlin-Altschul entropy */
58
double C; /**< Constant factor for PHI BLAST e-values. */
59
59
} BLAST_KAParameters;
61
61
/** Small structure containing some numbers about database length, adjustment,
95
95
* than the alignment.
97
97
typedef struct Blast_SummaryReturn {
98
BLAST_KAParameters* ka_params; /**< Ungapped Karlin-Altschul parameters */
99
BLAST_KAParameters* ka_params_gap;/**< Gapped Karlin-Altschul parameters */
100
Blast_DatabaseStats* db_stats; /**< database numbers and adjustments */
101
Blast_SearchParams* search_params; /**< parameters used in search. */
102
BlastDiagnostics* diagnostics; /**< diagnositics from engine. */
98
BLAST_KAParameters* ka_params; /**< Ungapped Karlin-Altschul parameters */
99
BLAST_KAParameters* ka_params_gap;/**< Gapped Karlin-Altschul parameters */
100
Blast_DatabaseStats* db_stats; /**< database numbers and adjustments */
101
Blast_SearchParams* search_params;/**< parameters used in search. */
102
BlastDiagnostics* diagnostics; /**< diagnositics from engine. */
103
Blast_Message* error; /**< Error or warning message. */
104
SPHIQueryInfo* pattern_info; /**< In PHI BLAST only: information about
105
pattern occurrences in query. */
103
106
} Blast_SummaryReturn;
105
108
/** Retrieves necessary information from a sequence source and fills the
123
126
/** Fills the summary returns from the provided information.
124
127
* NOTE: either one of rdfp or subject_loc (below) can be NULL,
129
* @param program_number Type of BLAST program [in]
127
130
* @param score_options pointer for scoring options [in]
128
* @parm sbp Karlin-Altschul/statistics information [in]
131
* @param sbp Karlin-Altschul/statistics information [in]
129
132
* @param lookup_options pointer for lookup table options [in]
130
133
* @param word_options pointer for word finding options [in]
131
134
* @param ext_options pointer for extension options [in]
132
135
* @param hit_options pointer for hit saving options [in]
133
136
* @param eff_len_options pointer for effective length options [in]
134
137
* @param query_setup pointer for query setup options [in]
135
* @param query_info information about query [in]
136
* @param rdfp used to fetch information from BLAST db, leave NULL if
137
* "blast2seqs" case [in]
138
* @param subject_loc location of target sequence, leave NULL if db search [in]
138
* @param query_info Information about query. Note: in PHI BLAST, the query
139
* pattern information pointer is passed on to the sum_returns
140
* structure and set to NULL in the query_info within this
142
* @param seq_src Source of subject sequences [in]
139
143
* @param diagnostics pointer to diagnostic information, SET to NULL
140
144
* on return [in|out]
141
* @param sum_returns_out object to be filled in [out]
145
* @param sum_returns Object to be filled in. Must be already allocated. [out]
142
146
* @return zero returned on success
144
148
Int2 Blast_SummaryReturnFill(EBlastProgramType program_number,
151
155
const BlastEffectiveLengthsOptions* eff_len_options,
152
156
const QuerySetUpOptions* query_setup,
153
157
const BlastQueryInfo* query_info,
154
ReadDBFILE* rdfp, SeqLoc* subject_slp,
158
const BlastSeqSrc* seq_src,
155
159
BlastDiagnostics** diagnostics,
156
Blast_SummaryReturn** sum_returns_out);
160
Blast_SummaryReturn* sum_returns);
162
/** Allocate the Blast_SummaryReturn structure */
163
Blast_SummaryReturn* Blast_SummaryReturnNew(void);
158
165
/** Deallocates memory for the summary returns structure
159
166
* @param sum_return object to be freed [in]
162
169
Blast_SummaryReturn* Blast_SummaryReturnFree(Blast_SummaryReturn* sum_return);
171
/** Frees the contents of the summary returns structure, but not the structure
173
* @param sum_returns Structure to clean. [in] [out]
176
Blast_SummaryReturnClean(Blast_SummaryReturn* sum_returns);
164
180
#ifdef __cplusplus
167
184
#endif /* !__BLAST_FORMAT__ */