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.43 $ 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 118 /************************************************** 119 * 120 * ModelEvidenceSupport 121 * 122 **************************************************/ 123 typedef struct modelEvidenceSupport { 124 Uint4 OBbits__; 125 CharPtr method; 126 ValNodePtr mrna; 127 ValNodePtr est; 128 ValNodePtr protein; 129 ValNodePtr identification; 130 ValNodePtr dbxref; 131 #define OB__ModelEvidenceSupport_exon_count 0 132 133 Int4 exon_count; 134 #define OB__ModelEvidenceSupport_exon_length 1 135 136 Int4 exon_length; 137 Uint1 full_length; 138 Uint1 supports_all_exon_combo; 139 } ModelEvidenceSupport, PNTR ModelEvidenceSupportPtr; 140 141 142 NLM_EXTERN ModelEvidenceSupportPtr LIBCALL ModelEvidenceSupportFree PROTO ((ModelEvidenceSupportPtr )); 143 NLM_EXTERN ModelEvidenceSupportPtr LIBCALL ModelEvidenceSupportNew PROTO (( void )); 144 NLM_EXTERN ModelEvidenceSupportPtr LIBCALL ModelEvidenceSupportAsnRead PROTO (( AsnIoPtr, AsnTypePtr)); 145 NLM_EXTERN Boolean LIBCALL ModelEvidenceSupportAsnWrite PROTO (( ModelEvidenceSupportPtr , AsnIoPtr, AsnTypePtr)); 146 147 148 149 /************************************************** 150 * 151 * ExperimentSupport 152 * 153 **************************************************/ 154 typedef struct experimentSupport { 155 Uint4 OBbits__; 156 #define OB__ExperimentSupport_category 0 157 158 Int4 category; 159 CharPtr explanation; 160 ValNodePtr pmids; 161 ValNodePtr dois; 162 } ExperimentSupport, PNTR ExperimentSupportPtr; 163 164 165 NLM_EXTERN ExperimentSupportPtr LIBCALL ExperimentSupportFree PROTO ((ExperimentSupportPtr )); 166 NLM_EXTERN ExperimentSupportPtr LIBCALL ExperimentSupportNew PROTO (( void )); 167 NLM_EXTERN ExperimentSupportPtr LIBCALL ExperimentSupportAsnRead PROTO (( AsnIoPtr, AsnTypePtr)); 168 NLM_EXTERN Boolean LIBCALL ExperimentSupportAsnWrite PROTO (( ExperimentSupportPtr , AsnIoPtr, AsnTypePtr)); 169 170 171 172 /************************************************** 173 * 174 * ProgramId 175 * 176 **************************************************/ 177 typedef struct program_id { 178 Uint4 OBbits__; 179 CharPtr name; 180 CharPtr version; 181 } ProgramId, PNTR ProgramIdPtr; 182 183 184 NLM_EXTERN ProgramIdPtr LIBCALL ProgramIdFree PROTO ((ProgramIdPtr )); 185 NLM_EXTERN ProgramIdPtr LIBCALL ProgramIdNew PROTO (( void )); 186 NLM_EXTERN ProgramIdPtr LIBCALL ProgramIdAsnRead PROTO (( AsnIoPtr, AsnTypePtr)); 187 NLM_EXTERN Boolean LIBCALL ProgramIdAsnWrite PROTO (( ProgramIdPtr , AsnIoPtr, AsnTypePtr)); 188 189 190 191 /************************************************** 192 * 193 * EvidenceBasis 194 * 195 **************************************************/ 196 typedef struct evidenceBasis { 197 Uint4 OBbits__; 198 ValNodePtr programs; 199 ValNodePtr accessions; 200 } EvidenceBasis, PNTR EvidenceBasisPtr; 201 202 203 NLM_EXTERN EvidenceBasisPtr LIBCALL EvidenceBasisFree PROTO ((EvidenceBasisPtr )); 204 NLM_EXTERN EvidenceBasisPtr LIBCALL EvidenceBasisNew PROTO (( void )); 205 NLM_EXTERN EvidenceBasisPtr LIBCALL EvidenceBasisAsnRead PROTO (( AsnIoPtr, AsnTypePtr)); 206 NLM_EXTERN Boolean LIBCALL EvidenceBasisAsnWrite PROTO (( EvidenceBasisPtr , AsnIoPtr, AsnTypePtr)); 207 208 209 210 /************************************************** 211 * 212 * InferenceSupport 213 * 214 **************************************************/ 215 typedef struct inferenceSupport { 216 Uint4 OBbits__; 217 #define OB__InferenceSupport_category 0 218 219 Int4 category; 220 Int4 type; 221 CharPtr other_type; 222 Uint1 same_species; 223 EvidenceBasisPtr basis; 224 ValNodePtr pmids; 225 ValNodePtr dois; 226 } InferenceSupport, PNTR InferenceSupportPtr; 227 228 229 NLM_EXTERN InferenceSupportPtr LIBCALL InferenceSupportFree PROTO ((InferenceSupportPtr )); 230 NLM_EXTERN InferenceSupportPtr LIBCALL InferenceSupportNew PROTO (( void )); 231 NLM_EXTERN InferenceSupportPtr LIBCALL InferenceSupportAsnRead PROTO (( AsnIoPtr, AsnTypePtr)); 232 NLM_EXTERN Boolean LIBCALL InferenceSupportAsnWrite PROTO (( InferenceSupportPtr , AsnIoPtr, AsnTypePtr)); 233 234 235 236 /************************************************** 237 * 238 * ModelEvidenceItem 239 * 240 **************************************************/ 241 typedef struct modelEvidenceItem { 242 Uint4 OBbits__; 243 ValNodePtr id; 244 #define OB__ModelEvidenceItem_exon_count 0 245 246 Int4 exon_count; 247 #define OB__ModelEvidenceItem_exon_length 1 248 249 Int4 exon_length; 250 Uint1 full_length; 251 Uint1 supports_all_exon_combo; 252 } ModelEvidenceItem, PNTR ModelEvidenceItemPtr; 253 254 255 NLM_EXTERN ModelEvidenceItemPtr LIBCALL ModelEvidenceItemFree PROTO ((ModelEvidenceItemPtr )); 256 NLM_EXTERN ModelEvidenceItemPtr LIBCALL ModelEvidenceItemNew PROTO (( void )); 257 NLM_EXTERN ModelEvidenceItemPtr LIBCALL ModelEvidenceItemAsnRead PROTO (( AsnIoPtr, AsnTypePtr)); 258 NLM_EXTERN Boolean LIBCALL ModelEvidenceItemAsnWrite PROTO (( ModelEvidenceItemPtr , AsnIoPtr, AsnTypePtr)); 259 260 261 262 /************************************************** 263 * 264 * SeqFeatSupport 265 * 266 **************************************************/ 267 typedef struct seqFeatSupport { 268 Uint4 OBbits__; 269 ValNodePtr experiment; 270 ValNodePtr inference; 271 ValNodePtr model_evidence; 272 } SeqFeatSupport, PNTR SeqFeatSupportPtr; 273 274 275 NLM_EXTERN SeqFeatSupportPtr LIBCALL SeqFeatSupportFree PROTO ((SeqFeatSupportPtr )); 276 NLM_EXTERN SeqFeatSupportPtr LIBCALL SeqFeatSupportNew PROTO (( void )); 277 NLM_EXTERN SeqFeatSupportPtr LIBCALL SeqFeatSupportAsnRead PROTO (( AsnIoPtr, AsnTypePtr)); 278 NLM_EXTERN Boolean LIBCALL SeqFeatSupportAsnWrite PROTO (( SeqFeatSupportPtr , AsnIoPtr, AsnTypePtr)); 279 280 281 /***************************************************************************** 282 * 283 * SeqFeat 284 * Feat-id is built into idtype/id 285 * 1=gibb (in id.intvalue) 286 * 2=gimm (id.ptrvalue) 287 * 3=local (id.ptrvalue to Object-id) 288 * 4=general (id.ptrvalue to Dbtag) 289 * SeqFeatData is built into datatype/data 290 * datatype gives type of SeqFeatData: 291 * 0 = not set 292 1 = gene, data.value.ptrvalue = Gene-ref , 293 2 = org , data.value.ptrvalue = Org-ref , 294 3 = cdregion, data.value.ptrvalue = Cdregion , 295 4 = prot , data.value.ptrvalue = Prot-ref , 296 5 = rna, data.value.ptrvalue = RNA-ref , 297 6 = pub, data.value.ptrvalue = Pubdesc , -- publication applies to this seq 298 7 = seq, data.value.ptrvalue = Seq-loc , -- for tracking source of a seq. 299 8 = imp, data.value.ptrvalue = Imp-feat , 300 9 = region, data.value.ptrvalue= VisibleString, -- for a name 301 10 = comment, data.value.ptrvalue= NULL , -- just a comment 302 11 = bond, data.value.intvalue = ENUMERATED { 303 disulfide (1) , 304 thiolester (2) , 305 xlink (3) , 306 other (255) } , 307 12 = site, data.value.intvalue = ENUMERATED { 308 active (1) , 309 binding (2) , 310 cleavage (3) , 311 inhibit (4) , 312 modified (5), 313 other (255) } , 314 13 = rsite, data.value.ptrvalue = Rsite-ref 315 14 = user, data.value.ptrvalue = UserObjectPtr 316 15 = txinit, data.value.ptrvalue = TxinitPtr 317 16 = num, data.value.ptrvalue = NumberingPtr -- a numbering system 318 17 = psec-str data.value.intvalue = ENUMERATED { -- protein secondary structure 319 helix (1) , -- any helix 320 sheet (2) , -- beta sheet 321 turn (3) } , -- beta or gamma turn 322 18 = non-std-residue data.value.ptrvalue = VisibleString , -- non-standard residue here in seq 323 19 = het data.value.ptrvalue=CharPtr Heterogen -- cofactor, prosthetic grp, etc, bound to seq 324 20 = biosrc, data.value.ptrvalue = BioSource 325 21 = cloneref, data.value.ptrvalue = CloneRef 326 22 = variation, data.value.ptrvalue = VariationRef 327 * 328 * 329 *****************************************************************************/ 330 typedef struct seqfeat { 331 Choice id; 332 Choice data; 333 Boolean partial , 334 excpt; /* except changed to excpt (Win32 reserved word) */ 335 CharPtr comment; 336 ValNodePtr product , 337 location; 338 GBQualPtr qual; 339 CharPtr title; 340 UserObjectPtr ext; 341 ValNodePtr cit; /* citations (Pub-set) */ 342 Uint1 exp_ev; 343 SeqFeatXrefPtr xref; 344 ValNodePtr dbxref; /* each vnp->data.ptrvalue is a DbtagPtr */ 345 Boolean pseudo; /* pseudogene feature ? */ 346 CharPtr except_text; /* explanation of biological exception */ 347 ValNodePtr ids; 348 UserObjectPtr exts; 349 SeqFeatSupportPtr support; /* will replace /experiment, /inference, model-evidence */ 350 struct seqfeat PNTR next; 351 GatherIndex idx; /* internal gather/objmgr tracking fields */ 352 } SeqFeat, PNTR SeqFeatPtr; 353 354 NLM_EXTERN SeqFeatPtr LIBCALL SeqFeatNew PROTO((void)); 355 NLM_EXTERN Boolean LIBCALL SeqFeatAsnWrite PROTO((SeqFeatPtr anp, AsnIoPtr aip, AsnTypePtr atp)); 356 NLM_EXTERN SeqFeatPtr LIBCALL SeqFeatAsnRead PROTO((AsnIoPtr aip, AsnTypePtr atp)); 357 NLM_EXTERN SeqFeatPtr LIBCALL SeqFeatFree PROTO((SeqFeatPtr anp)); 358 359 /********************************************** 360 * 361 * the SeqFeat Labelling functions are quite complex and are all in 362 * objfdef.[ch]. See FeatDefLabel() 363 * 364 ************************************************/ 365 366 /* get a SeqFeatXref from a feature. Currently only Prot-ref and */ 367 /* Gene-ref are supported */ 368 369 NLM_EXTERN SeqFeatXrefPtr LIBCALL SeqFeatToXref PROTO((SeqFeatPtr sfp)); 370 371 #define SEQFEAT_GENE 1 372 #define SEQFEAT_ORG 2 373 #define SEQFEAT_CDREGION 3 374 #define SEQFEAT_PROT 4 375 #define SEQFEAT_RNA 5 376 #define SEQFEAT_PUB 6 377 #define SEQFEAT_SEQ 7 378 #define SEQFEAT_IMP 8 379 #define SEQFEAT_REGION 9 380 #define SEQFEAT_COMMENT 10 381 #define SEQFEAT_BOND 11 382 #define SEQFEAT_SITE 12 383 #define SEQFEAT_RSITE 13 384 #define SEQFEAT_USER 14 385 #define SEQFEAT_TXINIT 15 386 #define SEQFEAT_NUM 16 387 #define SEQFEAT_PSEC_STR 17 388 #define SEQFEAT_NON_STD_RESIDUE 18 389 #define SEQFEAT_HET 19 390 #define SEQFEAT_BIOSRC 20 391 #define SEQFEAT_CLONEREF 21 392 #define SEQFEAT_VARIATIONREF 22 393 394 #define SEQFEAT_MAX 23 /* size of array needed for seqfeat filter parameters */ 395 396 /***************************************************************************** 397 * 398 * SeqFeatId - used as parts of other things, so is not allocated itself 399 * 400 *****************************************************************************/ 401 NLM_EXTERN void LIBCALL SeqFeatIdFree PROTO((ChoicePtr cp)); /* does NOT free cp itself */ 402 NLM_EXTERN Boolean LIBCALL SeqFeatIdAsnWrite PROTO((ChoicePtr cp, AsnIoPtr aip, AsnTypePtr orig)); 403 NLM_EXTERN Boolean LIBCALL SeqFeatIdAsnRead PROTO((AsnIoPtr aip, AsnTypePtr orig, ChoicePtr cp)); 404 /** NOTE: SeqFeatIdAsnRead() does NOT allocate cp ***/ 405 NLM_EXTERN Boolean LIBCALL SeqFeatIdDup PROTO((ChoicePtr dest, ChoicePtr src)); 406 407 /***************************************************************************** 408 * 409 * SeqFeatData - used as parts of other things, so is not allocated itself 410 * 411 *****************************************************************************/ 412 NLM_EXTERN void LIBCALL SeqFeatDataFree PROTO((ChoicePtr cp)); /* does NOT free cp itself */ 413 NLM_EXTERN Boolean LIBCALL SeqFeatDataAsnWrite PROTO((ChoicePtr cp, AsnIoPtr aip, AsnTypePtr orig)); 414 NLM_EXTERN Boolean LIBCALL SeqFeatDataAsnRead PROTO((AsnIoPtr aip, AsnTypePtr orig, ChoicePtr cp)); 415 /** NOTE: SeqFeatDataAsnRead() does NOT allocate cp ***/ 416 417 /***************************************************************************** 418 * 419 * SeqFeatSet - sets of seqfeats 420 * 421 *****************************************************************************/ 422 NLM_EXTERN Boolean LIBCALL SeqFeatSetAsnWrite PROTO((SeqFeatPtr anp, AsnIoPtr aip, AsnTypePtr set, AsnTypePtr element)); 423 NLM_EXTERN SeqFeatPtr LIBCALL SeqFeatSetAsnRead PROTO((AsnIoPtr aip, AsnTypePtr set, AsnTypePtr element)); 424 425 /** used only SeqAnnotAsnWriteExtra **/ 426 NLM_EXTERN Boolean LIBCALL SeqFeatSetAsnWriteExtra PROTO((SeqFeatPtr anp, AsnIoPtr aip, 427 AsnTypePtr set, AsnTypePtr element, ValNodePtr extras)); 428 429 430 431 /***************************************************************************** 432 * 433 * CodeBreak 434 * 435 *****************************************************************************/ 436 typedef struct cb { 437 SeqLocPtr loc; /* the Seq-loc */ 438 Choice aa; /* 1=ncbieaa, 2=ncbi8aa, 3=ncbistdaa */ 439 struct cb PNTR next; 440 } CodeBreak, PNTR CodeBreakPtr; 441 442 NLM_EXTERN CodeBreakPtr LIBCALL CodeBreakNew PROTO((void)); 443 NLM_EXTERN Boolean LIBCALL CodeBreakAsnWrite PROTO((CodeBreakPtr cbp, AsnIoPtr aip, AsnTypePtr atp)); 444 NLM_EXTERN CodeBreakPtr LIBCALL CodeBreakAsnRead PROTO((AsnIoPtr aip, AsnTypePtr atp)); 445 NLM_EXTERN CodeBreakPtr LIBCALL CodeBreakFree PROTO((CodeBreakPtr cbp)); 446 447 /***************************************************************************** 448 * 449 * CdRegion 450 * 451 *****************************************************************************/ 452 typedef struct cdregion { 453 Boolean orf; 454 Uint1 frame; 455 Boolean conflict; 456 Uint1 gaps, /* 255 = any number > 254 */ 457 mismatch, 458 stops; 459 ValNodePtr genetic_code; /* NULL = not set */ 460 CodeBreakPtr code_break; 461 } CdRegion, PNTR CdRegionPtr; 462 463 NLM_EXTERN CdRegionPtr LIBCALL CdRegionNew PROTO((void)); 464 NLM_EXTERN Boolean LIBCALL CdRegionAsnWrite PROTO((CdRegionPtr cdp, AsnIoPtr aip, AsnTypePtr atp)); 465 NLM_EXTERN CdRegionPtr LIBCALL CdRegionAsnRead PROTO((AsnIoPtr aip, AsnTypePtr atp)); 466 NLM_EXTERN CdRegionPtr LIBCALL CdRegionFree PROTO((CdRegionPtr cdp)); 467 468 /***************************************************************************** 469 * 470 * GeneticCode 471 * 472 * ncbieaa, ncbi8aa, ncbistdaa 473 * are arrays 64 cells long, where each cell gives the aa produced 474 * by triplets coded by T=0, C=1, A=2, G=3 475 * TTT = cell[0] 476 * TTC = cell[1] 477 * TTA = cell[2] 478 * TTG = cell[3] 479 * TCT = cell[4] 480 * ((base1 * 16) + (base2 * 4) + (base3)) = cell in table 481 * 482 * sncbieaa, sncbi8aa, sncbistdaa 483 * are arrays same as above, except the AA's they code for are only for 484 * the first AA of a peptide. This accomdates alternate start codes. 485 * If a codon is not a valid start, the cell contains the "gap" symbol 486 * instead of an AA. 487 * 488 * in both cases, IUPAC cannot be used because it has no symbol for 489 * stop. 490 * 491 * 492 * GeneticCode is a ValNodePtr so variable numbers of elements are 493 * easily accomodated. A ValNodePtr with choice = 254 is the head 494 * of the list. It's elements are a chain of ValNodes beginning with 495 * the data.ptrvalue of the GeneticCode (head). GeneticCodeNew() 496 * returns the head. 497 * 498 * Types in ValNodePtr->choice are: 499 * 0 = not set 500 * 1 = name (CharPtr in ptrvalue) 501 * 2 = id (in intvalue) 502 * 3 = ncbieaa (CharPtr in ptrvalue) 503 * 4 = ncbi8aa (ByteStorePtr in ptrvalue) 504 * 5 = ncbistdaa (ByteStorePtr in ptrvalue) 505 * 6 = sncbieaa (CharPtr in ptrvalue) 506 * 7 = sncbi8aa (ByteStorePtr in ptrvalue) 507 * 8 = sncbistdaa (ByteStorePtr in ptrvalue) 508 * 255 = read unrecognized type, but passed ASN.1 509 * 510 *****************************************************************************/ 511 typedef ValNode GeneticCode, FAR *GeneticCodePtr; 512 513 NLM_EXTERN GeneticCodePtr LIBCALL GeneticCodeNew PROTO((void)); 514 NLM_EXTERN Boolean LIBCALL GeneticCodeAsnWrite PROTO((GeneticCodePtr gcp, AsnIoPtr aip, AsnTypePtr atp)); 515 NLM_EXTERN GeneticCodePtr LIBCALL GeneticCodeAsnRead PROTO((AsnIoPtr aip, AsnTypePtr atp)); 516 NLM_EXTERN GeneticCodePtr LIBCALL GeneticCodeFree PROTO((GeneticCodePtr gcp)); 517 518 NLM_EXTERN Boolean LIBCALL GeneticCodeTableAsnWrite PROTO((GeneticCodePtr gcp, AsnIoPtr aip, AsnTypePtr atp)); 519 NLM_EXTERN GeneticCodePtr LIBCALL GeneticCodeTableAsnRead PROTO((AsnIoPtr aip, AsnTypePtr atp)); 520 521 NLM_EXTERN GeneticCodePtr LIBCALL GeneticCodeFind PROTO((Int4 id, CharPtr name)); 522 NLM_EXTERN GeneticCodePtr LIBCALL GeneticCodeTableLoad PROTO((void)); 523 524 /***************************************************************************** 525 * 526 * ImpFeat 527 * 528 *****************************************************************************/ 529 typedef struct impfeat { 530 CharPtr key, 531 loc, 532 descr; 533 } ImpFeat, PNTR ImpFeatPtr; 534 535 NLM_EXTERN ImpFeatPtr LIBCALL ImpFeatNew PROTO((void)); 536 NLM_EXTERN Boolean LIBCALL ImpFeatAsnWrite PROTO((ImpFeatPtr ifp, AsnIoPtr aip, AsnTypePtr atp)); 537 NLM_EXTERN ImpFeatPtr LIBCALL ImpFeatAsnRead PROTO((AsnIoPtr aip, AsnTypePtr atp)); 538 NLM_EXTERN ImpFeatPtr LIBCALL ImpFeatFree PROTO((ImpFeatPtr ifp)); 539 540 /***************************************************************************** 541 * 542 * RnaRef 543 * Choice used for extensions 544 * 0 = no extension 545 * 1 = name, ext.value.ptrvalue = CharPtr 546 * 2 = trna, ext.value.ptrvalue = tRNA 547 * 3 = gen, ext.value.ptrvalue = RnaGenPtr 548 * 549 *****************************************************************************/ 550 typedef struct rnaref { 551 Uint1 type; 552 Boolean pseudo; 553 Choice ext; 554 } RnaRef, PNTR RnaRefPtr; 555 556 NLM_EXTERN RnaRefPtr LIBCALL RnaRefNew PROTO((void)); 557 NLM_EXTERN Boolean LIBCALL RnaRefAsnWrite PROTO((RnaRefPtr rrp, AsnIoPtr aip, AsnTypePtr atp)); 558 NLM_EXTERN RnaRefPtr LIBCALL RnaRefAsnRead PROTO((AsnIoPtr aip, AsnTypePtr atp)); 559 NLM_EXTERN RnaRefPtr LIBCALL RnaRefFree PROTO((RnaRefPtr rrp)); 560 561 /***************************************************************************** 562 * 563 * tRNA 564 * 565 *****************************************************************************/ 566 typedef struct trna { 567 Uint1 aatype, /* 0=not set, 1=iupacaa, 2=ncbieaa, 3=ncbi8aa 4=ncbistdaa */ 568 aa; /* the aa transferred in above code */ 569 Uint1 codon[6]; /* codons recognized, coded as for Genetic-code */ 570 SeqLocPtr anticodon; /* location of anticodon */ 571 } tRNA, PNTR tRNAPtr; /* 0-63 = codon, 255=no data in cell */ 572 573 /************************************************** 574 * 575 * RNAQual 576 * 577 **************************************************/ 578 typedef struct rnaqual { 579 struct rnaqual PNTR next; 580 CharPtr qual; 581 CharPtr val; 582 } RNAQual, PNTR RNAQualPtr; 583 584 NLM_EXTERN RNAQualPtr LIBCALL RNAQualNew PROTO (( void )); 585 NLM_EXTERN RNAQualPtr LIBCALL RNAQualFree PROTO ((RNAQualPtr rqp)); 586 NLM_EXTERN RNAQualPtr LIBCALL RNAQualAsnRead PROTO (( AsnIoPtr aip, AsnTypePtr atp)); 587 NLM_EXTERN Boolean LIBCALL RNAQualAsnWrite PROTO (( RNAQualPtr rqp, AsnIoPtr aip, AsnTypePtr atp)); 588 589 /************************************************** 590 * 591 * RNAQualSet 592 * 593 **************************************************/ 594 typedef struct rnaqual RNAQualSet; 595 typedef struct rnaqual PNTR RNAQualSetPtr; 596 #define RNAQualSetNew() RNAQualNew() 597 598 NLM_EXTERN RNAQualSetPtr LIBCALL RNAQualSetNew PROTO (( void )); 599 NLM_EXTERN RNAQualSetPtr LIBCALL RNAQualSetFree PROTO ((RNAQualSetPtr rqp)); 600 NLM_EXTERN RNAQualSetPtr LIBCALL RNAQualSetAsnRead PROTO (( AsnIoPtr aip, AsnTypePtr atp)); 601 NLM_EXTERN Boolean LIBCALL RNAQualSetAsnWrite PROTO (( RNAQualSetPtr rqp, AsnIoPtr aip, AsnTypePtr atp)); 602 603 /************************************************** 604 * 605 * RNAGen 606 * 607 **************************************************/ 608 typedef struct rnagen { 609 CharPtr _class; 610 CharPtr product; 611 RNAQualSetPtr quals; 612 } RNAGen, PNTR RNAGenPtr; 613 614 NLM_EXTERN RNAGenPtr LIBCALL RNAGenNew PROTO (( void )); 615 NLM_EXTERN RNAGenPtr LIBCALL RNAGenFree PROTO ((RNAGenPtr rgp)); 616 NLM_EXTERN RNAGenPtr LIBCALL RNAGenAsnRead PROTO (( AsnIoPtr aip, AsnTypePtr atp)); 617 NLM_EXTERN Boolean LIBCALL RNAGenAsnWrite PROTO (( RNAGenPtr rgp, AsnIoPtr aip, AsnTypePtr atp)); 618 619 /************************************************** 620 * 621 * GeneNomenclature 622 * Values for status field 623 * unknown 0 624 * official 1 625 * interim 2 626 * 627 **************************************************/ 628 typedef struct genenome { 629 Uint2 status; 630 CharPtr symbol; 631 CharPtr name; 632 DbtagPtr source; 633 } GeneNomenclature, PNTR GeneNomenclaturePtr; 634 635 636 NLM_EXTERN GeneNomenclaturePtr LIBCALL GeneNomenclatureNew PROTO ((void)); 637 NLM_EXTERN Boolean LIBCALL GeneNomenclatureAsnWrite PROTO ((GeneNomenclaturePtr gnp, AsnIoPtr aip, AsnTypePtr atp)); 638 NLM_EXTERN GeneNomenclaturePtr LIBCALL GeneNomenclatureAsnRead PROTO ((AsnIoPtr aip, AsnTypePtr atp)); 639 NLM_EXTERN GeneNomenclaturePtr LIBCALL GeneNomenclatureFree PROTO ((GeneNomenclaturePtr gnp)); 640 641 /***************************************************************************** 642 * 643 * GeneRef 644 * 645 *****************************************************************************/ 646 typedef struct generef { 647 CharPtr locus, 648 allele, 649 desc, 650 maploc; 651 Boolean pseudo; 652 ValNodePtr db; /* ids in other databases */ 653 ValNodePtr syn; /* synonyms for locus */ 654 CharPtr locus_tag; /* systematic gene name */ 655 GeneNomenclaturePtr formal_name; /* official nomenclature for RefSeq */ 656 } GeneRef, PNTR GeneRefPtr; 657 658 NLM_EXTERN GeneRefPtr LIBCALL GeneRefNew PROTO((void)); 659 NLM_EXTERN Boolean LIBCALL GeneRefAsnWrite PROTO((GeneRefPtr grp, AsnIoPtr aip, AsnTypePtr atp)); 660 NLM_EXTERN GeneRefPtr LIBCALL GeneRefAsnRead PROTO((AsnIoPtr aip, AsnTypePtr atp)); 661 NLM_EXTERN GeneRefPtr LIBCALL GeneRefFree PROTO((GeneRefPtr grp)); 662 NLM_EXTERN GeneRefPtr LIBCALL GeneRefDup PROTO((GeneRefPtr grp)); 663 664 /***************************************************************************** 665 * 666 * OrgRef 667 * 668 *****************************************************************************/ 669 typedef struct taxelement { 670 Uint1 fixed_level; /* controlled levels, 0=other,1=family,2=order,3=class */ 671 CharPtr level, /* level name, if "other" */ 672 name; /* tax name at this level */ 673 struct taxelement PNTR next; 674 } TaxElement, PNTR TaxElementPtr; 675 676 NLM_EXTERN TaxElementPtr LIBCALL TaxElementNew PROTO((void)); 677 NLM_EXTERN Boolean LIBCALL TaxElementAsnWrite PROTO((TaxElementPtr tep, AsnIoPtr aip, AsnTypePtr atp)); 678 NLM_EXTERN TaxElementPtr LIBCALL TaxElementAsnRead PROTO((AsnIoPtr aip, AsnTypePtr atp)); 679 NLM_EXTERN TaxElementPtr LIBCALL TaxElementFree PROTO((TaxElementPtr tep)); 680 681 NLM_EXTERN Boolean LIBCALL TaxElementSetAsnWrite PROTO((TaxElementPtr tep, AsnIoPtr aip, AsnTypePtr set, AsnTypePtr element)); 682 NLM_EXTERN TaxElementPtr LIBCALL TaxElementSetAsnRead PROTO((AsnIoPtr aip, AsnTypePtr set, AsnTypePtr element)); 683 NLM_EXTERN TaxElementPtr LIBCALL TaxElementSetFree PROTO((TaxElementPtr tep)); 684 685 typedef struct binomialorgname { 686 CharPtr genus, 687 species, 688 subspecies; 689 } BinomialOrgName, PNTR BinomialOrgNamePtr; 690 691 NLM_EXTERN BinomialOrgNamePtr LIBCALL BinomialOrgNameNew PROTO((void)); 692 NLM_EXTERN Boolean LIBCALL BinomialOrgNameAsnWrite PROTO((BinomialOrgNamePtr bop, AsnIoPtr aip, AsnTypePtr atp)); 693 NLM_EXTERN BinomialOrgNamePtr LIBCALL BinomialOrgNameAsnRead PROTO((AsnIoPtr aip, AsnTypePtr atp)); 694 NLM_EXTERN BinomialOrgNamePtr LIBCALL BinomialOrgNameFree PROTO((BinomialOrgNamePtr bop)); 695 696 typedef struct orgmod { 697 Uint1 subtype; 698 CharPtr subname, 699 attrib; 700 struct orgmod PNTR next; 701 } OrgMod, PNTR OrgModPtr; 702 703 NLM_EXTERN OrgModPtr LIBCALL OrgModNew PROTO((void)); 704 NLM_EXTERN Boolean LIBCALL OrgModAsnWrite PROTO((OrgModPtr omp, AsnIoPtr aip, AsnTypePtr atp)); 705 NLM_EXTERN OrgModPtr LIBCALL OrgModAsnRead PROTO((AsnIoPtr aip, AsnTypePtr atp)); 706 NLM_EXTERN OrgModPtr LIBCALL OrgModFree PROTO((OrgModPtr omp)); 707 708 NLM_EXTERN Boolean LIBCALL OrgModSetAsnWrite PROTO((OrgModPtr omp, AsnIoPtr aip, AsnTypePtr set, AsnTypePtr element)); 709 NLM_EXTERN OrgModPtr LIBCALL OrgModSetAsnRead PROTO((AsnIoPtr aip, AsnTypePtr set, AsnTypePtr element)); 710 NLM_EXTERN OrgModPtr LIBCALL OrgModSetFree PROTO((OrgModPtr omp)); 711 NLM_EXTERN Boolean LIBCALL OrgModSetMatch (OrgModPtr mod1, OrgModPtr mod2); 712 713 typedef struct orgname { 714 Uint1 choice; /* 1=binomial, 2=virus, 3=hybrid, 4=namedhybrid, 5=partial */ 715 Pointer data; /* depends on choice */ 716 CharPtr attrib; /* attribution for this name */ 717 OrgModPtr mod; /* OrgMods */ 718 CharPtr lineage; /* lineage to this org */ 719 Uint1 gcode, /* genetic code using GenBank keys */ 720 mgcode, /* mitochondrial genetic code using GenBank keys..0=none */ 721 pgcode; /* plastid genetic code using GenBank keys..0=none */ 722 CharPtr div; /* GenBank division code */ 723 struct orgname PNTR next; /* for MultiOrgName */ 724 } OrgName, PNTR OrgNamePtr; 725 726 NLM_EXTERN OrgNamePtr LIBCALL OrgNameNew PROTO((void)); 727 NLM_EXTERN Boolean LIBCALL OrgNameAsnWrite PROTO((OrgNamePtr onp, AsnIoPtr aip, AsnTypePtr atp)); 728 NLM_EXTERN OrgNamePtr LIBCALL OrgNameAsnRead PROTO((AsnIoPtr aip, AsnTypePtr atp)); 729 NLM_EXTERN OrgNamePtr LIBCALL OrgNameFree PROTO((OrgNamePtr onp)); 730 731 NLM_EXTERN Boolean LIBCALL OrgNameSetAsnWrite PROTO((OrgNamePtr onp, AsnIoPtr aip, AsnTypePtr set, AsnTypePtr element)); 732 NLM_EXTERN OrgNamePtr LIBCALL OrgNameSetAsnRead PROTO((AsnIoPtr aip, AsnTypePtr set, AsnTypePtr element)); 733 NLM_EXTERN OrgNamePtr LIBCALL OrgNameSetFree PROTO((OrgNamePtr onp)); 734 NLM_EXTERN Boolean LIBCALL OrgNameMatch (OrgNamePtr onp1, OrgNamePtr onp2); 735 736 typedef struct orgref { 737 CharPtr taxname, /* preferred full formal name */ 738 common; /* preferred common name */ 739 ValNodePtr mod; /* unstructured modifiers (Obsolete) */ 740 ValNodePtr db; /* ids in other databases (set of Dbtag pointers)*/ 741 ValNodePtr syn; /* synonyms for taxname and/or common */ 742 OrgNamePtr orgname; /* structured names and components */ 743 } OrgRef, PNTR OrgRefPtr; 744 745 NLM_EXTERN OrgRefPtr LIBCALL OrgRefNew PROTO((void)); 746 NLM_EXTERN Boolean LIBCALL OrgRefAsnWrite PROTO((OrgRefPtr orp, AsnIoPtr aip, AsnTypePtr atp)); 747 NLM_EXTERN OrgRefPtr LIBCALL OrgRefAsnRead PROTO((AsnIoPtr aip, AsnTypePtr atp)); 748 NLM_EXTERN OrgRefPtr LIBCALL OrgRefFree PROTO((OrgRefPtr orp)); 749 NLM_EXTERN Boolean LIBCALL OrgRefMatch (OrgRefPtr orp1, OrgRefPtr orp2); 750 NLM_EXTERN Boolean ValNodeDbtagMatch (ValNodePtr vnp1, ValNodePtr vnp2); 751 NLM_EXTERN Boolean ValNodeStringListMatch (ValNodePtr vnp1, ValNodePtr vnp2); 752 753 /***************************************************************************** 754 * 755 * BioSource 756 * 757 *****************************************************************************/ 758 759 typedef struct subsource { 760 Uint1 subtype; 761 CharPtr name, 762 attrib; 763 struct subsource PNTR next; 764 } SubSource, PNTR SubSourcePtr; 765 766 NLM_EXTERN SubSourcePtr LIBCALL SubSourceNew PROTO((void)); 767 NLM_EXTERN Boolean LIBCALL SubSourceAsnWrite PROTO((SubSourcePtr ssp, AsnIoPtr aip, AsnTypePtr atp)); 768 NLM_EXTERN SubSourcePtr LIBCALL SubSourceAsnRead PROTO((AsnIoPtr aip, AsnTypePtr atp)); 769 NLM_EXTERN SubSourcePtr LIBCALL SubSourceFree PROTO((SubSourcePtr ssp)); 770 771 NLM_EXTERN Boolean LIBCALL SubSourceSetAsnWrite PROTO((SubSourcePtr ssp, AsnIoPtr aip, AsnTypePtr set, AsnTypePtr element)); 772 NLM_EXTERN SubSourcePtr LIBCALL SubSourceSetAsnRead PROTO((AsnIoPtr aip, AsnTypePtr set, AsnTypePtr element)); 773 NLM_EXTERN SubSourcePtr LIBCALL SubSourceSetFree PROTO((SubSourcePtr ssp)); 774 NLM_EXTERN Boolean LIBCALL SubSourceSetMatch (SubSourcePtr ssp1, SubSourcePtr ssp2); 775 776 typedef struct pcrprimer { 777 struct pcrprimer PNTR next; 778 CharPtr seq; 779 CharPtr name; 780 } PCRPrimer, PNTR PCRPrimerPtr; 781 782 NLM_EXTERN PCRPrimerPtr LIBCALL PCRPrimerNew PROTO ((void)); 783 NLM_EXTERN Boolean LIBCALL PCRPrimerAsnWrite PROTO ((PCRPrimerPtr ppp, AsnIoPtr aip, AsnTypePtr atp)); 784 NLM_EXTERN PCRPrimerPtr LIBCALL PCRPrimerAsnRead PROTO ((AsnIoPtr aip, AsnTypePtr atp)); 785 NLM_EXTERN PCRPrimerPtr LIBCALL PCRPrimerFree PROTO ((PCRPrimerPtr ppp)); 786 787 typedef struct pcrprimer PCRPrimerSet, PNTR PCRPrimerSetPtr; 788 #define PCRPrimerSetNew() PCRPrimerNew() 789 790 NLM_EXTERN PCRPrimerSetPtr LIBCALL PCRPrimerSetNew PROTO ((void)); 791 NLM_EXTERN Boolean LIBCALL PCRPrimerSetAsnWrite PROTO ((PCRPrimerSetPtr psp, AsnIoPtr aip, AsnTypePtr atp)); 792 NLM_EXTERN PCRPrimerSetPtr LIBCALL PCRPrimerSetAsnRead PROTO ((AsnIoPtr aip, AsnTypePtr atp)); 793 NLM_EXTERN PCRPrimerSetPtr LIBCALL PCRPrimerSetFree PROTO ((PCRPrimerSetPtr psp)); 794 795 typedef struct pcrreaction { 796 struct pcrreaction PNTR next; 797 PCRPrimerPtr forward; 798 PCRPrimerPtr reverse; 799 } PCRReaction, PNTR PCRReactionPtr; 800 801 NLM_EXTERN PCRReactionPtr LIBCALL PCRReactionNew PROTO ((void)); 802 NLM_EXTERN Boolean LIBCALL PCRReactionAsnWrite PROTO ((PCRReactionPtr prp, AsnIoPtr aip, AsnTypePtr atp)); 803 NLM_EXTERN PCRReactionPtr LIBCALL PCRReactionAsnRead PROTO ((AsnIoPtr aip, AsnTypePtr atp)); 804 NLM_EXTERN PCRReactionPtr LIBCALL PCRReactionFree PROTO ((PCRReactionPtr prp)); 805 806 typedef struct pcrreaction PCRReactionSet, PNTR PCRReactionSetPtr; 807 #define PCRReactionSetNew() PCRReactionNew() 808 809 NLM_EXTERN PCRReactionSetPtr LIBCALL PCRReactionSetNew PROTO ((void)); 810 NLM_EXTERN Boolean LIBCALL PCRReactionSetAsnWrite PROTO ((PCRReactionSetPtr psp, AsnIoPtr aip, AsnTypePtr atp)); 811 NLM_EXTERN PCRReactionSetPtr LIBCALL PCRReactionSetAsnRead PROTO ((AsnIoPtr aip, AsnTypePtr atp)); 812 NLM_EXTERN PCRReactionSetPtr LIBCALL PCRReactionSetFree PROTO ((PCRReactionSetPtr psp)); 813 814 815 816 /****************************** 817 * BioSource 818 current values for genome are: */ 819 /* 0 unknown */ 820 /* 1 genomic */ 821 /* 2 chloroplast */ 822 /* 3 chromoplast */ 823 /* 4 kinteoplast */ 824 /* 5 mitochondrion */ 825 /* 6 plastid */ 826 /* 7 macronuclear */ 827 /* 8 extrachrom */ 828 /* 9 plasmid */ 829 /* 10 transposon */ 830 /* 11 insertion_seq */ 831 /* 12 cyanelle */ 832 /* 13 proviral */ 833 /* 14 virion */ 834 /* Below are new in ASN.1 spec */ 835 /* 15 nucleomorph */ 836 /* 16 apicoplast */ 837 /* 17 leucoplast */ 838 /* 18 proplastid */ 839 /* 19 endogenous_virus */ 840 841 typedef struct biosource { 842 Uint1 genome, 843 origin; 844 OrgRefPtr org; 845 SubSourcePtr subtype; 846 Boolean is_focus; /* is main BioSource for molecule (when multiple) */ 847 PCRReactionSetPtr pcr_primers; 848 } BioSource, PNTR BioSourcePtr; 849 850 NLM_EXTERN BioSourcePtr LIBCALL BioSourceNew PROTO((void)); 851 NLM_EXTERN Boolean LIBCALL BioSourceAsnWrite PROTO((BioSourcePtr bsp, AsnIoPtr aip, AsnTypePtr atp)); 852 NLM_EXTERN BioSourcePtr LIBCALL BioSourceAsnRead PROTO((AsnIoPtr aip, AsnTypePtr atp)); 853 NLM_EXTERN BioSourcePtr LIBCALL BioSourceFree PROTO((BioSourcePtr bsp)); 854 NLM_EXTERN Boolean LIBCALL BioSourceMatch (BioSourcePtr biop1, BioSourcePtr biop2); 855 856 /***************************************************************************** 857 * 858 * ProtRef 859 * 860 *****************************************************************************/ 861 typedef struct protref { 862 ValNodePtr name; 863 CharPtr desc; 864 ValNodePtr ec, 865 activity; 866 ValNodePtr db; /* ids in other databases */ 867 Uint1 processed; /* 0=not-set, 1=preprotein, 2=mature protein, 3=signal peptide, 868 4=transit peptide, 5=propeptide */ 869 } ProtRef, PNTR ProtRefPtr; 870 871 NLM_EXTERN ProtRefPtr LIBCALL ProtRefNew PROTO((void)); 872 NLM_EXTERN Boolean LIBCALL ProtRefAsnWrite PROTO((ProtRefPtr orp, AsnIoPtr aip, AsnTypePtr atp)); 873 NLM_EXTERN ProtRefPtr LIBCALL ProtRefAsnRead PROTO((AsnIoPtr aip, AsnTypePtr atp)); 874 NLM_EXTERN ProtRefPtr LIBCALL ProtRefFree PROTO((ProtRefPtr orp)); 875 NLM_EXTERN ProtRefPtr LIBCALL ProtRefDup PROTO((ProtRefPtr orp)); 876 877 /***************************************************************************** 878 * 879 * RsiteRef 880 * uses an ValNode 881 * choice = 1 = str 882 * 2 = db 883 * 884 *****************************************************************************/ 885 typedef ValNode RsiteRef, FAR *RsiteRefPtr; 886 887 NLM_EXTERN Boolean LIBCALL RsiteRefAsnWrite PROTO((RsiteRefPtr orp, AsnIoPtr aip, AsnTypePtr atp)); 888 NLM_EXTERN RsiteRefPtr LIBCALL RsiteRefAsnRead PROTO((AsnIoPtr aip, AsnTypePtr atp)); 889 NLM_EXTERN RsiteRefPtr LIBCALL RsiteRefFree PROTO((RsiteRefPtr orp)); 890 891 /***************************************************************************** 892 * 893 * Txinit 894 * Transcription initiation site 895 * 896 *****************************************************************************/ 897 typedef struct txevidence { 898 Uint1 exp_code , 899 exp_sys ; 900 Boolean low_prec_data , 901 from_homolog; 902 struct txevidence PNTR next; 903 } TxEvidence, PNTR TxEvidencePtr; 904 905 typedef struct txinit { 906 CharPtr name; 907 ValNodePtr syn , 908 gene , 909 protein , 910 rna ; 911 CharPtr expression; 912 Uint1 txsystem; 913 CharPtr txdescr; 914 OrgRefPtr txorg; 915 Boolean mapping_precise, 916 location_accurate; 917 Uint1 inittype; /* 255 if not set */ 918 TxEvidencePtr evidence; 919 } Txinit, PNTR TxinitPtr; 920 921 NLM_EXTERN TxinitPtr LIBCALL TxinitNew PROTO((void)); 922 NLM_EXTERN Boolean LIBCALL TxinitAsnWrite PROTO((TxinitPtr txp, AsnIoPtr aip, AsnTypePtr atp)); 923 NLM_EXTERN TxinitPtr LIBCALL TxinitAsnRead PROTO((AsnIoPtr aip, AsnTypePtr atp)); 924 NLM_EXTERN TxinitPtr LIBCALL TxinitFree PROTO((TxinitPtr txp)); 925 926 927 /************************************************** 928 * 929 * CloneSeq 930 * 931 **************************************************/ 932 typedef struct clone_seq { 933 struct clone_seq PNTR next; 934 Uint4 OBbits__; 935 Int4 type; 936 #define OB__Clone_seq_confidence 0 937 Int4 confidence; 938 ValNodePtr location; 939 ValNodePtr seq; 940 DbtagPtr align_id; 941 #define OB__Clone_seq_support 1 942 943 Int4 support; 944 } CloneSeq, PNTR CloneSeqPtr; 945 946 947 NLM_EXTERN CloneSeqPtr LIBCALL CloneSeqFree PROTO ((CloneSeqPtr )); 948 NLM_EXTERN CloneSeqPtr LIBCALL CloneSeqNew PROTO (( void )); 949 NLM_EXTERN CloneSeqPtr LIBCALL CloneSeqAsnRead PROTO (( AsnIoPtr, AsnTypePtr)); 950 NLM_EXTERN Boolean LIBCALL CloneSeqAsnWrite PROTO (( CloneSeqPtr , AsnIoPtr, AsnTypePtr)); 951 952 953 /************************************************** 954 * 955 * CloneSeqSet 956 * 957 **************************************************/ 958 typedef struct clone_seq CloneSeqSet; 959 typedef struct clone_seq PNTR CloneSeqSetPtr; 960 #define CloneSeqSetNew() Clone_seqNew() 961 962 NLM_EXTERN CloneSeqSetPtr LIBCALL CloneSeqSetFree PROTO ((CloneSeqSetPtr )); 963 NLM_EXTERN CloneSeqSetPtr LIBCALL CloneSeqSetNew PROTO (( void )); 964 NLM_EXTERN CloneSeqSetPtr LIBCALL CloneSeqSetAsnRead PROTO (( AsnIoPtr, AsnTypePtr)); 965 NLM_EXTERN Boolean LIBCALL CloneSeqSetAsnWrite PROTO (( CloneSeqSetPtr , AsnIoPtr, AsnTypePtr)); 966 967 /************************************************** 968 * 969 * CloneRef 970 * 971 **************************************************/ 972 typedef struct clone_ref { 973 Uint4 OBbits__; 974 CharPtr name; 975 CharPtr library; 976 Uint1 concordant; 977 Uint1 unique; 978 #define OB__Clone_ref_placement_method 0 979 Int4 placement_method; 980 CloneSeqPtr clone_seq; 981 } CloneRef, PNTR CloneRefPtr; 982 983 984 NLM_EXTERN CloneRefPtr LIBCALL CloneRefFree PROTO ((CloneRefPtr )); 985 NLM_EXTERN CloneRefPtr LIBCALL CloneRefNew PROTO (( void )); 986 NLM_EXTERN CloneRefPtr LIBCALL CloneRefAsnRead PROTO (( AsnIoPtr, AsnTypePtr)); 987 NLM_EXTERN Boolean LIBCALL CloneRefAsnWrite PROTO (( CloneRefPtr , AsnIoPtr, AsnTypePtr)); 988 989 990 /************************************************** 991 * 992 * Phenotype 993 * 994 **************************************************/ 995 typedef struct phenotype { 996 struct phenotype PNTR next; 997 Uint4 OBbits__; 998 CharPtr source; 999 CharPtr term; 1000 ValNodePtr xref; 1001 #define OB__Phenotype_clinical_significance 0 1002 1003 Int4 clinical_significance; 1004 } Phenotype, PNTR PhenotypePtr; 1005 1006 1007 NLM_EXTERN PhenotypePtr LIBCALL PhenotypeFree PROTO ((PhenotypePtr )); 1008 NLM_EXTERN PhenotypePtr LIBCALL PhenotypeNew PROTO (( void )); 1009 NLM_EXTERN PhenotypePtr LIBCALL PhenotypeAsnRead PROTO (( AsnIoPtr, AsnTypePtr)); 1010 NLM_EXTERN Boolean LIBCALL PhenotypeAsnWrite PROTO (( PhenotypePtr , AsnIoPtr, AsnTypePtr)); 1011 1012 1013 1014 /************************************************** 1015 * 1016 * PopulationData 1017 * 1018 **************************************************/ 1019 typedef struct population_data { 1020 struct population_data PNTR next; 1021 Uint4 OBbits__; 1022 CharPtr population; 1023 #define OB__Population_data_genotype_frequency 0 1024 1025 FloatHi genotype_frequency; 1026 #define OB__Population_data_chromosomes_tested 1 1027 1028 Int4 chromosomes_tested; 1029 ValNodePtr sample_ids; 1030 #define OB__Population_data_allele_frequency 2 1031 1032 FloatHi allele_frequency; 1033 #define OB__Population_data_flags 3 1034 1035 Int4 flags; 1036 } PopulationData, PNTR PopulationDataPtr; 1037 1038 1039 NLM_EXTERN PopulationDataPtr LIBCALL PopulationDataFree PROTO ((PopulationDataPtr )); 1040 NLM_EXTERN PopulationDataPtr LIBCALL PopulationDataNew PROTO (( void )); 1041 NLM_EXTERN PopulationDataPtr LIBCALL PopulationDataAsnRead PROTO (( AsnIoPtr, AsnTypePtr)); 1042 NLM_EXTERN Boolean LIBCALL PopulationDataAsnWrite PROTO (( PopulationDataPtr , AsnIoPtr, AsnTypePtr)); 1043 1044 1045 1046 /************************************************** 1047 * 1048 * VariantProperties 1049 * 1050 **************************************************/ 1051 typedef struct struct_VariantProperties { 1052 Uint4 OBbits__; 1053 Int4 version; 1054 #define OB__VariantProperties_resource_link 0 1055 1056 Int4 resource_link; 1057 #define OB__VariantProperties_gene_location 1 1058 1059 Int4 gene_location; 1060 #define OB__VariantProperties_effect 2 1061 1062 Int4 effect; 1063 #define OB__VariantProperties_mapping 3 1064 1065 Int4 mapping; 1066 #define OB__VariantProperties_map_weight 4 1067 1068 Int4 map_weight; 1069 #define OB__frequency_based_validation 5 1070 1071 Int4 freq_based_validation; 1072 #define OB__VariantProperties_genotype 6 1073 1074 Int4 genotype; 1075 ValNodePtr project_data; 1076 #define OB__VariantProperties_quality_check 7 1077 1078 Int4 quality_check; 1079 #define OB__VariantProperties_confidence 8 1080 1081 Int4 confidence; 1082 #define OB__VariantProperties_other_validation 9 1083 1084 Uint1 other_validation; 1085 #define OB__VariantProperties_allele_origin 10 1086 1087 Int4 allele_origin; 1088 #define OB__VariantProperties_allele_state 11 1089 1090 Int4 allele_state; 1091 #define OB__VariantProperties_allele_frequency 12 1092 1093 FloatHi allele_frequency; 1094 #define OB__VariantProperties_is_ancestral_allele 13 1095 1096 Uint1 is_ancestral_allele; 1097 } VariantProperties, PNTR VariantPropertiesPtr; 1098 1099 1100 NLM_EXTERN VariantPropertiesPtr LIBCALL VariantPropertiesFree PROTO ((VariantPropertiesPtr )); 1101 NLM_EXTERN VariantPropertiesPtr LIBCALL VariantPropertiesNew PROTO (( void )); 1102 NLM_EXTERN VariantPropertiesPtr LIBCALL VariantPropertiesAsnRead PROTO (( AsnIoPtr, AsnTypePtr)); 1103 NLM_EXTERN Boolean LIBCALL VariantPropertiesAsnWrite PROTO (( VariantPropertiesPtr , AsnIoPtr, AsnTypePtr)); 1104 1105 1106 1107 /************************************************** 1108 * 1109 * ExtLoc 1110 * 1111 **************************************************/ 1112 typedef struct ext_loc { 1113 struct ext_loc PNTR next; 1114 Uint4 OBbits__; 1115 ObjectIdPtr id; 1116 SeqLocPtr location; 1117 } ExtLoc, PNTR ExtLocPtr; 1118 1119 1120 NLM_EXTERN ExtLocPtr LIBCALL ExtLocFree PROTO ((ExtLocPtr )); 1121 NLM_EXTERN ExtLocPtr LIBCALL ExtLocNew PROTO (( void )); 1122 NLM_EXTERN ExtLocPtr LIBCALL ExtLocAsnRead PROTO (( AsnIoPtr, AsnTypePtr)); 1123 NLM_EXTERN Boolean LIBCALL ExtLocAsnWrite PROTO (( ExtLocPtr , AsnIoPtr, AsnTypePtr)); 1124 1125 1126 /************************************************** 1127 * 1128 * SomaticOriginCondition 1129 * 1130 **************************************************/ 1131 1132 typedef struct somatic_origin_condition { 1133 Uint4 OBbits__; 1134 CharPtr description; 1135 ValNodePtr object_id; 1136 } SomaticOriginCondition, PNTR SomaticOriginConditionPtr; 1137 1138 NLM_EXTERN SomaticOriginConditionPtr LIBCALL SomaticOriginConditionFree PROTO ((SomaticOriginConditionPtr )); 1139 NLM_EXTERN SomaticOriginConditionPtr LIBCALL SomaticOriginConditionNew PROTO (( void )); 1140 NLM_EXTERN SomaticOriginConditionPtr LIBCALL SomaticOriginConditionAsnRead PROTO (( AsnIoPtr, AsnTypePtr)); 1141 NLM_EXTERN Boolean LIBCALL SomaticOriginConditionAsnWrite PROTO (( SomaticOriginConditionPtr , AsnIoPtr, AsnTypePtr)); 1142 1143 /************************************************** 1144 * 1145 * SomaticOrigin 1146 * 1147 **************************************************/ 1148 1149 typedef struct somatic_origin { 1150 Uint4 OBbits__; 1151 SubSourcePtr source; 1152 SomaticOriginConditionPtr condition; 1153 } SomaticOrigin, PNTR SomaticOriginPtr; 1154 1155 NLM_EXTERN SomaticOriginPtr LIBCALL SomaticOriginFree PROTO ((SomaticOriginPtr )); 1156 NLM_EXTERN SomaticOriginPtr LIBCALL SomaticOriginNew PROTO (( void )); 1157 NLM_EXTERN SomaticOriginPtr LIBCALL SomaticOriginAsnRead PROTO (( AsnIoPtr, AsnTypePtr)); 1158 NLM_EXTERN Boolean LIBCALL SomaticOriginAsnWrite PROTO (( SomaticOriginPtr , AsnIoPtr, AsnTypePtr)); 1159 1160 /************************************************** 1161 * 1162 * VariationRef 1163 * 1164 **************************************************/ 1165 typedef struct variation_ref { 1166 struct variation_ref PNTR next; 1167 Uint4 OBbits__; 1168 DbtagPtr id; 1169 DbtagPtr parent_id; 1170 ObjectIdPtr sample_id; 1171 ValNodePtr other_ids; 1172 CharPtr name; 1173 ValNodePtr synonyms; 1174 CharPtr description; 1175 ValNodePtr phenotype; 1176 ValNodePtr method; 1177 ValNodePtr population_data; 1178 VariantPropertiesPtr variant_prop; 1179 #define OB__Variation_ref_validated 0 1180 1181 Uint1 validated; 1182 ValNodePtr clinical_test; 1183 #define OB__Variation_ref_allele_origin 1 1184 1185 Int4 allele_origin; 1186 #define OB__Variation_ref_allele_state 2 1187 1188 Int4 allele_state; 1189 #define OB__Variation_ref_allele_frequency 3 1190 1191 FloatHi allele_frequency; 1192 #define OB__Variation_ref_is_ancestral_allele 4 1193 1194 Uint1 is_ancestral_allele; 1195 ValNodePtr pub; 1196 ValNodePtr data; 1197 ValNodePtr consequence; 1198 ValNodePtr location; 1199 ValNodePtr ext_locs; 1200 UserObjectPtr ext; 1201 ValNodePtr somatic_origin; 1202 } VariationRef, PNTR VariationRefPtr; 1203 1204 1205 NLM_EXTERN VariationRefPtr LIBCALL VariationRefFree PROTO ((VariationRefPtr )); 1206 NLM_EXTERN VariationRefPtr LIBCALL VariationRefNew PROTO (( void )); 1207 NLM_EXTERN VariationRefPtr LIBCALL VariationRefAsnRead PROTO (( AsnIoPtr, AsnTypePtr)); 1208 NLM_EXTERN Boolean LIBCALL VariationRefAsnWrite PROTO (( VariationRefPtr , AsnIoPtr, AsnTypePtr)); 1209 1210 typedef ValNodePtr ConsequencePtr; 1211 typedef ValNode Consequence; 1212 1213 NLM_EXTERN ConsequencePtr LIBCALL ConsequenceFree PROTO ((ConsequencePtr )); 1214 NLM_EXTERN ConsequencePtr LIBCALL ConsequenceAsnRead PROTO (( AsnIoPtr, AsnTypePtr)); 1215 NLM_EXTERN Boolean LIBCALL ConsequenceAsnWrite PROTO (( ConsequencePtr , AsnIoPtr, AsnTypePtr)); 1216 1217 typedef ValNodePtr Consequence_elementPtr; 1218 typedef ValNode Consequence_element; 1219 1220 #define Consequence_unknown 1 1221 #define Consequence_splicing 2 1222 #define Consequence_note 3 1223 #define Consequence_variation 4 1224 #define Consequence_Consequence_Frameshift 5 1225 #define Consequence_Consequence_LossOfHeterozygosity 6 1226 1227 NLM_EXTERN Consequence_elementPtr LIBCALL Consequence_elementFree PROTO ((Consequence_elementPtr )); 1228 NLM_EXTERN Consequence_elementPtr LIBCALL Consequence_elementAsnRead PROTO (( AsnIoPtr, AsnTypePtr)); 1229 NLM_EXTERN Boolean LIBCALL Consequence_elementAsnWrite PROTO (( Consequence_elementPtr , AsnIoPtr, AsnTypePtr)); 1230 1231 /************************************************** 1232 * 1233 * Consequence_loss_of_heterozygosity 1234 * 1235 **************************************************/ 1236 1237 typedef struct consequence_LossOfHeterozygosity { 1238 Uint4 OBbits__; 1239 CharPtr reference; 1240 CharPtr test; 1241 } Consequence_loss_of_heterozygosity, PNTR Consequence_loss_of_heterozygosityPtr; 1242 1243 NLM_EXTERN Consequence_loss_of_heterozygosityPtr LIBCALL Consequence_loss_of_heterozygosityFree PROTO ((Consequence_loss_of_heterozygosityPtr )); 1244 NLM_EXTERN Consequence_loss_of_heterozygosityPtr LIBCALL Consequence_loss_of_heterozygosityNew PROTO (( void )); 1245 NLM_EXTERN Consequence_loss_of_heterozygosityPtr LIBCALL Consequence_loss_of_heterozygosityAsnRead PROTO (( AsnIoPtr, AsnTypePtr)); 1246 NLM_EXTERN Boolean LIBCALL Consequence_loss_of_heterozygosityAsnWrite PROTO (( Consequence_loss_of_heterozygosityPtr , AsnIoPtr, AsnTypePtr)); 1247 1248 1249 /************************************************** 1250 * 1251 * Consequence_frameshift 1252 * 1253 **************************************************/ 1254 1255 typedef struct consequence_Frameshift { 1256 Uint4 OBbits__; 1257 #define OB__frameshift_phase 0 1258 1259 Int4 phase; 1260 #define OB__frameshift_x_length 1 1261 1262 Int4 x_length; 1263 } Consequence_frameshift, PNTR Consequence_frameshiftPtr; 1264 1265 NLM_EXTERN Consequence_frameshiftPtr LIBCALL Consequence_frameshiftFree PROTO ((Consequence_frameshiftPtr )); 1266 NLM_EXTERN Consequence_frameshiftPtr LIBCALL Consequence_frameshiftNew PROTO (( void )); 1267 NLM_EXTERN Consequence_frameshiftPtr LIBCALL Consequence_frameshiftAsnRead PROTO (( AsnIoPtr, AsnTypePtr)); 1268 NLM_EXTERN Boolean LIBCALL Consequence_frameshiftAsnWrite PROTO (( Consequence_frameshiftPtr , AsnIoPtr, AsnTypePtr)); 1269 1270 typedef ValNodePtr VarRefDataPtr; 1271 typedef ValNode VarRefData; 1272 1273 #define VarRefData_unknown 1 1274 #define VarRefData_note 2 1275 #define VarRefData_uniparental_disomy 3 1276 #define VarRefData_instance 4 1277 #define VarRefData_set 5 1278 #define VarRefData_complex 6 1279 1280 NLM_EXTERN VarRefDataPtr LIBCALL VarRefDataFree PROTO ((VarRefDataPtr )); 1281 NLM_EXTERN VarRefDataPtr LIBCALL VarRefDataAsnRead PROTO (( AsnIoPtr, AsnTypePtr)); 1282 NLM_EXTERN Boolean LIBCALL VarRefDataAsnWrite PROTO (( VarRefDataPtr , AsnIoPtr, AsnTypePtr)); 1283 1284 1285 /************************************************** 1286 * 1287 * Data_set 1288 * 1289 **************************************************/ 1290 1291 typedef struct varRefData_Set { 1292 Uint4 OBbits__; 1293 Int4 type; 1294 ValNodePtr variations; 1295 CharPtr name; 1296 } VarRefDataSet, PNTR VarRefDataSetPtr; 1297 1298 NLM_EXTERN VarRefDataSetPtr LIBCALL VarRefDataSetFree PROTO ((VarRefDataSetPtr )); 1299 NLM_EXTERN VarRefDataSetPtr LIBCALL VarRefDataSetNew PROTO (( void )); 1300 NLM_EXTERN VarRefDataSetPtr LIBCALL VarRefDataSetAsnRead PROTO (( AsnIoPtr, AsnTypePtr)); 1301 NLM_EXTERN Boolean LIBCALL VarRefDataSetAsnWrite PROTO (( VarRefDataSetPtr , AsnIoPtr, AsnTypePtr)); 1302 1303 1304 /************************************************** 1305 * 1306 * DeltaItem 1307 * 1308 **************************************************/ 1309 typedef struct delta_item { 1310 struct delta_item PNTR next; 1311 Uint4 OBbits__; 1312 ValNodePtr Seq_seq; 1313 #define OB__Delta_item_multiplier 0 1314 1315 Int4 multiplier; 1316 IntFuzzPtr multiplier_fuzz; 1317 Int4 action; 1318 } DeltaItem, PNTR DeltaItemPtr; 1319 1320 1321 NLM_EXTERN DeltaItemPtr LIBCALL DeltaItemFree PROTO ((DeltaItemPtr )); 1322 NLM_EXTERN DeltaItemPtr LIBCALL DeltaItemNew PROTO (( void )); 1323 NLM_EXTERN DeltaItemPtr LIBCALL DeltaItemAsnRead PROTO (( AsnIoPtr, AsnTypePtr)); 1324 NLM_EXTERN Boolean LIBCALL DeltaItemAsnWrite PROTO (( DeltaItemPtr , AsnIoPtr, AsnTypePtr)); 1325 1326 1327 /************************************************** 1328 * 1329 * VariationInst 1330 * 1331 **************************************************/ 1332 typedef struct variation_inst { 1333 Uint4 OBbits__; 1334 Int4 type; 1335 ValNodePtr delta; 1336 #define OB__Variation_inst_observation 0 1337 1338 Int4 observation; 1339 } VariationInst, PNTR VariationInstPtr; 1340 1341 1342 NLM_EXTERN VariationInstPtr LIBCALL VariationInstFree PROTO ((VariationInstPtr )); 1343 NLM_EXTERN VariationInstPtr LIBCALL VariationInstNew PROTO (( void )); 1344 NLM_EXTERN VariationInstPtr LIBCALL VariationInstAsnRead PROTO (( AsnIoPtr, AsnTypePtr)); 1345 NLM_EXTERN Boolean LIBCALL VariationInstAsnWrite PROTO (( VariationInstPtr , AsnIoPtr, AsnTypePtr)); 1346 1347 1348 1349 typedef ValNodePtr Seq_seqPtr; 1350 typedef ValNode Seq_seq; 1351 1352 #define Seq_seq_literal 1 1353 #define Seq_seq_loc 2 1354 #define Seq_seq_this__ 3 1355 1356 NLM_EXTERN Seq_seqPtr LIBCALL Seq_seqFree PROTO ((Seq_seqPtr )); 1357 NLM_EXTERN Seq_seqPtr LIBCALL Seq_seqAsnRead PROTO (( AsnIoPtr, AsnTypePtr)); 1358 NLM_EXTERN Boolean LIBCALL Seq_seqAsnWrite PROTO (( Seq_seqPtr , AsnIoPtr, AsnTypePtr)); 1359 1360 1361 1362 #ifdef __cplusplus 1363 } 1364 #endif 1365 1366 #undef NLM_EXTERN 1367 #ifdef NLM_EXPORT 1368 #define NLM_EXTERN NLM_EXPORT 1369 #else 1370 #define NLM_EXTERN 1371 #endif 1372 1373 #endif 1374 1375