|
NCBI Home IEB Home C Toolkit docs C++ Toolkit source browser C Toolkit source browser (2) |
NCBI C Toolkit Cross ReferenceC/object/objfeat.h |
source navigation diff markup identifier search freetext search file search |
1 /* objfeat.h
2 * ===========================================================================
3 *
4 * PUBLIC DOMAIN NOTICE
5 * National Center for Biotechnology Information
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 have not placed any restriction on its use or reproduction.
13 *
14 * Although all reasonable efforts have been taken to ensure the accuracy
15 * and reliability of the software and data, the NLM and the U.S.
16 * Government do not and cannot warrant the performance or results that
17 * may be obtained by using this software or data. The NLM and the U.S.
18 * Government disclaim all warranties, express or implied, including
19 * warranties of performance, merchantability or fitness for any particular
20 * purpose.
21 *
22 * Please cite the author in any work or product based on this material.
23 *
24 * ===========================================================================
25 *
26 * File Name: objfeat.h
27 *
28 * Author: James Ostell
29 *
30 * Version Creation Date: 4/1/91
31 *
32 * $Revision: 6.20 $
33 *
34 * File Description: Object manager interface for module NCBI-SeqFeat
35 *
36 * Modifications:
37 * --------------------------------------------------------------------------
38 * Date Name Description of modification
39 * ------- ---------- -----------------------------------------------------
40 *
41 * ==========================================================================
42 */
43
44 #ifndef _NCBI_Seqfeat_
45 #define _NCBI_Seqfeat_
46
47 #ifndef _ASNTOOL_
48 #include <asn.h>
49 #endif
50 #ifndef _NCBI_General_
51 #include <objgen.h>
52 #endif
53 #ifndef _NCBI_Seqloc_
54 #include <objloc.h>
55 #endif
56 #ifndef _NCBI_Pub_
57 #include <objpub.h>
58 #endif
59 #ifndef _NCBI_Pubdesc_
60 #include <objpubd.h>
61 #endif
62
63 #undef NLM_EXTERN
64 #ifdef NLM_IMPORT
65 #define NLM_EXTERN NLM_IMPORT
66 #else
67 #define NLM_EXTERN extern
68 #endif
69
70 #ifdef __cplusplus
71 extern "C" {
72 #endif
73
74 /*****************************************************************************
75 *
76 * loader
77 *
78 *****************************************************************************/
79 NLM_EXTERN Boolean LIBCALL SeqFeatAsnLoad PROTO((void));
80
81 /*****************************************************************************
82 *
83 * GBQual
84 *
85 *****************************************************************************/
86 typedef struct gbqual {
87 CharPtr qual,
88 val;
89 struct gbqual PNTR next;
90 } GBQual, PNTR GBQualPtr;
91
92 NLM_EXTERN GBQualPtr LIBCALL GBQualNew PROTO((void));
93 NLM_EXTERN Boolean LIBCALL GBQualAsnWrite PROTO((GBQualPtr gbp, AsnIoPtr aip, AsnTypePtr atp));
94 NLM_EXTERN GBQualPtr LIBCALL GBQualAsnRead PROTO((AsnIoPtr aip, AsnTypePtr atp));
95 NLM_EXTERN GBQualPtr LIBCALL GBQualFree PROTO((GBQualPtr gbp));
96
97 /*****************************************************************************
98 *
99 * SeqFeatXref
100 * cross references between features
101 *
102 *****************************************************************************/
103 typedef struct seqfeatxref {
104 Choice id;
105 Choice data;
106 struct seqfeatxref PNTR next;
107 Boolean specialCleanupFlag; /* marks converted gbquals for extra checking within SeriousSeqEntryCleanup */
108 } SeqFeatXref, PNTR SeqFeatXrefPtr;
109
110 NLM_EXTERN SeqFeatXrefPtr LIBCALL SeqFeatXrefNew PROTO((void));
111 NLM_EXTERN Boolean LIBCALL SeqFeatXrefAsnWrite PROTO((SeqFeatXrefPtr sfxp, AsnIoPtr aip, AsnTypePtr atp));
112 NLM_EXTERN SeqFeatXrefPtr LIBCALL SeqFeatXrefAsnRead PROTO((AsnIoPtr aip, AsnTypePtr atp));
113 NLM_EXTERN SeqFeatXrefPtr LIBCALL SeqFeatXrefFree PROTO((SeqFeatXrefPtr sfxp));
114 /* free frees whole chain of SeqFeatXref */
115 /*****************************************************************************
116 *
117 * SeqFeat
118 * Feat-id is built into idtype/id
119 * 1=gibb (in id.intvalue)
120 * 2=gimm (id.ptrvalue)
121 * 3=local (id.ptrvalue to Object-id)
122 * 4=general (id.ptrvalue to Dbtag)
123 * SeqFeatData is built into datatype/data
124 * datatype gives type of SeqFeatData:
125 * 0 = not set
126 1 = gene, data.value.ptrvalue = Gene-ref ,
127 2 = org , data.value.ptrvalue = Org-ref ,
128 3 = cdregion, data.value.ptrvalue = Cdregion ,
129 4 = prot , data.value.ptrvalue = Prot-ref ,
130 5 = rna, data.value.ptrvalue = RNA-ref ,
131 6 = pub, data.value.ptrvalue = Pubdesc , -- publication applies to this seq
132 7 = seq, data.value.ptrvalue = Seq-loc , -- for tracking source of a seq.
133 8 = imp, data.value.ptrvalue = Imp-feat ,
134 9 = region, data.value.ptrvalue= VisibleString, -- for a name
135 10 = comment, data.value.ptrvalue= NULL , -- just a comment
136 11 = bond, data.value.intvalue = ENUMERATED {
137 disulfide (1) ,
138 thiolester (2) ,
139 xlink (3) ,
140 other (255) } ,
141 12 = site, data.value.intvalue = ENUMERATED {
142 active (1) ,
143 binding (2) ,
144 cleavage (3) ,
145 inhibit (4) ,
146 modified (5),
147 other (255) } ,
148 13 = rsite, data.value.ptrvalue = Rsite-ref
149 14 = user, data.value.ptrvalue = UserObjectPtr
150 15 = txinit, data.value.ptrvalue = TxinitPtr
151 16 = num, data.value.ptrvalue = NumberingPtr -- a numbering system
152 17 = psec-str data.value.intvalue = ENUMERATED { -- protein secondary structure
153 helix (1) , -- any helix
154 sheet (2) , -- beta sheet
155 turn (3) } , -- beta or gamma turn
156 18 = non-std-residue data.value.ptrvalue = VisibleString , -- non-standard residue here in seq
157 19 = het data.value.ptrvalue=CharPtr Heterogen -- cofactor, prosthetic grp, etc, bound to seq
158 20 = biosrc, data.value.ptrvalue = BioSource
159 21 = cloneref, data.value.ptrvalue = CloneRef
160 *
161 *
162 *****************************************************************************/
163 typedef struct seqfeat {
164 Choice id;
165 Choice data;
166 Boolean partial ,
167 excpt; /* except changed to excpt (Win32 reserved word) */
168 CharPtr comment;
169 ValNodePtr product ,
170 location;
171 GBQualPtr qual;
172 CharPtr title;
173 UserObjectPtr ext;
174 ValNodePtr cit; /* citations (Pub-set) */
175 Uint1 exp_ev;
176 SeqFeatXrefPtr xref;
177 ValNodePtr dbxref; /* each vnp->data.ptrvalue is a DbtagPtr */
178 Boolean pseudo; /* pseudogene feature ? */
179 CharPtr except_text; /* explanation of biological exception */
180 ValNodePtr ids;
181 UserObjectPtr exts;
182 struct seqfeat PNTR next;
183 GatherIndex idx; /* internal gather/objmgr tracking fields */
184 } SeqFeat, PNTR SeqFeatPtr;
185
186 NLM_EXTERN SeqFeatPtr LIBCALL SeqFeatNew PROTO((void));
187 NLM_EXTERN Boolean LIBCALL SeqFeatAsnWrite PROTO((SeqFeatPtr anp, AsnIoPtr aip, AsnTypePtr atp));
188 NLM_EXTERN SeqFeatPtr LIBCALL SeqFeatAsnRead PROTO((AsnIoPtr aip, AsnTypePtr atp));
189 NLM_EXTERN SeqFeatPtr LIBCALL SeqFeatFree PROTO((SeqFeatPtr anp));
190
191 /**********************************************
192 *
193 * the SeqFeat Labelling functions are quite complex and are all in
194 * objfdef.[ch]. See FeatDefLabel()
195 *
196 ************************************************/
197
198 /* get a SeqFeatXref from a feature. Currently only Prot-ref and */
199 /* Gene-ref are supported */
200
201 NLM_EXTERN SeqFeatXrefPtr LIBCALL SeqFeatToXref PROTO((SeqFeatPtr sfp));
202
203 #define SEQFEAT_GENE 1
204 #define SEQFEAT_ORG 2
205 #define SEQFEAT_CDREGION 3
206 #define SEQFEAT_PROT 4
207 #define SEQFEAT_RNA 5
208 #define SEQFEAT_PUB 6
209 #define SEQFEAT_SEQ 7
210 #define SEQFEAT_IMP 8
211 #define SEQFEAT_REGION 9
212 #define SEQFEAT_COMMENT 10
213 #define SEQFEAT_BOND 11
214 #define SEQFEAT_SITE 12
215 #define SEQFEAT_RSITE 13
216 #define SEQFEAT_USER 14
217 #define SEQFEAT_TXINIT 15
218 #define SEQFEAT_NUM 16
219 #define SEQFEAT_PSEC_STR 17
220 #define SEQFEAT_NON_STD_RESIDUE 18
221 #define SEQFEAT_HET 19
222 #define SEQFEAT_BIOSRC 20
223 #define SEQFEAT_CLONEREF 21
224
225 #define SEQFEAT_MAX 22 /* size of array needed for seqfeat filter parameters */
226
227 /*****************************************************************************
228 *
229 * SeqFeatId - used as parts of other things, so is not allocated itself
230 *
231 *****************************************************************************/
232 NLM_EXTERN void LIBCALL SeqFeatIdFree PROTO((ChoicePtr cp)); /* does NOT free cp itself */
233 NLM_EXTERN Boolean LIBCALL SeqFeatIdAsnWrite PROTO((ChoicePtr cp, AsnIoPtr aip, AsnTypePtr orig));
234 NLM_EXTERN Boolean LIBCALL SeqFeatIdAsnRead PROTO((AsnIoPtr aip, AsnTypePtr orig, ChoicePtr cp));
235 /** NOTE: SeqFeatIdAsnRead() does NOT allocate cp ***/
236 NLM_EXTERN Boolean LIBCALL SeqFeatIdDup PROTO((ChoicePtr dest, ChoicePtr src));
237
238 /*****************************************************************************
239 *
240 * SeqFeatData - used as parts of other things, so is not allocated itself
241 *
242 *****************************************************************************/
243 NLM_EXTERN void LIBCALL SeqFeatDataFree PROTO((ChoicePtr cp)); /* does NOT free cp itself */
244 NLM_EXTERN Boolean LIBCALL SeqFeatDataAsnWrite PROTO((ChoicePtr cp, AsnIoPtr aip, AsnTypePtr orig));
245 NLM_EXTERN Boolean LIBCALL SeqFeatDataAsnRead PROTO((AsnIoPtr aip, AsnTypePtr orig, ChoicePtr cp));
246 /** NOTE: SeqFeatDataAsnRead() does NOT allocate cp ***/
247
248 /*****************************************************************************
249 *
250 * SeqFeatSet - sets of seqfeats
251 *
252 *****************************************************************************/
253 NLM_EXTERN Boolean LIBCALL SeqFeatSetAsnWrite PROTO((SeqFeatPtr anp, AsnIoPtr aip, AsnTypePtr set, AsnTypePtr element));
254 NLM_EXTERN SeqFeatPtr LIBCALL SeqFeatSetAsnRead PROTO((AsnIoPtr aip, AsnTypePtr set, AsnTypePtr element));
255
256 /** used only SeqAnnotAsnWriteExtra **/
257 NLM_EXTERN Boolean LIBCALL SeqFeatSetAsnWriteExtra PROTO((SeqFeatPtr anp, AsnIoPtr aip,
258 AsnTypePtr set, AsnTypePtr element, ValNodePtr extras));
259 /*****************************************************************************
260 *
261 * CodeBreak
262 *
263 *****************************************************************************/
264 typedef struct cb {
265 SeqLocPtr loc; /* the Seq-loc */
266 Choice aa; /* 1=ncbieaa, 2=ncbi8aa, 3=ncbistdaa */
267 struct cb PNTR next;
268 } CodeBreak, PNTR CodeBreakPtr;
269
270 NLM_EXTERN CodeBreakPtr LIBCALL CodeBreakNew PROTO((void));
271 NLM_EXTERN Boolean LIBCALL CodeBreakAsnWrite PROTO((CodeBreakPtr cbp, AsnIoPtr aip, AsnTypePtr atp));
272 NLM_EXTERN CodeBreakPtr LIBCALL CodeBreakAsnRead PROTO((AsnIoPtr aip, AsnTypePtr atp));
273 NLM_EXTERN CodeBreakPtr LIBCALL CodeBreakFree PROTO((CodeBreakPtr cbp));
274
275 /*****************************************************************************
276 *
277 * CdRegion
278 *
279 *****************************************************************************/
280 typedef struct cdregion {
281 Boolean orf;
282 Uint1 frame;
283 Boolean conflict;
284 Uint1 gaps, /* 255 = any number > 254 */
285 mismatch,
286 stops;
287 ValNodePtr genetic_code; /* NULL = not set */
288 CodeBreakPtr code_break;
289 } CdRegion, PNTR CdRegionPtr;
290
291 NLM_EXTERN CdRegionPtr LIBCALL CdRegionNew PROTO((void));
292 NLM_EXTERN Boolean LIBCALL CdRegionAsnWrite PROTO((CdRegionPtr cdp, AsnIoPtr aip, AsnTypePtr atp));
293 NLM_EXTERN CdRegionPtr LIBCALL CdRegionAsnRead PROTO((AsnIoPtr aip, AsnTypePtr atp));
294 NLM_EXTERN CdRegionPtr LIBCALL CdRegionFree PROTO((CdRegionPtr cdp));
295
296 /*****************************************************************************
297 *
298 * GeneticCode
299 *
300 * ncbieaa, ncbi8aa, ncbistdaa
301 * are arrays 64 cells long, where each cell gives the aa produced
302 * by triplets coded by T=0, C=1, A=2, G=3
303 * TTT = cell[0]
304 * TTC = cell[1]
305 * TTA = cell[2]
306 * TTG = cell[3]
307 * TCT = cell[4]
308 * ((base1 * 16) + (base2 * 4) + (base3)) = cell in table
309 *
310 * sncbieaa, sncbi8aa, sncbistdaa
311 * are arrays same as above, except the AA's they code for are only for
312 * the first AA of a peptide. This accomdates alternate start codes.
313 * If a codon is not a valid start, the cell contains the "gap" symbol
314 * instead of an AA.
315 *
316 * in both cases, IUPAC cannot be used because it has no symbol for
317 * stop.
318 *
319 *
320 * GeneticCode is a ValNodePtr so variable numbers of elements are
321 * easily accomodated. A ValNodePtr with choice = 254 is the head
322 * of the list. It's elements are a chain of ValNodes beginning with
323 * the data.ptrvalue of the GeneticCode (head). GeneticCodeNew()
324 * returns the head.
325 *
326 * Types in ValNodePtr->choice are:
327 * 0 = not set
328 * 1 = name (CharPtr in ptrvalue)
329 * 2 = id (in intvalue)
330 * 3 = ncbieaa (CharPtr in ptrvalue)
331 * 4 = ncbi8aa (ByteStorePtr in ptrvalue)
332 * 5 = ncbistdaa (ByteStorePtr in ptrvalue)
333 * 6 = sncbieaa (CharPtr in ptrvalue)
334 * 7 = sncbi8aa (ByteStorePtr in ptrvalue)
335 * 8 = sncbistdaa (ByteStorePtr in ptrvalue)
336 * 255 = read unrecognized type, but passed ASN.1
337 *
338 *****************************************************************************/
339 typedef ValNode GeneticCode, FAR *GeneticCodePtr;
340
341 NLM_EXTERN GeneticCodePtr LIBCALL GeneticCodeNew PROTO((void));
342 NLM_EXTERN Boolean LIBCALL GeneticCodeAsnWrite PROTO((GeneticCodePtr gcp, AsnIoPtr aip, AsnTypePtr atp));
343 NLM_EXTERN GeneticCodePtr LIBCALL GeneticCodeAsnRead PROTO((AsnIoPtr aip, AsnTypePtr atp));
344 NLM_EXTERN GeneticCodePtr LIBCALL GeneticCodeFree PROTO((GeneticCodePtr gcp));
345
346 NLM_EXTERN Boolean LIBCALL GeneticCodeTableAsnWrite PROTO((GeneticCodePtr gcp, AsnIoPtr aip, AsnTypePtr atp));
347 NLM_EXTERN GeneticCodePtr LIBCALL GeneticCodeTableAsnRead PROTO((AsnIoPtr aip, AsnTypePtr atp));
348
349 NLM_EXTERN GeneticCodePtr LIBCALL GeneticCodeFind PROTO((Int4 id, CharPtr name));
350 NLM_EXTERN GeneticCodePtr LIBCALL GeneticCodeTableLoad PROTO((void));
351
352 /*****************************************************************************
353 *
354 * ImpFeat
355 *
356 *****************************************************************************/
357 typedef struct impfeat {
358 CharPtr key,
359 loc,
360 descr;
361 } ImpFeat, PNTR ImpFeatPtr;
362
363 NLM_EXTERN ImpFeatPtr LIBCALL ImpFeatNew PROTO((void));
364 NLM_EXTERN Boolean LIBCALL ImpFeatAsnWrite PROTO((ImpFeatPtr ifp, AsnIoPtr aip, AsnTypePtr atp));
365 NLM_EXTERN ImpFeatPtr LIBCALL ImpFeatAsnRead PROTO((AsnIoPtr aip, AsnTypePtr atp));
366 NLM_EXTERN ImpFeatPtr LIBCALL ImpFeatFree PROTO((ImpFeatPtr ifp));
367
368 /*****************************************************************************
369 *
370 * RnaRef
371 * Choice used for extensions
372 * 0 = no extension
373 * 1 = name, ext.value.ptrvalue = CharPtr
374 * 2 = trna, ext.value.ptrvalue = tRNA
375 * 3 = gen, ext.value.ptrvalue = RnaGenPtr
376 *
377 *****************************************************************************/
378 typedef struct rnaref {
379 Uint1 type;
380 Boolean pseudo;
381 Choice ext;
382 } RnaRef, PNTR RnaRefPtr;
383
384 NLM_EXTERN RnaRefPtr LIBCALL RnaRefNew PROTO((void));
385 NLM_EXTERN Boolean LIBCALL RnaRefAsnWrite PROTO((RnaRefPtr rrp, AsnIoPtr aip, AsnTypePtr atp));
386 NLM_EXTERN RnaRefPtr LIBCALL RnaRefAsnRead PROTO((AsnIoPtr aip, AsnTypePtr atp));
387 NLM_EXTERN RnaRefPtr LIBCALL RnaRefFree PROTO((RnaRefPtr rrp));
388
389 /*****************************************************************************
390 *
391 * tRNA
392 *
393 *****************************************************************************/
394 typedef struct trna {
395 Uint1 aatype, /* 0=not set, 1=iupacaa, 2=ncbieaa, 3=ncbi8aa 4=ncbistdaa */
396 aa; /* the aa transferred in above code */
397 Uint1 codon[6]; /* codons recognized, coded as for Genetic-code */
398 SeqLocPtr anticodon; /* location of anticodon */
399 } tRNA, PNTR tRNAPtr; /* 0-63 = codon, 255=no data in cell */
400
401 /**************************************************
402 *
403 * RNAQual
404 *
405 **************************************************/
406 typedef struct rnaqual {
407 struct rnaqual PNTR next;
408 CharPtr qual;
409 CharPtr val;
410 } RNAQual, PNTR RNAQualPtr;
411
412 NLM_EXTERN RNAQualPtr LIBCALL RNAQualNew PROTO (( void ));
413 NLM_EXTERN RNAQualPtr LIBCALL RNAQualFree PROTO ((RNAQualPtr rqp));
414 NLM_EXTERN RNAQualPtr LIBCALL RNAQualAsnRead PROTO (( AsnIoPtr aip, AsnTypePtr atp));
415 NLM_EXTERN Boolean LIBCALL RNAQualAsnWrite PROTO (( RNAQualPtr rqp, AsnIoPtr aip, AsnTypePtr atp));
416
417 /**************************************************
418 *
419 * RNAQualSet
420 *
421 **************************************************/
422 typedef struct rnaqual RNAQualSet;
423 typedef struct rnaqual PNTR RNAQualSetPtr;
424 #define RNAQualSetNew() RNAQualNew()
425
426 NLM_EXTERN RNAQualSetPtr LIBCALL RNAQualSetNew PROTO (( void ));
427 NLM_EXTERN RNAQualSetPtr LIBCALL RNAQualSetFree PROTO ((RNAQualSetPtr rqp));
428 NLM_EXTERN RNAQualSetPtr LIBCALL RNAQualSetAsnRead PROTO (( AsnIoPtr aip, AsnTypePtr atp));
429 NLM_EXTERN Boolean LIBCALL RNAQualSetAsnWrite PROTO (( RNAQualSetPtr rqp, AsnIoPtr aip, AsnTypePtr atp));
430
431 /**************************************************
432 *
433 * RNAGen
434 *
435 **************************************************/
436 typedef struct rnagen {
437 CharPtr _class;
438 CharPtr product;
439 RNAQualSetPtr quals;
440 } RNAGen, PNTR RNAGenPtr;
441
442 NLM_EXTERN RNAGenPtr LIBCALL RNAGenNew PROTO (( void ));
443 NLM_EXTERN RNAGenPtr LIBCALL RNAGenFree PROTO ((RNAGenPtr rgp));
444 NLM_EXTERN RNAGenPtr LIBCALL RNAGenAsnRead PROTO (( AsnIoPtr aip, AsnTypePtr atp));
445 NLM_EXTERN Boolean LIBCALL RNAGenAsnWrite PROTO (( RNAGenPtr rgp, AsnIoPtr aip, AsnTypePtr atp));
446
447 /**************************************************
448 *
449 * GeneNomenclature
450 * Values for status field
451 * unknown 0
452 * official 1
453 * interim 2
454 *
455 **************************************************/
456 typedef struct genenome {
457 Uint2 status;
458 CharPtr symbol;
459 CharPtr name;
460 DbtagPtr source;
461 } GeneNomenclature, PNTR GeneNomenclaturePtr;
462
463
464 NLM_EXTERN GeneNomenclaturePtr LIBCALL GeneNomenclatureNew PROTO ((void));
465 NLM_EXTERN Boolean LIBCALL GeneNomenclatureAsnWrite PROTO ((GeneNomenclaturePtr gnp, AsnIoPtr aip, AsnTypePtr atp));
466 NLM_EXTERN GeneNomenclaturePtr LIBCALL GeneNomenclatureAsnRead PROTO ((AsnIoPtr aip, AsnTypePtr atp));
467 NLM_EXTERN GeneNomenclaturePtr LIBCALL GeneNomenclatureFree PROTO ((GeneNomenclaturePtr gnp));
468
469 /*****************************************************************************
470 *
471 * GeneRef
472 *
473 *****************************************************************************/
474 typedef struct generef {
475 CharPtr locus,
476 allele,
477 desc,
478 maploc;
479 Boolean pseudo;
480 ValNodePtr db; /* ids in other databases */
481 ValNodePtr syn; /* synonyms for locus */
482 CharPtr locus_tag; /* systematic gene name */
483 GeneNomenclaturePtr formal_name; /* official nomenclature for RefSeq */
484 } GeneRef, PNTR GeneRefPtr;
485
486 NLM_EXTERN GeneRefPtr LIBCALL GeneRefNew PROTO((void));
487 NLM_EXTERN Boolean LIBCALL GeneRefAsnWrite PROTO((GeneRefPtr grp, AsnIoPtr aip, AsnTypePtr atp));
488 NLM_EXTERN GeneRefPtr LIBCALL GeneRefAsnRead PROTO((AsnIoPtr aip, AsnTypePtr atp));
489 NLM_EXTERN GeneRefPtr LIBCALL GeneRefFree PROTO((GeneRefPtr grp));
490 NLM_EXTERN GeneRefPtr LIBCALL GeneRefDup PROTO((GeneRefPtr grp));
491
492 /*****************************************************************************
493 *
494 * OrgRef
495 *
496 *****************************************************************************/
497 typedef struct taxelement {
498 Uint1 fixed_level; /* controlled levels, 0=other,1=family,2=order,3=class */
499 CharPtr level, /* level name, if "other" */
500 name; /* tax name at this level */
501 struct taxelement PNTR next;
502 } TaxElement, PNTR TaxElementPtr;
503
504 NLM_EXTERN TaxElementPtr LIBCALL TaxElementNew PROTO((void));
505 NLM_EXTERN Boolean LIBCALL TaxElementAsnWrite PROTO((TaxElementPtr tep, AsnIoPtr aip, AsnTypePtr atp));
506 NLM_EXTERN TaxElementPtr LIBCALL TaxElementAsnRead PROTO((AsnIoPtr aip, AsnTypePtr atp));
507 NLM_EXTERN TaxElementPtr LIBCALL TaxElementFree PROTO((TaxElementPtr tep));
508
509 NLM_EXTERN Boolean LIBCALL TaxElementSetAsnWrite PROTO((TaxElementPtr tep, AsnIoPtr aip, AsnTypePtr set, AsnTypePtr element));
510 NLM_EXTERN TaxElementPtr LIBCALL TaxElementSetAsnRead PROTO((AsnIoPtr aip, AsnTypePtr set, AsnTypePtr element));
511 NLM_EXTERN TaxElementPtr LIBCALL TaxElementSetFree PROTO((TaxElementPtr tep));
512
513 typedef struct binomialorgname {
514 CharPtr genus,
515 species,
516 subspecies;
517 } BinomialOrgName, PNTR BinomialOrgNamePtr;
518
519 NLM_EXTERN BinomialOrgNamePtr LIBCALL BinomialOrgNameNew PROTO((void));
520 NLM_EXTERN Boolean LIBCALL BinomialOrgNameAsnWrite PROTO((BinomialOrgNamePtr bop, AsnIoPtr aip, AsnTypePtr atp));
521 NLM_EXTERN BinomialOrgNamePtr LIBCALL BinomialOrgNameAsnRead PROTO((AsnIoPtr aip, AsnTypePtr atp));
522 NLM_EXTERN BinomialOrgNamePtr LIBCALL BinomialOrgNameFree PROTO((BinomialOrgNamePtr bop));
523
524 typedef struct orgmod {
525 Uint1 subtype;
526 CharPtr subname,
527 attrib;
528 struct orgmod PNTR next;
529 } OrgMod, PNTR OrgModPtr;
530
531 NLM_EXTERN OrgModPtr LIBCALL OrgModNew PROTO((void));
532 NLM_EXTERN Boolean LIBCALL OrgModAsnWrite PROTO((OrgModPtr omp, AsnIoPtr aip, AsnTypePtr atp));
533 NLM_EXTERN OrgModPtr LIBCALL OrgModAsnRead PROTO((AsnIoPtr aip, AsnTypePtr atp));
534 NLM_EXTERN OrgModPtr LIBCALL OrgModFree PROTO((OrgModPtr omp));
535
536 NLM_EXTERN Boolean LIBCALL OrgModSetAsnWrite PROTO((OrgModPtr omp, AsnIoPtr aip, AsnTypePtr set, AsnTypePtr element));
537 NLM_EXTERN OrgModPtr LIBCALL OrgModSetAsnRead PROTO((AsnIoPtr aip, AsnTypePtr set, AsnTypePtr element));
538 NLM_EXTERN OrgModPtr LIBCALL OrgModSetFree PROTO((OrgModPtr omp));
539 NLM_EXTERN Boolean LIBCALL OrgModSetMatch (OrgModPtr mod1, OrgModPtr mod2);
540
541 typedef struct orgname {
542 Uint1 choice; /* 1=binomial, 2=virus, 3=hybrid, 4=namedhybrid, 5=partial */
543 Pointer data; /* depends on choice */
544 CharPtr attrib; /* attribution for this name */
545 OrgModPtr mod; /* OrgMods */
546 CharPtr lineage; /* lineage to this org */
547 Uint1 gcode, /* genetic code using GenBank keys */
548 mgcode; /* mitochondrial genetic code using GenBank keys..0=none */
549 CharPtr div; /* GenBank division code */
550 struct orgname PNTR next; /* for MultiOrgName */
551 } OrgName, PNTR OrgNamePtr;
552
553 NLM_EXTERN OrgNamePtr LIBCALL OrgNameNew PROTO((void));
554 NLM_EXTERN Boolean LIBCALL OrgNameAsnWrite PROTO((OrgNamePtr onp, AsnIoPtr aip, AsnTypePtr atp));
555 NLM_EXTERN OrgNamePtr LIBCALL OrgNameAsnRead PROTO((AsnIoPtr aip, AsnTypePtr atp));
556 NLM_EXTERN OrgNamePtr LIBCALL OrgNameFree PROTO((OrgNamePtr onp));
557
558 NLM_EXTERN Boolean LIBCALL OrgNameSetAsnWrite PROTO((OrgNamePtr onp, AsnIoPtr aip, AsnTypePtr set, AsnTypePtr element));
559 NLM_EXTERN OrgNamePtr LIBCALL OrgNameSetAsnRead PROTO((AsnIoPtr aip, AsnTypePtr set, AsnTypePtr element));
560 NLM_EXTERN OrgNamePtr LIBCALL OrgNameSetFree PROTO((OrgNamePtr onp));
561 NLM_EXTERN Boolean LIBCALL OrgNameMatch (OrgNamePtr onp1, OrgNamePtr onp2);
562
563 typedef struct orgref {
564 CharPtr taxname, /* preferred full formal name */
565 common; /* preferred common name */
566 ValNodePtr mod; /* unstructured modifiers (Obsolete) */
567 ValNodePtr db; /* ids in other databases (set of Dbtag pointers)*/
568 ValNodePtr syn; /* synonyms for taxname and/or common */
569 OrgNamePtr orgname; /* structured names and components */
570 } OrgRef, PNTR OrgRefPtr;
571
572 NLM_EXTERN OrgRefPtr LIBCALL OrgRefNew PROTO((void));
573 NLM_EXTERN Boolean LIBCALL OrgRefAsnWrite PROTO((OrgRefPtr orp, AsnIoPtr aip, AsnTypePtr atp));
574 NLM_EXTERN OrgRefPtr LIBCALL OrgRefAsnRead PROTO((AsnIoPtr aip, AsnTypePtr atp));
575 NLM_EXTERN OrgRefPtr LIBCALL OrgRefFree PROTO((OrgRefPtr orp));
576 NLM_EXTERN Boolean LIBCALL OrgRefMatch (OrgRefPtr orp1, OrgRefPtr orp2);
577
578 /*****************************************************************************
579 *
580 * BioSource
581 *
582 *****************************************************************************/
583
584 typedef struct subsource {
585 Uint1 subtype;
586 CharPtr name,
587 attrib;
588 struct subsource PNTR next;
589 } SubSource, PNTR SubSourcePtr;
590
591 NLM_EXTERN SubSourcePtr LIBCALL SubSourceNew PROTO((void));
592 NLM_EXTERN Boolean LIBCALL SubSourceAsnWrite PROTO((SubSourcePtr ssp, AsnIoPtr aip, AsnTypePtr atp));
593 NLM_EXTERN SubSourcePtr LIBCALL SubSourceAsnRead PROTO((AsnIoPtr aip, AsnTypePtr atp));
594 NLM_EXTERN SubSourcePtr LIBCALL SubSourceFree PROTO((SubSourcePtr ssp));
595
596 NLM_EXTERN Boolean LIBCALL SubSourceSetAsnWrite PROTO((SubSourcePtr ssp, AsnIoPtr aip, AsnTypePtr set, AsnTypePtr element));
597 NLM_EXTERN SubSourcePtr LIBCALL SubSourceSetAsnRead PROTO((AsnIoPtr aip, AsnTypePtr set, AsnTypePtr element));
598 NLM_EXTERN SubSourcePtr LIBCALL SubSourceSetFree PROTO((SubSourcePtr ssp));
599 NLM_EXTERN Boolean LIBCALL SubSourceSetMatch (SubSourcePtr ssp1, SubSourcePtr ssp2);
600
601 typedef struct pcrprimer {
602 struct pcrprimer PNTR next;
603 CharPtr seq;
604 CharPtr name;
605 } PCRPrimer, PNTR PCRPrimerPtr;
606
607 NLM_EXTERN PCRPrimerPtr LIBCALL PCRPrimerNew PROTO ((void));
608 NLM_EXTERN Boolean LIBCALL PCRPrimerAsnWrite PROTO ((PCRPrimerPtr ppp, AsnIoPtr aip, AsnTypePtr atp));
609 NLM_EXTERN PCRPrimerPtr LIBCALL PCRPrimerAsnRead PROTO ((AsnIoPtr aip, AsnTypePtr atp));
610 NLM_EXTERN PCRPrimerPtr LIBCALL PCRPrimerFree PROTO ((PCRPrimerPtr ppp));
611
612 typedef struct pcrprimer PCRPrimerSet, PNTR PCRPrimerSetPtr;
613 #define PCRPrimerSetNew() PCRPrimerNew()
614
615 NLM_EXTERN PCRPrimerSetPtr LIBCALL PCRPrimerSetNew PROTO ((void));
616 NLM_EXTERN Boolean LIBCALL PCRPrimerSetAsnWrite PROTO ((PCRPrimerSetPtr psp, AsnIoPtr aip, AsnTypePtr atp));
617 NLM_EXTERN PCRPrimerSetPtr LIBCALL PCRPrimerSetAsnRead PROTO ((AsnIoPtr aip, AsnTypePtr atp));
618 NLM_EXTERN PCRPrimerSetPtr LIBCALL PCRPrimerSetFree PROTO ((PCRPrimerSetPtr psp));
619
620 typedef struct pcrreaction {
621 struct pcrreaction PNTR next;
622 PCRPrimerPtr forward;
623 PCRPrimerPtr reverse;
624 } PCRReaction, PNTR PCRReactionPtr;
625
626 NLM_EXTERN PCRReactionPtr LIBCALL PCRReactionNew PROTO ((void));
627 NLM_EXTERN Boolean LIBCALL PCRReactionAsnWrite PROTO ((PCRReactionPtr prp, AsnIoPtr aip, AsnTypePtr atp));
628 NLM_EXTERN PCRReactionPtr LIBCALL PCRReactionAsnRead PROTO ((AsnIoPtr aip, AsnTypePtr atp));
629 NLM_EXTERN PCRReactionPtr LIBCALL PCRReactionFree PROTO ((PCRReactionPtr prp));
630
631 typedef struct pcrreaction PCRReactionSet, PNTR PCRReactionSetPtr;
632 #define PCRReactionSetNew() PCRReactionNew()
633
634 NLM_EXTERN PCRReactionSetPtr LIBCALL PCRReactionSetNew PROTO ((void));
635 NLM_EXTERN Boolean LIBCALL PCRReactionSetAsnWrite PROTO ((PCRReactionSetPtr psp, AsnIoPtr aip, AsnTypePtr atp));
636 NLM_EXTERN PCRReactionSetPtr LIBCALL PCRReactionSetAsnRead PROTO ((AsnIoPtr aip, AsnTypePtr atp));
637 NLM_EXTERN PCRReactionSetPtr LIBCALL PCRReactionSetFree PROTO ((PCRReactionSetPtr psp));
638
639
640
641 /******************************
642 * BioSource
643 current values for genome are: */
644 /* 0 unknown */
645 /* 1 genomic */
646 /* 2 chloroplast */
647 /* 3 chromoplast */
648 /* 4 kinteoplast */
649 /* 5 mitochondrion */
650 /* 6 plastid */
651 /* 7 macronuclear */
652 /* 8 extrachrom */
653 /* 9 plasmid */
654 /* 10 transposon */
655 /* 11 insertion_seq */
656 /* 12 cyanelle */
657 /* 13 proviral */
658 /* 14 virion */
659 /* Below are new in ASN.1 spec */
660 /* 15 nucleomorph */
661 /* 16 apicoplast */
662 /* 17 leucoplast */
663 /* 18 proplastid */
664 /* 19 endogenous_virus */
665
666 typedef struct biosource {
667 Uint1 genome,
668 origin;
669 OrgRefPtr org;
670 SubSourcePtr subtype;
671 Boolean is_focus; /* is main BioSource for molecule (when multiple) */
672 PCRReactionSetPtr pcr_primers;
673 } BioSource, PNTR BioSourcePtr;
674
675 NLM_EXTERN BioSourcePtr LIBCALL BioSourceNew PROTO((void));
676 NLM_EXTERN Boolean LIBCALL BioSourceAsnWrite PROTO((BioSourcePtr bsp, AsnIoPtr aip, AsnTypePtr atp));
677 NLM_EXTERN BioSourcePtr LIBCALL BioSourceAsnRead PROTO((AsnIoPtr aip, AsnTypePtr atp));
678 NLM_EXTERN BioSourcePtr LIBCALL BioSourceFree PROTO((BioSourcePtr bsp));
679 NLM_EXTERN Boolean LIBCALL BioSourceMatch (BioSourcePtr biop1, BioSourcePtr biop2);
680
681 /*****************************************************************************
682 *
683 * ProtRef
684 *
685 *****************************************************************************/
686 typedef struct protref {
687 ValNodePtr name;
688 CharPtr desc;
689 ValNodePtr ec,
690 activity;
691 ValNodePtr db; /* ids in other databases */
692 Uint1 processed; /* 0=not-set, 1=preprotein, 2=mature protein, 3=signal peptide,
693 4=transit peptide */
694 } ProtRef, PNTR ProtRefPtr;
695
696 NLM_EXTERN ProtRefPtr LIBCALL ProtRefNew PROTO((void));
697 NLM_EXTERN Boolean LIBCALL ProtRefAsnWrite PROTO((ProtRefPtr orp, AsnIoPtr aip, AsnTypePtr atp));
698 NLM_EXTERN ProtRefPtr LIBCALL ProtRefAsnRead PROTO((AsnIoPtr aip, AsnTypePtr atp));
699 NLM_EXTERN ProtRefPtr LIBCALL ProtRefFree PROTO((ProtRefPtr orp));
700 NLM_EXTERN ProtRefPtr LIBCALL ProtRefDup PROTO((ProtRefPtr orp));
701
702 /*****************************************************************************
703 *
704 * RsiteRef
705 * uses an ValNode
706 * choice = 1 = str
707 * 2 = db
708 *
709 *****************************************************************************/
710 typedef ValNode RsiteRef, FAR *RsiteRefPtr;
711
712 NLM_EXTERN Boolean LIBCALL RsiteRefAsnWrite PROTO((RsiteRefPtr orp, AsnIoPtr aip, AsnTypePtr atp));
713 NLM_EXTERN RsiteRefPtr LIBCALL RsiteRefAsnRead PROTO((AsnIoPtr aip, AsnTypePtr atp));
714 NLM_EXTERN RsiteRefPtr LIBCALL RsiteRefFree PROTO((RsiteRefPtr orp));
715
716 /*****************************************************************************
717 *
718 * Txinit
719 * Transcription initiation site
720 *
721 *****************************************************************************/
722 typedef struct txevidence {
723 Uint1 exp_code ,
724 exp_sys ;
725 Boolean low_prec_data ,
726 from_homolog;
727 struct txevidence PNTR next;
728 } TxEvidence, PNTR TxEvidencePtr;
729
730 typedef struct txinit {
731 CharPtr name;
732 ValNodePtr syn ,
733 gene ,
734 protein ,
735 rna ;
736 CharPtr expression;
737 Uint1 txsystem;
738 CharPtr txdescr;
739 OrgRefPtr txorg;
740 Boolean mapping_precise,
741 location_accurate;
742 Uint1 inittype; /* 255 if not set */
743 TxEvidencePtr evidence;
744 } Txinit, PNTR TxinitPtr;
745
746 NLM_EXTERN TxinitPtr LIBCALL TxinitNew PROTO((void));
747 NLM_EXTERN Boolean LIBCALL TxinitAsnWrite PROTO((TxinitPtr txp, AsnIoPtr aip, AsnTypePtr atp));
748 NLM_EXTERN TxinitPtr LIBCALL TxinitAsnRead PROTO((AsnIoPtr aip, AsnTypePtr atp));
749 NLM_EXTERN TxinitPtr LIBCALL TxinitFree PROTO((TxinitPtr txp));
750
751
752 /**************************************************
753 *
754 * CloneSeq
755 *
756 **************************************************/
757 typedef struct clone_seq {
758 struct clone_seq PNTR next;
759 Uint4 OBbits__;
760 Int4 type;
761 #define OB__Clone_seq_confidence 0
762 Int4 confidence;
763 ValNodePtr location;
764 ValNodePtr seq;
765 DbtagPtr align_id;
766 } CloneSeq, PNTR CloneSeqPtr;
767
768
769 NLM_EXTERN CloneSeqPtr LIBCALL CloneSeqFree PROTO ((CloneSeqPtr ));
770 NLM_EXTERN CloneSeqPtr LIBCALL CloneSeqNew PROTO (( void ));
771 NLM_EXTERN CloneSeqPtr LIBCALL CloneSeqAsnRead PROTO (( AsnIoPtr, AsnTypePtr));
772 NLM_EXTERN Boolean LIBCALL CloneSeqAsnWrite PROTO (( CloneSeqPtr , AsnIoPtr, AsnTypePtr));
773
774
775 /**************************************************
776 *
777 * CloneSeqSet
778 *
779 **************************************************/
780 typedef struct clone_seq CloneSeqSet;
781 typedef struct clone_seq PNTR CloneSeqSetPtr;
782 #define CloneSeqSetNew() Clone_seqNew()
783
784 NLM_EXTERN CloneSeqSetPtr LIBCALL CloneSeqSetFree PROTO ((CloneSeqSetPtr ));
785 NLM_EXTERN CloneSeqSetPtr LIBCALL CloneSeqSetNew PROTO (( void ));
786 NLM_EXTERN CloneSeqSetPtr LIBCALL CloneSeqSetAsnRead PROTO (( AsnIoPtr, AsnTypePtr));
787 NLM_EXTERN Boolean LIBCALL CloneSeqSetAsnWrite PROTO (( CloneSeqSetPtr , AsnIoPtr, AsnTypePtr));
788
789 /**************************************************
790 *
791 * CloneRef
792 *
793 **************************************************/
794 typedef struct clone_ref {
795 Uint4 OBbits__;
796 CharPtr name;
797 CharPtr library;
798 Uint1 concordant;
799 Uint1 unique;
800 #define OB__Clone_ref_placement_method 0
801 Int4 placement_method;
802 CloneSeqPtr clone_seq;
803 } CloneRef, PNTR CloneRefPtr;
804
805
806 NLM_EXTERN CloneRefPtr LIBCALL CloneRefFree PROTO ((CloneRefPtr ));
807 NLM_EXTERN CloneRefPtr LIBCALL CloneRefNew PROTO (( void ));
808 NLM_EXTERN CloneRefPtr LIBCALL CloneRefAsnRead PROTO (( AsnIoPtr, AsnTypePtr));
809 NLM_EXTERN Boolean LIBCALL CloneRefAsnWrite PROTO (( CloneRefPtr , AsnIoPtr, AsnTypePtr));
810
811
812
813
814
815
816 #ifdef __cplusplus
817 }
818 #endif
819
820 #undef NLM_EXTERN
821 #ifdef NLM_EXPORT
822 #define NLM_EXTERN NLM_EXPORT
823 #else
824 #define NLM_EXTERN
825 #endif
826
827 #endif
828
829 |
This page was automatically generated by the
LXR engine.
Visit the LXR main site for more information. |