File: ensditag.h

package info (click to toggle)
emboss 6.6.0%2Bdfsg-15
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 571,580 kB
  • sloc: ansic: 460,579; java: 29,383; perl: 13,573; sh: 12,753; makefile: 3,295; csh: 706; asm: 351; xml: 239; pascal: 237; modula3: 8
file content (408 lines) | stat: -rw-r--r-- 12,369 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
/* @include ensditag **********************************************************
**
** Ensembl Ditag functions
**
** @author Copyright (C) 1999 Ensembl Developers
** @author Copyright (C) 2006 Michael K. Schuster
** @version $Revision: 1.24 $
** @modified 2009 by Alan Bleasby for incorporation into EMBOSS core
** @modified $Date: 2012/08/05 10:43:54 $ by $Author: mks $
** @@
**
** This library is free software; you can redistribute it and/or
** modify it under the terms of the GNU Lesser General Public
** License as published by the Free Software Foundation; either
** version 2.1 of the License, or (at your option) any later version.
**
** This library is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
** Lesser General Public License for more details.
**
** You should have received a copy of the GNU Lesser General Public
** License along with this library; if not, write to the Free Software
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
** MA  02110-1301,  USA.
**
******************************************************************************/

#ifndef ENSDITAG_H
#define ENSDITAG_H

/* ========================================================================= */
/* ============================= include files ============================= */
/* ========================================================================= */

#include "ensfeature.h"

AJ_BEGIN_DECLS




/* ========================================================================= */
/* =============================== constants =============================== */
/* ========================================================================= */

/* @const EnsPDitagadaptor ****************************************************
**
** Ensembl Ditag Adaptor.
** Defined as an alias in EnsPBaseadaptor.
**
** #alias EnsPBaseadaptor
**
** #cc Bio::EnsEMBL::Map::DBSQL::DitagAdaptor
** ##
******************************************************************************/

#define EnsPDitagadaptor EnsPBaseadaptor




/* @const EnsPDitagfeatureadaptor *********************************************
**
** Ensembl Ditag Feature Adaptor.
** Defined as an alias in EnsPFeatureadaptor.
**
** #alias EnsPFeatureadaptor
**
** #cc Bio::EnsEMBL::Map::DBSQL::Ditagfeatureadaptor
** ##
******************************************************************************/

#define EnsPDitagfeatureadaptor EnsPFeatureadaptor




/* @enum EnsEDitagfeatureSide *************************************************
**
** Ensembl Ditag Feature Side enumeration
**
** @value ensEDitagfeatureSideNULL Null
** @value ensEDitagfeatureSideLeft Left side
** @value ensEDitagfeatureSideRight Right side
** @value ensEDitagfeatureSideFull Full
** @@
******************************************************************************/

typedef enum EnsODitagfeatureSide
{
    ensEDitagfeatureSideNULL,
    ensEDitagfeatureSideLeft,
    ensEDitagfeatureSideRight,
    ensEDitagfeatureSideFull
} EnsEDitagfeatureSide;




/* ========================================================================= */
/* ============================== public data ============================== */
/* ========================================================================= */

/* @data EnsPDitag ************************************************************
**
** Ensembl Ditag
**
** @alias EnsSDitag
** @alias EnsODitag
**
** @attr Use [ajuint] Use counter
** @cc Bio::EnsEMBL::Storable
** @attr Identifier [ajuint] Internal SQL database identifier (primary key)
** @attr Adaptor [EnsPDitagadaptor] Ensembl Ditag Adaptor
** @cc Bio::EnsEMBL::Map::Ditag
** @attr Name [AjPStr] Name
** @attr Type [AjPStr] Source
** @attr Sequence [AjPStr] Sequence
** @attr Count [ajuint] Count
** @attr Padding [ajuint] Padding to alignment boundary
** @@
******************************************************************************/

typedef struct EnsSDitag
{
    ajuint Use;
    ajuint Identifier;
    EnsPDitagadaptor Adaptor;
    AjPStr Name;
    AjPStr Type;
    AjPStr Sequence;
    ajuint Count;
    ajuint Padding;
} EnsODitag;

#define EnsPDitag EnsODitag*




/* @data EnsPDitagfeature *****************************************************
**
** Ensembl Ditag Feature
**
** @alias EnsSDitagfeature
** @alias EnsODitagfeature
**
** @attr Use [ajuint] Use counter
** @cc Bio::EnsEMBL::Storable
** @attr Identifier [ajuint] Internal SQL database identifier (primary key)
** @attr Adaptor [EnsPDitagfeatureadaptor] Ensembl Ditag Feature Adaptor
** @cc Bio::EnsEMBL::Feature
** @attr Feature [EnsPFeature] Ensembl Feature
** @cc Bio::EnsEMBL::Map::DitagFeature
** @attr Ditag [EnsPDitag] Ditag
** @attr Cigar [AjPStr] CIGAR line
** @attr Side [EnsEDitagfeatureSide] Side
** @attr TargetStart [ajint] Target start
** @attr TargetEnd [ajint] Target end
** @attr TargetStrand [ajint] Target strand
** @attr Pairidentifier [ajuint] Pair identifier
** @attr Padding [ajuint] Padding to alignment boundary
** @@
******************************************************************************/

