1 /*  alignval.hA
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:  alignval.h
27 *
28 * Author:  Jian Ye, Colombe Chappey
29 *
30 * Version Creation Date:   6/3/99
31 *
32 * $Revision: 6.20 $
33 *
34 * File Description:
35 *
36 * Modifications:
37 * --------------------------------------------------------------------------
38 * $Log: alignval.h,v $
39 * Revision 6.20  2013/01/25 20:14:55  bollin
40 * JIRA:SQD-976 removed Special->Display->Weighted Alignment Percent Identity
41 *
42 *
43 * Committed on the Free edition of March Hare Software CVSNT Client.
44 * Upgrade to CVS Suite for more features and support:
45 * http://march-hare.com/cvsnt/
46 *
47 * Revision 6.19  2009/06/18 17:18:08  bollin
48 * Changed FASTA-like validator error to use minimum length of two sequences
49 * when comparing, allow N to match anything.
50 * Report unexpected alignment types.
51 * Corrected problem with missing ShortAln error.
52 * Corrected some errors in reporting positions of alignment problems.
53 *
54 * Revision 6.18  2007/07/05 17:50:49  bollin
55 * Added validation INFO when alignment stops before ends of sequences.
56 * Added red vertical bar to columns in alignment assistant when weighted
57 * percent identity for column is less than 50%.
58 *
59 * Revision 6.17  2007/02/28 21:07:13  bollin
60 * Added function for weighted percent identity for alignments
61 *
62 * Revision 6.16  2006/10/23 15:11:42  bollin
63 * Moved AlignmentPercentIdentity and supporting functions here from
64 * tools/salptool.c to avoid library dependency problems.
65 *
66 * Revision 6.15  2006/10/20 13:30:22  bollin
67 * Added Validator error for alignment percent identity.
68 *
69 * Revision 6.14  2003/11/14 18:06:42  kans
70 * added do_hist_assembly parameter
71 *
72 * Revision 6.13  1999/11/23 21:47:31  vakatov
73 * Fixed for C++ and/or DLL compilation
74 *
75 * ==========================================================================
76 */
77 
78 #ifndef ALIGNVAL_H
79 #define ALIGNVAL_H
80 
81 #include <ncbi.h>
82 #include <objall.h>
83 #include <objseq.h>
84 #include <objmgr.h>
85 #include <objfdef.h>
86 
87 
88 #undef NLM_EXTERN
89 #ifdef NLM_IMPORT
90 #define NLM_EXTERN NLM_IMPORT
91 #else
92 #define NLM_EXTERN extern
93 #endif
94 
95 
96 #ifdef __cplusplus
97 extern "C" {
98 #endif
99 
100 
101 /*call back function for REGISTER_ALIGNVALIDATION defined in sequin4.c.
102 Starting point for seqalignment validation if user clicked on SeqalignValidation
103 under menu Filer/Alignment.  Either individual alignment or alignment block
104 should be highlighted for this validation to work*/
105 
106 NLM_EXTERN Int2 LIBCALLBACK ValidateSeqAlignFromData (Pointer data);
107 
108 /*validate each alignment sequentially.  This function will subject the seqalign to all validation functions*/
109 NLM_EXTERN Boolean ValidateSeqAlign (SeqAlignPtr salp, Uint2 entityID, Boolean message,
110                          Boolean msg_success, Boolean find_remote_bsp,
111                          Boolean delete_bsp, Boolean delete_salp, BoolPtr dirty);
112 
113 NLM_EXTERN Boolean ValidateSeqAlignInSeqEntry (SeqEntryPtr sep, Boolean message,
114                                  Boolean msg_success, Boolean find_remote_bsp,
115                                  Boolean delete_bsp, Boolean delete_salp,
116                                  Boolean do_hist_assembly);
117 
118 extern Uint2 AlignmentPercentIdentity (SeqAlignPtr salp, Boolean internal_gaps);
119 
120 extern double *
121 GetAlignmentColumnPercentIdentities
122 (SeqAlignPtr salp,
123  Int4    start,
124  Int4    stop,
125  Boolean internal_gaps,
126  Boolean internal_validation);
127 
128 
129 #define Err_SeqId 1
130 #define Err_Strand_Rev 2
131 #define Err_Denseg_Len_Start 3
132 #define Err_Start_Less_Than_Zero 4
133 #define Err_Start_More_Than_Biolen 5
134 #define Err_End_Less_Than_Zero 6
135 #define Err_End_More_Than_Biolen 7
136 #define Err_Len_Less_Than_Zero 8
137 #define Err_Len_More_Than_Biolen 9
138 #define Err_Sum_Len_Start 10
139 #define Err_SeqAlign_DimSeqId_Not_Match 11
140 #define Err_Segs_DimSeqId_Not_Match 12
141 #define Err_Fastalike 13
142 #define Err_Null_Segs 14
143 #define Err_Segment_Gap 15
144 #define Err_Segs_Dim_One 16
145 #define Err_SeqAlign_Dim_One 17
146 #define Err_Segtype 18
147 #define Err_Pcnt_ID 20
148 #define Err_Short_Aln 21
149 #define Err_Unexpected_Alignment_Type 22
150 
151 #ifdef __cplusplus
152 }
153 #endif
154 
155 
156 #undef NLM_EXTERN
157 #ifdef NLM_EXPORT
158 #define NLM_EXTERN NLM_EXPORT
159 #else
160 #define NLM_EXTERN
161 #endif
162 
163 #endif
164 
165 
166