~ubuntu-branches/ubuntu/gutsy/ncbi-tools6/gutsy

« back to all changes in this revision

Viewing changes to algo/blast/api/blast_returns.h

  • Committer: Bazaar Package Importer
  • Author(s): Barry deFreese
  • Date: 2005-09-27 15:38:20 UTC
  • mfrom: (1.1.3 upstream) (2.1.1 sarge)
  • Revision ID: james.westby@ubuntu.com-20050927153820-1t1sta0qirjpxaar
Tags: 6.1.20050429-1ubuntu1
GL/GLU Transition

Show diffs side-by-side

added added

removed removed

Lines of Context:
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
* ===========================================================================
3
3
*
4
4
*                            PUBLIC DOMAIN NOTICE
21
21
*
22
22
*  Please cite the author in any work or product based on this material.
23
23
*
 
24
*  Author: Ilya Dondoshansky
24
25
* ===========================================================================*/
25
26
 
26
 
/*****************************************************************************
27
 
 
28
 
File name: blast_returns.h
29
 
 
30
 
Author: Ilya Dondoshansky
31
 
 
32
 
Contents: Manipulation of data returned from BLAST other than Seq-aligns
33
 
 
34
 
******************************************************************************
35
 
 * $Revision: 1.7 $
36
 
 * */
 
27
/** @file blast_returns.h
 
28
 * Manipulation of data returned from BLAST other than Seq-aligns
 
29
 */
 
30
 
37
31
#ifndef __BLAST_RETURNS__
38
32
#define __BLAST_RETURNS__
39
33
 
50
44
#include <algo/blast/core/blast_diagnostics.h>   
51
45
#include <blfmtutl.h>
52
46
 
 
47
/** @addtogroup CToolkitAlgoBlast
 
48
 *
 
49
 * @{
 
50
 */
 
51
 
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;
60
60
 
61
61
/** Small structure containing some numbers about database length, adjustment, 
95
95
 * than the alignment.
96
96
 */
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;
104
107
 
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,
125
128
 * but not both.
126
 
 *
 
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 
 
141
 *                   function. [in]
 
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
143
147
 */
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);
 
161
 
 
162
/** Allocate the Blast_SummaryReturn structure */
 
163
Blast_SummaryReturn* Blast_SummaryReturnNew(void);
157
164
 
158
165
/** Deallocates memory for the summary returns structure 
159
166
 * @param sum_return object to be freed [in]
161
168
 */
162
169
Blast_SummaryReturn* Blast_SummaryReturnFree(Blast_SummaryReturn* sum_return);
163
170
 
 
171
/** Frees the contents of the summary returns structure, but not the structure
 
172
 * itself.
 
173
 * @param sum_returns Structure to clean. [in] [out]
 
174
 */
 
175
void 
 
176
Blast_SummaryReturnClean(Blast_SummaryReturn* sum_returns);
 
177
 
 
178
/* @} */
 
179
 
164
180
#ifdef __cplusplus
165
181
}
166
182
#endif
 
183
 
167
184
#endif /* !__BLAST_FORMAT__ */
168
185