1 /* @include ensprotein ********************************************************
2 **
3 ** Ensembl Protein Feature functions
4 **
5 ** @author Copyright (C) 1999 Ensembl Developers
6 ** @author Copyright (C) 2006 Michael K. Schuster
7 ** @version $Revision: 1.7 $
8 ** @modified 2009 by Alan Bleasby for incorporation into EMBOSS core
9 ** @modified $Date: 2012/08/05 11:22:27 $ 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 ENSPROTEIN_H
30 #define ENSPROTEIN_H
31 
32 /* ========================================================================= */
33 /* ============================= include files ============================= */
34 /* ========================================================================= */
35 
36 #include "ensfeature.h"
37 
38 AJ_BEGIN_DECLS
39 
40 
41 
42 
43 /* ========================================================================= */
44 /* =============================== constants =============================== */
45 /* ========================================================================= */
46 
47 /* @const EnsPProteinfeatureadaptor *******************************************
48 **
49 ** Ensembl Protein Feature Adaptor.
50 ** Defined as an alias in EnsPBaseadaptor.
51 **
52 ** #alias EnsPBaseadaptor
53 **
54 ** #cc Bio::EnsEMBL::DBSQL::ProteinFeatureAdaptor
55 ** ##
56 ******************************************************************************/
57 
58 #define EnsPProteinfeatureadaptor EnsPBaseadaptor
59 
60 
61 
62 
63 /* ========================================================================= */
64 /* ============================== public data ============================== */
65 /* ========================================================================= */
66 
67 /* @data EnsPProteinfeature ***************************************************
68 **
69 ** Ensembl Protein Feature.
70 **
71 ** @alias EnsSProteinfeature
72 ** @alias EnsOProteinfeature
73 **
74 ** @attr Use [ajuint] Use counter
75 ** @cc Bio::EnsEMBL::Storable
76 ** @attr Identifier [ajuint] SQL database-internal identifier
77 ** @attr Adaptor [EnsPProteinfeatureadaptor] Ensembl Protein Feature Adaptor
78 ** @cc Bio::EnsEMBL::Featurepair
79 ** @attr Featurepair [EnsPFeaturepair] Ensembl Feature Pair
80 ** @cc Bio::EnsEMBL::Proteinfeature
81 ** @attr Accession [AjPStr] (InterPro) Accession
82 ** @attr Description [AjPStr] (InterPro) Description
83 ** @@
84 ******************************************************************************/
85 
86 typedef struct EnsSProteinfeature
87 {
88     ajuint Use;
89     ajuint Identifier;
90     EnsPProteinfeatureadaptor Adaptor;
91     EnsPFeaturepair Featurepair;
92     AjPStr Accession;
93     AjPStr Description;
94 } EnsOProteinfeature;
95 
96 #define EnsPProteinfeature EnsOProteinfeature*
97 
98 
99 
100 
101 /* ========================================================================= */
102 /* =========================== public functions ============================ */
103 /* ========================================================================= */
104 
105 /*
106 ** Prototype definitions
107 */
108 
109 /* Ensembl Protein Feature */
110 
111 EnsPProteinfeature ensProteinfeatureNewCpy(const EnsPProteinfeature object);
112 
113 EnsPProteinfeature ensProteinfeatureNewIni(
114     EnsPProteinfeatureadaptor pfa,
115     ajuint identifier,
116     EnsPFeaturepair fp,
117     AjPStr accession,
118     AjPStr description);
119 
120 EnsPProteinfeature ensProteinfeatureNewRef(EnsPProteinfeature pf);
121 
122 void ensProteinfeatureDel(EnsPProteinfeature *Ppf);
123 
124 AjPStr ensProteinfeatureGetAccession(
125     const EnsPProteinfeature pf);
126 
127 EnsPProteinfeatureadaptor ensProteinfeatureGetAdaptor(
128     const EnsPProteinfeature pf);
129 
130 AjPStr ensProteinfeatureGetDescription(
131     const EnsPProteinfeature pf);
132 
133 EnsPFeaturepair ensProteinfeatureGetFeaturepair(
134     const EnsPProteinfeature pf);
135 
136 ajuint ensProteinfeatureGetIdentifier(
137     const EnsPProteinfeature pf);
138 
139 AjBool ensProteinfeatureSetAccession(EnsPProteinfeature pf,
140                                      AjPStr accession);
141 
142 AjBool ensProteinfeatureSetAdaptor(EnsPProteinfeature pf,
143                                    EnsPProteinfeatureadaptor pfa);
144 
145 AjBool ensProteinfeatureSetDescription(EnsPProteinfeature pf,
146                                        AjPStr description);
147 
148 AjBool ensProteinfeatureSetFeaturepair(EnsPProteinfeature pf,
149                                        EnsPFeaturepair fp);
150 
151 AjBool ensProteinfeatureSetIdentifier(EnsPProteinfeature pf,
152                                       ajuint identifier);
153 
154 AjBool ensProteinfeatureTrace(const EnsPProteinfeature pf, ajuint level);
155 
156 size_t ensProteinfeatureCalculateMemsize(const EnsPProteinfeature pf);
157 
158 /* Ensembl Protein Feature Adaptor */
159 
160 EnsPProteinfeatureadaptor ensRegistryGetProteinfeatureadaptor(
161     EnsPDatabaseadaptor dba);
162 
163 EnsPProteinfeatureadaptor ensProteinfeatureadaptorNew(
164     EnsPDatabaseadaptor dba);
165 
166 void ensProteinfeatureadaptorDel(EnsPProteinfeatureadaptor *Ppfa);
167 
168 EnsPBaseadaptor ensProteinfeatureadaptorGetBaseadaptor(
169     EnsPProteinfeatureadaptor pfa);
170 
171 EnsPDatabaseadaptor ensProteinfeatureadaptorGetDatabaseadaptor(
172     EnsPProteinfeatureadaptor pfa);
173 
174 AjBool ensProteinfeatureadaptorFetchAllbyTranslationidentifier(
175     EnsPProteinfeatureadaptor pfa,
176     ajuint tlid,
177     AjPList pfs);
178 
179 AjBool ensProteinfeatureadaptorFetchByIdentifier(
180     EnsPProteinfeatureadaptor pfa,
181     ajuint identifier,
182     EnsPProteinfeature *Ppf);
183 
184 /*
185 ** End of prototype definitions
186 */
187 
188 
189 
190 
191 AJ_END_DECLS
192 
193 #endif /* !ENSPROTEIN_H */
194