1 /* @include enssequenceedit ***************************************************
2 **
3 ** Ensembl Sequence Edit functions
4 **
5 ** @author Copyright (C) 1999 Ensembl Developers
6 ** @author Copyright (C) 2006 Michael K. Schuster
7 ** @version $Revision: 1.12 $
8 ** @modified 2009 by Alan Bleasby for incorporation into EMBOSS core
9 ** @modified $Date: 2012/02/04 10:30:24 $ by $Author: mks $
10 ** @@
11 **
12 ** This library is free software; you can redistribute it and/or
13 ** modify it under the terms of the GNU Lesser General Public
14 ** License as published by the Free Software Foundation; either
15 ** version 2.1 of the License, or (at your option) any later version.
16 **
17 ** This library is distributed in the hope that it will be useful,
18 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
19 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
20 ** Lesser General Public License for more details.
21 **
22 ** You should have received a copy of the GNU Lesser General Public
23 ** License along with this library; if not, write to the Free Software
24 ** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
25 ** MA  02110-1301,  USA.
26 **
27 ******************************************************************************/
28 
29 #ifndef ENSSEQUENCEEDIT_H
30 #define ENSSEQUENCEEDIT_H
31 
32 /* ========================================================================= */
33 /* ============================= include files ============================= */
34 /* ========================================================================= */
35 
36 #include "ensattribute.h"
37 
38 AJ_BEGIN_DECLS
39 
40 
41 
42 
43 /* ========================================================================= */
44 /* =============================== constants =============================== */
45 /* ========================================================================= */
46 
47 
48 
49 
50 /* ========================================================================= */
51 /* ============================== public data ============================== */
52 /* ========================================================================= */
53 
54 /* @data EnsPSequenceedit *****************************************************
55 **
56 ** Ensembl Sequence Edit.
57 **
58 ** @alias EnsSSequenceedit
59 ** @alias EnsOSequenceedit
60 **
61 ** @cc Bio::EnsEMBL::Attribute
62 ** @attr Attribute [EnsPAttribute] Ensembl Attribute
63 ** @attr Sequence [AjPStr] Alternative sequence
64 ** @attr Start [ajuint] Start coordinate
65 ** @attr End [ajuint] End coordinate
66 ** @attr Use [ajuint] Use counter
67 ** @attr Padding [ajuint] Padding to alignment boundary
68 ** @@
69 ******************************************************************************/
70 
71 typedef struct EnsSSequenceedit
72 {
73     EnsPAttribute Attribute;
74     AjPStr Sequence;
75     ajuint Start;
76     ajuint End;
77     ajuint Use;
78     ajuint Padding;
79 } EnsOSequenceedit;
80 
81 #define EnsPSequenceedit EnsOSequenceedit*
82 
83 
84 
85 
86 /* ========================================================================= */
87 /* =========================== public functions ============================ */
88 /* ========================================================================= */
89 
90 /*
91 ** Prototype definitions
92 */
93 
94 /* Ensembl Sequence Edit */
95 
96 EnsPSequenceedit ensSequenceeditNewAttribute(EnsPAttribute attribute);
97 
98 EnsPSequenceedit ensSequenceeditNewCpy(const EnsPSequenceedit se);
99 
100 EnsPSequenceedit ensSequenceeditNewIni(EnsPAttributetype at,
101                                        AjPStr sequence,
102                                        ajuint start,
103                                        ajuint end);
104 
105 EnsPSequenceedit ensSequenceeditNewRef(EnsPSequenceedit se);
106 
107 void ensSequenceeditDel(EnsPSequenceedit *Pse);
108 
109 EnsPAttribute ensSequenceeditGetAttribute(const EnsPSequenceedit se);
110 
111 ajuint ensSequenceeditGetEnd(const EnsPSequenceedit se);
112 
113 AjPStr ensSequenceeditGetSequence(const EnsPSequenceedit se);
114 
115 ajuint ensSequenceeditGetStart(const EnsPSequenceedit se);
116 
117 AjBool ensSequenceeditTrace(const EnsPSequenceedit se, ajuint level);
118 
119 ajint ensSequenceeditCalculateDifference(const EnsPSequenceedit se);
120 
121 size_t ensSequenceeditCalculateMemsize(const EnsPSequenceedit se);
122 
123 AjBool ensSequenceeditApplyString(const EnsPSequenceedit se,
124                                   ajint offset,
125                                   AjPStr *Psequence);
126 
127 AjBool ensListSequenceeditSortStartAscending(AjPList ses);
128 
129 AjBool ensListSequenceeditSortStartDescending(AjPList ses);
130 
131 /*
132 ** End of prototype definitions
133 */
134 
135 
136 
137 
138 AJ_END_DECLS
139 
140 #endif /* !ENSSEQUENCEEDIT_H */
141