NCBI C Toolkit Cross Reference

C/cn3d/seqcons.h


  1 /*   $Id: seqcons.h,v 6.15 2000/04/27 13:36:19 thiessen 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:  $Id: seqcons.h,v 6.15 2000/04/27 13:36:19 thiessen Exp $
 27 *
 28 * Authors:  Paul Thiessen
 29 *
 30 * Version Creation Date: 2/10/2000
 31 *
 32 * File Description: to calculate colors for columns to visualize
 33 *                   sequence conservation
 34 *
 35 * Modifications:
 36 * --------------------------------------------------------------------------
 37 * $Log: seqcons.h,v $
 38 * Revision 6.15  2000/04/27 13:36:19  thiessen
 39 * change algorithm GUI names
 40 *
 41 * Revision 6.14  2000/04/06 19:03:20  thiessen
 42 * new BLOSUM62 conservation coloring
 43 *
 44 * Revision 6.13  2000/03/16 20:31:45  thiessen
 45 * fixes to color; new color-by-variety algorithm
 46 *
 47 * Revision 6.12  2000/03/14 18:03:14  thiessen
 48 * add target row to MMD; remove rowmgr
 49 *
 50 * Revision 6.11  2000/03/03 20:05:17  thiessen
 51 * removal of palette-building pass if in 24-bit color
 52 *
 53 * Revision 6.10  2000/03/03 14:13:42  thiessen
 54 * moved back into ncbicn3d
 55 *
 56 * Revision 1.1  2000/03/02 21:20:41  thiessen
 57 * many improvements, moved into object library
 58 *
 59 * Revision 6.8  2000/02/25 02:53:15  thiessen
 60 * check AlignMgr rather than bAligned flag to see if a residue is aligned
 61 *
 62 * Revision 6.7  2000/02/19 21:25:58  thiessen
 63 * split of cn3dmodl into cn3dmodl and cn3dstyl
 64 *
 65 * Revision 6.6  2000/02/17 15:41:11  thiessen
 66 * added CSC algorithm selection submenu
 67 *
 68 * Revision 6.5  2000/02/16 21:25:32  thiessen
 69 * new row manager module; made Cn3D use row-wise color storage for aligned strucs
 70 *
 71 * Revision 6.4  2000/02/16 14:02:01  thiessen
 72 * further progress on seqcons module
 73 *
 74 * Revision 6.3  2000/02/14 20:04:24  thiessen
 75 * another fix for solvent; more filling in of seqcons
 76 *
 77 * Revision 6.2  2000/02/14 12:32:31  thiessen
 78 * fix solvent identification; progress on seqcons module
 79 *
 80 * Revision 6.1  2000/02/11 01:12:35  thiessen
 81 * new module for sequence conservation coloring
 82 *
 83 *
 84 *
 85 * ==========================================================================
 86 */
 87 
 88 #ifndef _SEQCONS_
 89 #define _SEQCONS_ 1
 90 
 91 
 92 #include <objalign.h>
 93 #include <mmdbapi.h>
 94 #include <ddvcolor.h>
 95 
 96 
 97 #ifdef __cplusplus
 98 extern "C" {
 99 #endif
100 
101 
102 /**** identities and number of available algorithms ****/
103 enum {
104     CSC_BYVARIETY=0, /* first one must be 0 */
105     CSC_BYBLOSUM62,
106     CSC_SHOWIDENTITY,
107     CSC_SHOWALIGNED,
108     CSC_NUMALGORITHMS
109 };
110 
111 /**** public module functions ****/
112 
113 /*
114  * Returns the string name for the specified algorithm type; NULL if invalid type.
115  */
116 extern const Nlm_Char * CSC_GetAlgorithmName(Nlm_Int2);
117 
118 /*
119  * Calculates (with the given algorithm) colors for all aligned colums.
120  * Returns TRUE on success, FALSE on error. Should be called before any colors
121  * are read or a different coloring algorithm is desired.
122  */
123 extern Nlm_Boolean CSC_CalculateColumnColors(SeqAlignPtr, Nlm_Int2 useAlgorithm);
124 
125 /*
126  * Returns a color given a row and a bioseq coordinate. Returns CSC_COLOR_ERROR
127  * upon error; if successful, the returned color is a packed 3-byte RGB color
128  * where
129  *   red =   (color & 0x00FF0000) >> 16
130  *   green = (color & 0x0000FF00) >> 8
131  *   blue =  (color & 0x000000FF)
132  *
133  * Expects the "seqLoc" numbering to start at 0.
134  */
135 #define CSC_COLOR_ERROR (0xFF222222)
136 extern Nlm_Int4 CSC_GetColumnColorByRow(Nlm_Int4 row, Nlm_Int4 seqLoc);
137 
138 /*
139  * Goes over a given row, applying appropriate capitalization and,
140  * depending on whether the boolean passed is TRUE, color to a residue.
141  * The "unalignedColor" gets applied to unaligned residues.
142  */
143 extern void CSC_SetDDVRowCells(Nlm_Int4 row, 
144                                Nlm_Boolean applyColumnColor,
145                                Nlm_Uint1 *unalignedColor,
146                                DDV_ColorGlobal *pDDVCG);
147 
148 /*
149  * Given a PMSD, scans through it and current SeqAlign to find rows that
150  * don't have associated structure, and applying CSC_SetDDVRowCells.
151  */
152 extern void CSC_SetNonStructureDDVRowCells(PMSD pmsd, 
153                                            Nlm_Boolean applyColumnColor,
154                                            Nlm_Uint1 *unalignedColor,
155                                            DDV_ColorGlobal *pDDVCG);
156  
157 /*
158  * Same as above, just does all rows.
159  */
160 extern void CSC_SetAllDDVRowCells(Nlm_Boolean applyColumnColor,
161                                   Nlm_Uint1 *unalignedColor,
162                                   DDV_ColorGlobal *pDDVCG);
163 
164 
165 #ifdef __cplusplus
166 }
167 #endif
168 
169 #endif /* _SEQCONS_ */
170 

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.