NCBI C Toolkit Cross Reference

C/ddv/ddvcreate.h


  1 /*  $Id: ddvcreate.h,v 1.31 2001/01/29 20:35:49 hurwitz Exp $
  2 * ===========================================================================
  3 *
  4 *                            PUBLIC DOMAIN NOTICE
  5 *            National Center for Biotechnology Information (NCBI)
  6 *
  7 *  This software/database is a "United States Government Work" under the
  8 *  terms of the United States Copyright Act.  It was written as part of
  9 *  the author's official duties as a United States Government employee and
 10 *  thus cannot be copyrighted.  This software/database is freely available
 11 *  to the public for use. The National Library of Medicine and the U.S.
 12 *  Government do not place any restriction on its use or reproduction.
 13 *  We would, however, appreciate having the NCBI and the author cited in
 14 *  any work or product based on this material
 15 *
 16 *  Although all reasonable efforts have been taken to ensure the accuracy
 17 *  and reliability of the software and data, the NLM and the U.S.
 18 *  Government do not and cannot warrant the performance or results that
 19 *  may be obtained by using this software or data. The NLM and the U.S.
 20 *  Government disclaim all warranties, express or implied, including
 21 *  warranties of performance, merchantability or fitness for any particular
 22 *  purpose.
 23 *
 24 * ===========================================================================
 25 *
 26 * File Name:  ddvcreate.h
 27 *
 28 * Author:  Sarah Wheelan
 29 *
 30 * Version Creation Date:   08/99
 31 *
 32 * $Revision: 1.31 $
 33 *
 34 * File Description: 
 35 *
 36 * Modifications:
 37 * --------------------------------------------------------------------------
 38 * $Log: ddvcreate.h,v $
 39 * Revision 1.31  2001/01/29 20:35:49  hurwitz
 40 * make gap between aligned blocks optional
 41 *
 42 * Revision 1.30  2001/01/25 21:49:14  hurwitz
 43 * added option for extra gap char (tilde) between aligned blocks
 44 *
 45 * Revision 1.29  2000/09/08 21:50:39  hurwitz
 46 * made DDV_ReadSeqBin public
 47 *
 48 * Revision 1.28  2000/05/04 22:43:38  hurwitz
 49 * don't launch DDE on top of DDV, change some wording, redraw DDE after save to AlnMgr
 50 *
 51 * Revision 1.27  2000/04/21 23:00:50  hurwitz
 52 * can launch DDE from DDV
 53 *
 54 * Revision 1.26  2000/04/19 15:45:50  hurwitz
 55 * can create display for a block
 56 *
 57 * Revision 1.25  2000/03/31 21:33:07  durand
 58 * added new default color schemas for BLAST
 59 *
 60 * Revision 1.24  2000/03/28 13:33:27  durand
 61 * moved DDV_Disp_Opt data structure to pgppop.h
 62 *
 63 * Revision 1.23  2000/03/21 19:26:45  durand
 64 * adapt ddvcreate to be used by pgppop
 65 *
 66 * Revision 1.22  2000/03/20 13:46:23  durand
 67 * fixed a bug in BLAST functions; added DDV_BLAST_COLOR0 to produce a BLAST output without any layout
 68 *
 69 * Revision 1.21  2000/02/28 16:52:47  durand
 70 * wrote a new manager for unaligned regions
 71 *
 72 * Revision 1.20  2000/02/23 21:34:29  durand
 73 * allow custom display of gap characters
 74 *
 75 * Revision 1.19  2000/02/23 19:49:33  durand
 76 * use row number instead of SeqId for coloring
 77 *
 78 * Revision 1.18  2000/02/14 16:49:34  durand
 79 * add new options for BLAST output
 80 *
 81 * Revision 1.17  2000/02/02 14:44:31  durand
 82 * added function to create data structure for block editor, fixed some bugs
 83 *
 84 * Revision 1.16  2000/01/26 13:38:55  durand
 85 * update the GUI for the editor. Add functions to create the data to be used by the editor
 86 *
 87 * Revision 1.15  1999/12/20 20:20:41  lewisg
 88 * allow cn3d to do color and ddv to do case when both are running
 89 *
 90 * Revision 1.14  1999/12/20 14:45:37  durand
 91 * add new functions for the new BLAST outputs
 92 *
 93 * Revision 1.13  1999/12/08 22:42:17  durand
 94 * add the code to produce colored BLAST outputs
 95 *
 96 * Revision 1.12  1999/12/03 23:17:22  lewisg
 97 * Patrick's new global update msg, argument passing when launching ddv, experimental editing
 98 *
 99 * Revision 1.11  1999/12/03 15:11:49  durand
100 * add DDV_AllGapInLowerCase declaration
101 *
102 * Revision 1.10  1999/11/24 21:26:30  vakatov
103 * Fixed for the C++ and/or MSVC DLL compilation
104 *
105 * Revision 1.9  1999/11/17 22:43:57  durand
106 * speed up the selection manager for large SeqAlign
107 *
108 * Revision 1.8  1999/11/09 17:08:59  durand
109 * transfer some functions from ddvgraph to ddvcreate, so that ddvcreate remains Vibrant free and can be compiled with BLAST
110 *
111 * Revision 1.7  1999/11/03 21:29:48  durand
112 * add CTRL and SHFT keys for mouse selection. redesign the loader functions of DDV to properly register the message callbacks
113 *
114 * Revision 1.6  1999/10/29 14:15:40  durand
115 * add simple mouse selection functions
116 *
117 * Revision 1.5  1999/10/22 20:12:47  durand
118 * add Export command (text, HTML and Phylip formats)
119 *
120 * Revision 1.4  1999/10/20 13:17:19  durand
121 * add display for disc. SeqAlign tails
122 *
123 * Revision 1.3  1999/10/15 21:57:36  durand
124 * add a UI for display options
125 *
126 * Revision 1.2  1999/10/12 15:01:29  lewisg
127 * resolve confict with internal/ddv
128 *
129 * Revision 1.1  1999/09/30 14:10:26  durand
130 * add ddv to toolkit
131 *
132 * Revision 1.5  1999/09/30 13:38:09  durand
133 * DDV_CreateDisplayFromIndex takes ParaG_Size as an argument
134 *
135 *
136 *
137 * ==========================================================================
138 */
139 #ifndef _DDVCREATE_
140 #define _DDVCREATE_
141 
142 #include <ncbi.h>
143 #include <alignmgr.h>
144 #include <udvseq.h>
145 #include <pgppop.h>
146 #include <udvdef.h>
147 #include <ddvcreate.h>
148 
149 #undef NLM_EXTERN
150 #ifdef NLM_IMPORT
151 #define NLM_EXTERN NLM_IMPORT
152 #else
153 #define NLM_EXTERN extern
154 #endif
155 
156 
157 #ifdef __cplusplus
158 extern "C" {
159 #endif
160 
161 
162 /*******************************************************************************
163 
164   structure
165 
166 *******************************************************************************/
167 typedef struct uabitdescr{
168         Int4    from;
169         Int4    to;
170         Boolean IsGap;
171 } UABitDescr, PNTR UABitDescrPtr;
172 
173 typedef struct uamsg{ /*UnAligned Messaging structure*/
174         Int4    from_a; /*asked coord.*/
175         Int4    to_a;
176         Int4    from_r; /*returned coord.*/
177         Int4    to_r;
178         Int4    currentPos;
179         Uint1   DispType;
180         Uint1   strand;
181         Boolean IsGap;
182         UABitDescr ubd[3];
183 } UAMsg, PNTR UAMsgPtr;
184 
185 typedef struct descridisp {
186         Int4            from;
187         Int4            to;
188         Int4            UAnum;
189         Int4            UAMaxlength;
190         Boolean         IsGap;
191         Uint1           TextStyle;
192         Uint1           strand;
193 } DescriDisp, PNTR DescriDispPtr;
194 
195 /*******************************************************************************
196 
197   defines
198 
199 *******************************************************************************/
200 #define RulerStyle_One_Start      ((Uint1)1)
201 #define RulerStyle_Continue_Start ((Uint1)2)
202 
203 /*size limit of a seqalign for edition (number of columns)*/
204 #define LIMIT_EDITOR_SIZE 10000
205 
206 #define DDV_BLAST_COLOR0 0
207 #define DDV_BLAST_COLOR1 1
208 #define DDV_BLAST_COLOR2 2
209 #define DDV_BLAST_COLOR3 3
210 #define DDV_BLAST_COLOR4 4
211 #define DDV_BLAST_COLOR5 5
212 #define DDV_BLAST_COLOR6 6
213 
214 /*******************************************************************************
215 
216   functions
217 
218 *******************************************************************************/
219 NLM_EXTERN Boolean DDV_CreateDisplayFromIndex(SeqAlignPtr sap, MsaParaGPopListPtr mpplp, 
220                 Int2 LineSize, DDV_Disp_OptPtr ddop);
221 NLM_EXTERN Boolean DDV_CreateDisplayFromIndex2(SeqAlignPtr sap, MsaParaGPopListPtr mpplp, 
222                 Int2 LineSize, DDV_Disp_OptPtr ddop, Boolean WantExtraGapChar);
223 
224 NLM_EXTERN Boolean DDV_CreateDisplayFromIndex_EX(SeqAlignPtr sap, MsaParaGPopListPtr mpplp, 
225                 Int2 LineSize, DDV_Disp_OptPtr ddop,Int4 start, Int4 stop);
226 NLM_EXTERN Boolean DDV_CreateDisplayFromIndex_EX2(SeqAlignPtr sap, MsaParaGPopListPtr mpplp, 
227                 Int2 LineSize, DDV_Disp_OptPtr ddop,Int4 start, Int4 stop, Boolean WantExtraGapChar);
228 
229 NLM_EXTERN Boolean DDV_CreateDisplay_DiscAlign(SeqAlignPtr sap, 
230                 MsaParaGPopListPtr mpplp, Int2 LineSize,DDV_Disp_OptPtr ddop);
231 NLM_EXTERN Boolean DDV_CreateDisplay_DiscAlign2(SeqAlignPtr sap, 
232                 MsaParaGPopListPtr mpplp, Int2 LineSize,DDV_Disp_OptPtr ddop, Boolean WantExtraGapChar);
233 
234 NLM_EXTERN Boolean DDV_BuildDisp_BlockEditor(SeqAlignPtr sap, 
235                 MsaParaGPopListPtr mpplp, Int4 block_num);
236 NLM_EXTERN UAMsgPtr UAMgrIntUAMsg( Int4 MaxLength, Int4 BspLength,
237                 Int4 BspStart,Int4 BspStop, Int4 ddpFrom, Int4 ddpTo,Uint1 DispType, Uint1 strand);
238 NLM_EXTERN UAMsgPtr UAMgrDelUAMsg(UAMsgPtr PNTR uamp);
239 NLM_EXTERN void UAMgrUAMsgGetInfo(UAMsgPtr uamp,Int4Ptr from_bsp, Int4Ptr to_bsp, 
240                 BoolPtr IsGap);
241 NLM_EXTERN Boolean UAMgrGetNextUAbit(UAMsgPtr uamp,Int4 BspStart,Int4 BspStop);
242 
243 NLM_EXTERN ValNodePtr UABuildDescriptor(SeqAlignPtr sap, Int4 nBsp, Int2 LineSize,
244         DDV_Disp_OptPtr ddop, Int4Ptr TotLength,Boolean AddLeftUAPart,
245         Boolean AddRightUAPart);
246 NLM_EXTERN ValNodePtr UABuildDescriptor2(SeqAlignPtr sap, Int4 nBsp, Int2 LineSize,
247         DDV_Disp_OptPtr ddop, Int4Ptr TotLength,Boolean AddLeftUAPart,
248         Boolean AddRightUAPart, Boolean WantExtraGapChar);
249 
250 NLM_EXTERN ValNodePtr UABuildDescriptorForBlockEditor(SeqAlignPtr sap, Int4 nBsp, 
251         Int4 block_num,Int4 LineSize,Int4Ptr TotLength);
252 NLM_EXTERN ValNodePtr DDV_BuildTailDescriptor(SeqAlignPtr sap, Int4 nBsp, Int2 LineSize,
253         Uint1 which_tail,Int4Ptr TotLength,Int4Ptr cumulpop);
254 NLM_EXTERN void DDV_InitDefSAPdispStyles(DDV_Disp_OptPtr ddop);
255 NLM_EXTERN void DDV_InitCn3DSAPdispStyles(DDV_Disp_OptPtr ddop);
256 NLM_EXTERN void DDV_InitDDESAPdispStyles(DDV_Disp_OptPtr ddop);
257 NLM_EXTERN Uint4Ptr DDV_BuildBspEntitiesTbl(ValNodePtr PNTR TableHead,Int4 nBsp);
258 NLM_EXTERN Uint1Ptr DDV_ReadSeqBin (SeqIdPtr sip, Int4 from, Int4 to, 
259                                     Boolean IsProt,Int2 len,Uint1 strand);
260 
261 /*export functions*/
262 NLM_EXTERN void DDV_DumpSAPInAFile(MsaParaGPopListPtr mpplp,DDVOptionsBlockPtr dobp, 
263                 FILE *hFile,Uint4 option, DDV_ColorGlobal *gclr);
264 NLM_EXTERN void DDV_DumpSAPInFastaFile(MsaParaGPopListPtr mpplp,DDVOptionsBlockPtr dobp, 
265                 FILE *hFile,Boolean bPrintGap);
266 
267 /*BLAST stuffs; function to build new outputs*/
268 NLM_EXTERN Boolean DDV_DisplayBlastPairList(SeqAlignPtr sap, ValNodePtr mask,
269         FILE *fp, Boolean is_na, Uint4 tx_option,Uint1 ColorScheme);
270 
271 /*layout manager stuff*/
272 NLM_EXTERN Boolean DDV_InitColour_When_Start(SeqAlignPtr sap,MsaParaGPopListPtr mpplp,
273         DDV_ColorGlobal * * gclr, Boolean NoColor);
274 NLM_EXTERN Boolean DDV_LayoutUAregion(SeqAlignPtr sap,MsaParaGPopListPtr mpplp,
275         DDV_ColorGlobal * * gclr,Uint1 * pRGB,Uint1 style,Uint1 * pUARGB,
276         Uint1 UAstyle);
277 NLM_EXTERN void DDV_LayoutGap(DDV_ColorGlobal *pcg,ValNodePtr vnp_seq1,
278                 ValNodePtr vnp_seq2,Int4 row2,Uint1 style,Uint1 *rgb);
279 NLM_EXTERN void DDV_LayoutMaskRegions(DDV_ColorGlobal *pcg,
280         ValNodePtr vnp_query,ValNodePtr mask,Int4 row,Uint1 style,Uint1 *rgb);
281 NLM_EXTERN void DDV_LayoutISOColors(DDV_ColorGlobal *pcg,ValNodePtr * row_list,Int4 nRow,
282         Int4 Master,Boolean bSetMaster,Int4Ptr * matrix,Uint1 IdentClr,Uint1 SimilClr,
283         Uint1 OtherClr,Uint1 IdentSty,Uint1 SimilSty,Uint1 OtherSty);
284 
285 /* create display for a single aligned block or an unaligned region */
286 NLM_EXTERN MsaParaGPopListPtr DDE_CreateDisplayForBlock(SeqAlignPtr sap, Int4 BlockIndex);
287 NLM_EXTERN MsaParaGPopListPtr DDE_CreateDisplayForUnAligned(SeqAlignPtr sap, Int4 UAIndex);
288 NLM_EXTERN MsaParaGPopListPtr DDE_CreateDisplay(SeqAlignPtr sap, Int4 BlockIndex,
289                                                 Boolean IsUnAligned, Int4* pNumBlocks);
290 
291 #ifdef __cplusplus
292 }
293 #endif
294 
295 #undef NLM_EXTERN
296 #ifdef NLM_EXPORT
297 #define NLM_EXTERN NLM_EXPORT
298 #else
299 #define NLM_EXTERN
300 #endif
301 
302 #endif /* ndef _DDVCREATE_ */
303 
304 

source navigation ]   [ diff markup ]   [ identifier search ]   [ freetext search ]   [ file search ]  

This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.