typedef struct EnsSDitagfeature
{
    ajuint Use;
    ajuint Identifier;
    EnsPDitagfeatureadaptor Adaptor;
    EnsPFeature Feature;
    EnsPDitag Ditag;
    AjPStr Cigar;
    EnsEDitagfeatureSide Side;
    ajint TargetStart;
    ajint TargetEnd;
    ajint TargetStrand;
    ajuint Pairidentifier;
    ajuint Padding;
} EnsODitagfeature;

#define EnsPDitagfeature EnsODitagfeature*




/* ========================================================================= */
/* =========================== public functions ============================ */
/* ========================================================================= */

/*
** Prototype definitions
*/

/* Ensembl Ditag */

EnsPDitag ensDitagNewCpy(const EnsPDitag dt);

EnsPDitag ensDitagNewIni(EnsPDitagadaptor dta,
                         ajuint identifier,
                         AjPStr name,
                         AjPStr type,
                         AjPStr sequence,
                         ajuint count);

EnsPDitag ensDitagNewRef(EnsPDitag dt);

void ensDitagDel(EnsPDitag *Pdt);

EnsPDitagadaptor ensDitagGetAdaptor(const EnsPDitag dt);

ajuint ensDitagGetCount(const EnsPDitag dt);

ajuint ensDitagGetIdentifier(const EnsPDitag dt);

AjPStr ensDitagGetName(const EnsPDitag dt);

AjPStr ensDitagGetSequence(const EnsPDitag dt);

AjPStr ensDitagGetType(const EnsPDitag dt);

AjBool ensDitagSetAdaptor(EnsPDitag dt, EnsPDitagadaptor dta);

AjBool ensDitagSetCount(EnsPDitag dt, ajuint count);

AjBool ensDitagSetIdentifier(EnsPDitag dt, ajuint identifier);

AjBool ensDitagSetName(EnsPDitag dt, AjPStr name);

AjBool ensDitagSetSequence(EnsPDitag dt, AjPStr sequence);

AjBool ensDitagSetType(EnsPDitag dt, AjPStr type);

AjBool ensDitagTrace(const EnsPDitag dt, ajuint level);

size_t ensDitagCalculateMemsize(const EnsPDitag dt);

/* Ensembl Ditag Adaptor */

EnsPDitagadaptor ensRegistryGetDitagadaptor(
    EnsPDatabaseadaptor dba);

EnsPDitagadaptor ensDitagadaptorNew(EnsPDatabaseadaptor dba);

void ensDitagadaptorDel(EnsPDitagadaptor *Pdta);

EnsPBaseadaptor ensDitagadaptorGetBaseadaptor(
    EnsPDitagadaptor dta);

EnsPDatabaseadaptor ensDitagadaptorGetDatabaseadaptor(
    EnsPDitagadaptor dta);

AjBool ensDitagadaptorFetchAll(EnsPDitagadaptor dta,
                               const AjPStr name,
                               const AjPStr type,
                               AjPList dts);

AjBool ensDitagadaptorFetchAllbyIdentifiers(EnsPDitagadaptor dta,
                                            AjPTable dts);

AjBool ensDitagadaptorFetchAllbyName(EnsPDitagadaptor dta,
                                     const AjPStr name,
                                     AjPList dts);

AjBool ensDitagadaptorFetchAllbyType(EnsPDitagadaptor dta,
                                     const AjPStr type,
                                     AjPList dts);

AjBool ensDitagadaptorFetchByIdentifier(EnsPDitagadaptor dta,
                                        ajuint identifier,
                                        EnsPDitag *Pdt);

/* Ensembl Ditag Feature */

EnsPDitagfeature ensDitagfeatureNewCpy(const EnsPDitagfeature dtf);

EnsPDitagfeature ensDitagfeatureNewIni(EnsPDitagfeatureadaptor dtfa,
                                       ajuint identifier,
                                       EnsPFeature feature,
                                       EnsPDitag dt,
                                       AjPStr cigar,
                                       EnsEDitagfeatureSide side,
                                       ajint tstart,
                                       ajint tend,
                                       ajint tstrand,
                                       ajuint pairid);

EnsPDitagfeature ensDitagfeatureNewRef(EnsPDitagfeature dtf);

void ensDitagfeatureDel(EnsPDitagfeature *Pdtf);

EnsPDitagfeatureadaptor ensDitagfeatureGetAdaptor(const EnsPDitagfeature dtf);

