|
NCBI Home IEB Home C Toolkit docs C++ Toolkit source browser C Toolkit source browser (2) |
NCBI C Toolkit Cross ReferenceC/tools/blfmtutl.h |
source navigation diff markup identifier search freetext search file search |
1 /* ===========================================================================
2 *
3 * PUBLIC DOMAIN NOTICE
4 * National Center for Biotechnology Information
5 *
6 * This software/database is a "United States Government Work" under the
7 * terms of the United States Copyright Act. It was written as part of
8 * the author's official duties as a United States Government employee and
9 * thus cannot be copyrighted. This software/database is freely available
10 * to the public for use. The National Library of Medicine and the U.S.
11 * Government have not placed any restriction on its use or reproduction.
12 *
13 * Although all reasonable efforts have been taken to ensure the accuracy
14 * and reliability of the software and data, the NLM and the U.S.
15 * Government do not and cannot warrant the performance or results that
16 * may be obtained by using this software or data. The NLM and the U.S.
17 * Government disclaim all warranties, express or implied, including
18 * warranties of performance, merchantability or fitness for any particular
19 * purpose.
20 *
21 * Please cite the author in any work or product based on this material.
22 *
23 * ===========================================================================*/
24 /*****************************************************************************
25
26 File name: blfmtutl.h
27
28 Author: Tom Madden
29
30 Contents: prototypes and defines for Blast formatting utilities
31
32 ******************************************************************************/
33
34 /* $Revision: 1.6 $
35 * $Log: blfmtutl.h,v $
36 * Revision 1.6 2006/04/26 12:42:36 madden
37 * BlastSetUserErrorString and BlastDeleteUserErrorString moved from blastool.c to blfmtutl.c
38 *
39 * Revision 1.5 2005/12/29 19:55:04 madden
40 * Added functions to print tabular output
41 *
42 * Revision 1.4 2005/05/16 17:42:19 papadopo
43 * From Alejandro Schaffer: Print references for composition-based statistics
44 * and for compositional score matrix adjustment, if either method was used.
45 *
46 * Revision 1.3 2004/10/04 17:54:14 madden
47 * BlastPrintVersionInfo[Ex] now takes const char* as arg for program
48 *
49 * Revision 1.2 2004/06/30 13:38:18 madden
50 * Add prototypes for add_string_to_buffer and add_string_to_bufferEx
51 *
52 * Revision 1.1 2004/06/30 12:31:30 madden
53 * Structures and prototypes for blast formatting utilities
54 *
55 *
56 * */
57 #ifndef __BLFMTUTL__
58 #define __BLFMTUTL__
59
60 #include <ncbi.h>
61 #include <objcode.h>
62 #include <objseq.h>
63 #include <sequtil.h>
64 #include <readdb.h>
65 #include <ncbithr.h>
66 #include <txalign.h>
67 #include <ffprint.h>
68
69
70 #ifdef __cplusplus
71 extern "C" {
72 #endif
73
74 typedef struct _txdbinfo {
75 struct _txdbinfo PNTR next;
76 Boolean is_protein;
77 CharPtr name;
78 CharPtr definition;
79 CharPtr date;
80 Int8 total_length;
81 Int4 number_seqs;
82 Boolean subset; /* Print the subset message. */
83 } TxDfDbInfo, *TxDfDbInfoPtr;
84
85 /*****************************************************************
86 *
87 * Used for pruing SeqALigns that are too big.
88 *
89 ********************************************************************/
90
91 typedef struct _blast_prune_hits_from_sap {
92 SeqAlignPtr sap;
93 Int4 original_number, /* how may unique hits were there originally. */
94 number; /* How many hits on SeqALignPtr above. */
95 Boolean allocated; /* If FALSE, SeqAlignPtr above does NOT belong to this struc.*/
96 } BlastPruneSapStruct, PNTR BlastPruneSapStructPtr;
97
98
99 /*
100 Allocates memory for TxDfDbInfoPtr.
101 Link up new (returned) value to 'old', if non-NULL.
102 */
103 TxDfDbInfoPtr LIBCALL TxDfDbInfoNew PROTO((TxDfDbInfoPtr old));
104
105 /*
106 Deallocates memory (including strings for name, definition, and date).
107 */
108 TxDfDbInfoPtr LIBCALL TxDfDbInfoDestruct PROTO((TxDfDbInfoPtr dbinfo));
109
110
111 /*
112 Duplicate a SeqAlignPtr, keeping on the number of unique db
113 hits specified.
114 */
115
116 BlastPruneSapStructPtr LIBCALL BlastPruneHitsFromSeqAlign PROTO((SeqAlignPtr sap, Int4 number, BlastPruneSapStructPtr prune));
117
118 /* Deallocates BlastPruneSapStruct and deallocates SeqAlignSet if "allocated" flag is set. */
119 BlastPruneSapStructPtr LIBCALL BlastPruneSapStructDestruct PROTO((BlastPruneSapStructPtr prune));
120
121 /*
122 Print a summary of the query.
123 */
124 Boolean LIBCALL AcknowledgeBlastQuery PROTO((BioseqPtr bsp, Int4 line_length, FILE *outfp, Boolean believe_query, Boolean html));
125
126 /*
127 Print a report of the database used.
128 */
129 Boolean LIBCALL PrintDbReport PROTO((TxDfDbInfoPtr dbinfo, Int4 line_length, FILE *outfp));
130
131 /*
132 print out some of the Karlin-Altschul parameters.
133 */
134 Boolean LIBCALL PrintKAParameters PROTO((Nlm_FloatHi Lambda, Nlm_FloatHi K, Nlm_FloatHi H, Int4 line_length, FILE *outfp, Boolean gapped));
135 Boolean LIBCALL PrintKAParametersExtra PROTO((Nlm_FloatHi Lambda, Nlm_FloatHi K, Nlm_FloatHi H, Nlm_FloatHi C, Int4 line_length, FILE *outfp, Boolean gapped));
136
137 /*
138 Print a CharPtr (VisibleString), printing a new line every time
139 a tilde is encountered.
140 */
141 Boolean LIBCALL PrintTildeSepLines PROTO((CharPtr buffer, Int4 line_length, FILE *outfp));
142
143
144 /*
145 Prints some header information.
146 */
147
148 CharPtr LIBCALL BlastGetVersionNumber PROTO((void));
149
150 CharPtr LIBCALL BlastGetReference PROTO((Boolean html));
151
152 Boolean LIBCALL BlastPrintReference PROTO((Boolean html, Int4 line_length, FILE *outfp));
153 Boolean LIBCALL MegaBlastPrintReference PROTO((Boolean html, Int4 line_length, FILE *outfp));
154
155 CharPtr LIBCALL BlastGetPhiReference PROTO((Boolean html));
156
157 Boolean LIBCALL BlastPrintPhiReference PROTO((Boolean html, Int4 line_length, FILE *outfp));
158
159 Boolean LIBCALL CBStatisticsPrintReference PROTO((Boolean html, Int4 line_length, Boolean firstRound, Boolean moreRounds, FILE *outfp));
160
161 Boolean LIBCALL CAdjustmentPrintReference PROTO((Boolean html, Int4 line_length, FILE *outfp));
162
163 Boolean BlastPrintVersionInfo PROTO((const char* program, Boolean html, FILE *outfp));
164 Boolean BlastPrintVersionInfoEx PROTO((const char* program, Boolean html, CharPtr version, CharPtr date, FILE *outfp));
165
166 CharPtr LIBCALL BlastGetReleaseDate PROTO((void));
167
168 /*
169 adds the new string to the buffer, separating by a tilde.
170 Checks the size of the buffer for FormatBlastParameters and
171 allocates longer replacement if needed.
172 */
173
174 Boolean LIBCALL add_string_to_bufferEx PROTO((CharPtr buffer, CharPtr *old, Int2Ptr old_length, Boolean add_tilde));
175
176 Boolean LIBCALL add_string_to_buffer PROTO((CharPtr buffer, CharPtr *old, Int2Ptr old_length));
177
178
179 void PrintTabularOutputHeader PROTO((CharPtr blast_database, BioseqPtr query_bsp,
180 SeqLocPtr query_slp, CharPtr blast_program,
181 Int4 iteration, Boolean believe_query,
182 FILE *outfp));
183
184 void BlastPrintTabulatedResults PROTO((SeqAlignPtr seqalign, BioseqPtr query_bsp, SeqLocPtr query_slp, Int4 num_alignments, CharPtr blast_program, Boolean is_ungapped, Boolean believe_query, Int4 q_shift, Int4 s_shift, FILE *fp, Boolean print_query_info));
185
186 void BlastPrintTabulatedResultsEx PROTO((SeqAlignPtr seqalign, BioseqPtr query_bsp, SeqLocPtr query_slp, Int4 num_alignments, CharPtr blast_program, Boolean is_ungapped, Boolean believe_query, Int4 q_shift, Int4 s_shift, FILE *fp, int *num_formatted, Boolean print_query_info));
187
188 void BlastPrintTabularResults(SeqAlignPtr seqalign, BioseqPtr query_bsp,
189 SeqLocPtr query_slp, Int4 num_alignments, CharPtr blast_program,
190 Boolean is_ungapped, Boolean is_ooframe, Boolean believe_query,
191 Int4 q_shift, Int4 s_shift, FILE *fp, int *num_formatted,
192 Boolean print_query_info);
193
194
195 /* Functions used for printing error messages. */
196
197 Uint1 BlastSetUserErrorString(CharPtr string, SeqIdPtr sip, Boolean use_id);
198 void BlastDeleteUserErrorString(Uint1 err_id);
199
200 #ifdef __cplusplus
201 }
202 #endif
203 #endif /* !__BLFMTUTL__ */
204 |
This page was automatically generated by the
LXR engine.
Visit the LXR main site for more information. |