AjPStr ensDitagfeatureGetCigar(const EnsPDitagfeature dtf);

EnsPDitag ensDitagfeatureGetDitag(const EnsPDitagfeature dtf);

EnsPFeature ensDitagfeatureGetFeature(const EnsPDitagfeature dtf);

ajuint ensDitagfeatureGetIdentifier(const EnsPDitagfeature dtf);

ajuint ensDitagfeatureGetPairidentifier(const EnsPDitagfeature dtf);

EnsEDitagfeatureSide ensDitagfeatureGetSide(const EnsPDitagfeature dtf);

ajint ensDitagfeatureGetTargetEnd(const EnsPDitagfeature dtf);

ajint ensDitagfeatureGetTargetStart(const EnsPDitagfeature dtf);

ajint ensDitagfeatureGetTargetStrand(const EnsPDitagfeature dtf);

AjBool ensDitagfeatureSetAdaptor(EnsPDitagfeature dtf,
                                 EnsPDitagfeatureadaptor dtfa);

AjBool ensDitagfeatureSetIdentifier(EnsPDitagfeature dtf, ajuint identifier);

AjBool ensDitagfeatureSetFeature(EnsPDitagfeature dtf, EnsPFeature feature);

AjBool ensDitagfeatureSetDitag(EnsPDitagfeature dtf, EnsPDitag dt);

AjBool ensDitagfeatureSetCigar(EnsPDitagfeature dtf, AjPStr cigar);

AjBool ensDitagfeatureSetSide(EnsPDitagfeature dtf, EnsEDitagfeatureSide side);

AjBool ensDitagfeatureSetTargetStart(EnsPDitagfeature dtf, ajint tstart);

AjBool ensDitagfeatureSetTargetEnd(EnsPDitagfeature dtf, ajint tend);

AjBool ensDitagfeatureSetTargetStrand(EnsPDitagfeature dtf, ajint tstrand);

AjBool ensDitagfeatureSetPairidentifier(EnsPDitagfeature dtf, ajuint pairid);

AjBool ensDitagfeatureTrace(const EnsPDitagfeature dtf, ajuint level);

size_t ensDitagfeatureCalculateMemsize(const EnsPDitagfeature dtf);

EnsEDitagfeatureSide ensDitagfeatureSideFromStr(const AjPStr side);

const char *ensDitagfeatureSideToChar(const EnsEDitagfeatureSide dtfs);

/* AJAX List of Ensembl Ditag Feature objects */

AjBool ensListDitagfeatureSortEndAscending(AjPList dtfs);

AjBool ensListDitagfeatureSortEndDescending(AjPList dtfs);

AjBool ensListDitagfeatureSortIdentifierAscending(AjPList dtfs);

AjBool ensListDitagfeatureSortStartAscending(AjPList dtfs);

AjBool ensListDitagfeatureSortStartDescending(AjPList dtfs);

/* Ensembl Ditag Feature Adaptor */

EnsPDitagfeatureadaptor ensRegistryGetDitagfeatureadaptor(
    EnsPDatabaseadaptor dba);

EnsPDitagfeatureadaptor ensDitagfeatureadaptorNew(
    EnsPDatabaseadaptor dba);

void ensDitagfeatureadaptorDel(EnsPDitagfeatureadaptor *Pdtfa);

EnsPBaseadaptor ensDitagfeatureadaptorGetBaseadaptor(
    EnsPDitagfeatureadaptor dtfa);

EnsPDatabaseadaptor ensDitagfeatureadaptorGetDatabaseadaptor(
    EnsPDitagfeatureadaptor dtfa);

EnsPFeatureadaptor ensDitagfeatureadaptorGetFeatureadaptor(
    EnsPDitagfeatureadaptor dtfa);

AjBool ensDitagfeatureadaptorFetchAllbyDitag(
    EnsPDitagfeatureadaptor dtfa,
    const EnsPDitag dt,
    AjPList dtfs);

AjBool ensDitagfeatureadaptorFetchAllbySlice(
    EnsPDitagfeatureadaptor dtfa,
    EnsPSlice slice,
    const AjPStr type,
    const AjPStr anname,
    AjPList dtfs);

AjBool ensDitagfeatureadaptorFetchAllbyType(
    EnsPDitagfeatureadaptor dtfa,
    const AjPStr type,
    AjPList dtfs);

AjBool ensDitagfeatureadaptorFetchByIdentifier(
    EnsPDitagfeatureadaptor dtfa,
    ajuint identifier,
    EnsPDitagfeature *Pdtf);

AjBool ensDitagfeatureadaptorRetrieveAllIdentifiers(
    EnsPDitagfeatureadaptor dtfa,
    AjPList identifiers);

/*
** End of prototype definitions
*/




AJ_END_DECLS

#endif /* !ENSDITAG_H */