1 /* objseq.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: objseq.h 27 * 28 * Author: James Ostell 29 * 30 * Version Creation Date: 4/1/91 31 * 32 * $Revision: 6.12 $ 33 * 34 * File Description: Object manager interface for module NCBI-Seq 35 * 36 * Modifications: 37 * -------------------------------------------------------------------------- 38 * Date Name Description of modification 39 * ------- ---------- ----------------------------------------------------- 40 * 41 * ========================================================================== 42 */ 43 44 #ifndef _NCBI_Seq_ 45 #define _NCBI_Seq_ 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_Seqalign_ 60 #include <objalign.h> 61 #endif 62 #ifndef _NCBI_Pubdesc_ 63 #include <objpubd.h> /* separated out to avoid typedef order problems */ 64 #endif 65 #ifndef _NCBI_Seqfeat_ 66 #include <objfeat.h> /* include organism for now */ 67 #endif 68 #ifndef _NCBI_Seqres_ 69 #include <objres.h> 70 #endif 71 #ifndef _NCBI_SeqBlock_ 72 #include <objblock.h> 73 #endif 74 #ifndef _NCBI_SeqCode_ 75 #include <objcode.h> 76 #endif 77 78 #undef NLM_EXTERN 79 #ifdef NLM_IMPORT 80 #define NLM_EXTERN NLM_IMPORT 81 #else 82 #define NLM_EXTERN extern 83 #endif 84 85 #ifdef __cplusplus 86 extern "C" { 87 #endif 88 89 typedef ValNode SeqEntry, FAR *SeqEntryPtr; 90 91 /***************************************************************************** 92 * 93 * loader 94 * 95 *****************************************************************************/ 96 NLM_EXTERN Boolean LIBCALL SeqAsnLoad PROTO((void)); 97 98 /***************************************************************************** 99 * 100 * internal structures for NCBI-Seq objects 101 * 102 *****************************************************************************/ 103 104 /***************************************************************************** 105 * 106 * SeqAnnot - Sequence annotations 107 * 108 *****************************************************************************/ 109 110 /***************************************************************************** 111 * 112 * TextAnnotId 113 * 114 *****************************************************************************/ 115 typedef struct textannotid { 116 CharPtr name, 117 accession, 118 release; 119 Int2 version; /* INT2_MIN (ncbilcl.h) = not set */ 120 } TextAnnotId, PNTR TextAnnotIdPtr; 121 122 NLM_EXTERN TextAnnotIdPtr LIBCALL TextAnnotIdNew PROTO((void)); 123 NLM_EXTERN Boolean LIBCALL TextAnnotIdAsnWrite PROTO((TextAnnotIdPtr tsip, AsnIoPtr aip, AsnTypePtr atp)); 124 NLM_EXTERN TextAnnotIdPtr LIBCALL TextAnnotIdAsnRead PROTO((AsnIoPtr aip, AsnTypePtr atp)); 125 NLM_EXTERN TextAnnotIdPtr LIBCALL TextAnnotIdFree PROTO((TextAnnotIdPtr tsip)); 126 127 /***************************************************************************** 128 * 129 * AnnotId is a choice using an ValNode, most types in data.ptrvalue 130 * except integers, in data.intvalue 131 * choice: 132 * 0 = not set 133 1 = local Object-id , -- local use 134 2 = ncbi INTEGER , 135 3 = general Dbtag , -- any database 136 4 = other Textannot-id 137 * 138 *****************************************************************************/ 139 140 typedef ValNode AnnotId, PNTR AnnotIdPtr; 141 142 #define ANNOTID_NOT_SET ( (Uint1)0) 143 #define ANNOTID_LOCAL ( (Uint1)1) 144 #define ANNOTID_NCBI ( (Uint1)2) 145 #define ANNOTID_GENERAL ((Uint1)3) 146 #define ANNOTID_OTHER ((Uint1)4) 147 148 NLM_EXTERN Boolean LIBCALL AnnotIdAsnWrite PROTO((AnnotIdPtr anp, AsnIoPtr aip, AsnTypePtr atp)); 149 NLM_EXTERN AnnotIdPtr LIBCALL AnnotIdAsnRead PROTO((AsnIoPtr aip, AsnTypePtr atp)); 150 NLM_EXTERN AnnotIdPtr LIBCALL AnnotIdFree PROTO((AnnotIdPtr anp)); 151 152 /***************************************************************************** 153 * 154 * These routines process sets or sequences of AnnotId's 155 * 156 *****************************************************************************/ 157 NLM_EXTERN Boolean LIBCALL AnnotIdSetAsnWrite PROTO((AnnotIdPtr anp, AsnIoPtr aip, AsnTypePtr settype, AsnTypePtr elementtype)); 158 NLM_EXTERN AnnotIdPtr LIBCALL AnnotIdSetAsnRead PROTO((AsnIoPtr aip, AsnTypePtr settype, AsnTypePtr elementtype)); 159 NLM_EXTERN AnnotIdPtr LIBCALL AnnotIdSetFree PROTO((AnnotIdPtr anp)); 160 161 /***************************************************************************** 162 * 163 * AlignDef 164 * used to describe a set of alignments in a SeqAnnot 165 * align_type 166 * ALIGN_TYPE_REF set of pairwise alignments to one "master" sequence 167 * ALIGN_TYPE_ALT set of alternate alignments of the same seqs 168 * ALIGN_TYPE_BLOCKS set of (unordered) aligned blocks 169 * ids SeqIds used in alignments 170 * currently only used for ALIGN_TYPE_REF, where the one SeqId of 171 * the "master" sequence is given (one SeqId) 172 * 173 *****************************************************************************/ 174 typedef struct aligndef { 175 Uint1 align_type; 176 SeqIdPtr ids; 177 } AlignDef, PNTR AlignDefPtr; 178 179 #define ALIGN_TYPE_REF 1 180 #define ALIGN_TYPE_ALT 2 181 #define ALIGN_TYPE_BLOCKS 3 182 #define ALIGN_TYPE_OTHER 255 183 184 NLM_EXTERN AlignDefPtr LIBCALL AlignDefNew PROTO((void)); 185 NLM_EXTERN Boolean LIBCALL AlignDefAsnWrite PROTO((AlignDefPtr adp, AsnIoPtr aip, AsnTypePtr atp)); 186 NLM_EXTERN AlignDefPtr LIBCALL AlignDefAsnRead PROTO((AsnIoPtr aip, AsnTypePtr atp)); 187 NLM_EXTERN AlignDefPtr LIBCALL AlignDefFree PROTO((AlignDefPtr adp)); 188 189 /***************************************************************************** 190 * 191 * AnnotDescr uses an ValNode with choice = 192 1 = name VisibleString , -- a name for this annotation 193 2 = title VisibleString , -- a title for this annotation 194 3 = comment VisibleString , -- a more extensive comment 195 4 = pub Pubdesc -- a reference to the publication 196 5 = user UserObject -- user structured data object 197 6 = create-date Date -- date entry created 198 7 = update-date Date -- date of last update 199 8 = src Seq-id -- SeqId of entry this came from 200 9 = align Align-def -- Align-def pointer 201 10= region Seq-loc -- Seq-loc of region covered by this annot 202 203 types with * use data.intvalue. Other use data.ptrvalue 204 ** uses a chain of ValNodes which use data.intvalue for enumerated type 205 * 206 *****************************************************************************/ 207 #define Annot_descr_name 1 208 #define Annot_descr_title 2 209 #define Annot_descr_comment 3 210 #define Annot_descr_pub 4 211 #define Annot_descr_user 5 212 #define Annot_descr_create_date 6 213 #define Annot_descr_update_date 7 214 #define Annot_descr_src 8 215 #define Annot_descr_align 9 216 #define Annot_descr_region 10 217 218 typedef ValNode AnnotDescr, PNTR AnnotDescrPtr; 219 220 #define AnnotDescrNew SeqDescrNew 221 NLM_EXTERN Boolean LIBCALL AnnotDescrAsnWrite PROTO((AnnotDescrPtr anp, AsnIoPtr aip, AsnTypePtr atp)); 222 NLM_EXTERN AnnotDescrPtr LIBCALL AnnotDescrAsnRead PROTO((AsnIoPtr aip, AsnTypePtr atp)); 223 NLM_EXTERN AnnotDescrPtr LIBCALL AnnotDescrFree PROTO((AnnotDescrPtr anp)); 224 225 typedef ValNode AnnotDesc, PNTR AnnotDescPtr; 226 227 NLM_EXTERN Boolean LIBCALL AnnotDescAsnWrite PROTO((AnnotDescPtr anp, AsnIoPtr aip, AsnTypePtr atp)); 228 NLM_EXTERN AnnotDescPtr LIBCALL AnnotDescAsnRead PROTO((AsnIoPtr aip, AsnTypePtr atp)); 229 NLM_EXTERN AnnotDescPtr LIBCALL AnnotDescFree PROTO((AnnotDescPtr anp)); 230 NLM_EXTERN Int2 LIBCALL AnnotDescLabel PROTO((AnnotDescPtr anp, CharPtr buffer, Int2 buflen, Boolean content)); 231 232 233 typedef struct seqannot { 234 AnnotIdPtr id; 235 Uint1 db; 236 CharPtr name; 237 AnnotDescrPtr desc; 238 Uint1 type; /* 1=ftable, 2=align, 3=graph 4=ids 5=locs */ 239 Pointer data; 240 struct seqannot PNTR next; 241 GatherIndex idx; /* internal gather/objmgr tracking fields */ 242 } SeqAnnot, PNTR SeqAnnotPtr; 243 244 NLM_EXTERN SeqAnnotPtr LIBCALL SeqAnnotNew PROTO((void)); 245 NLM_EXTERN Boolean LIBCALL SeqAnnotAsnWrite PROTO((SeqAnnotPtr sap, AsnIoPtr aip, AsnTypePtr atp)); 246 NLM_EXTERN SeqAnnotPtr LIBCALL SeqAnnotAsnRead PROTO((AsnIoPtr aip, AsnTypePtr atp)); 247 NLM_EXTERN SeqAnnotPtr LIBCALL SeqAnnotFree PROTO((SeqAnnotPtr sap)); 248 NLM_EXTERN Int2 LIBCALL SeqAnnotLabel PROTO((SeqAnnotPtr sap, CharPtr buffer, Int2 buflen, Uint1 content)); 249 250 /***************************************************************************** 251 * 252 * Sets of SeqAnnots 253 * 254 *****************************************************************************/ 255 NLM_EXTERN Boolean LIBCALL SeqAnnotSetAsnWrite PROTO((SeqAnnotPtr sap, AsnIoPtr aip, AsnTypePtr set, AsnTypePtr element)); 256 NLM_EXTERN SeqAnnotPtr LIBCALL SeqAnnotSetAsnRead PROTO((AsnIoPtr aip, AsnTypePtr set, AsnTypePtr element)); 257 258 /** SeqAnnotSetExtraCheck looks for extra Features from SeqEntryAsnOut 259 and adds them to the stream when the annot pointer is NULL 260 *********/ 261 NLM_EXTERN Boolean LIBCALL SeqAnnotSetExtraCheck (AsnIoPtr aip, AsnTypePtr set, AsnTypePtr element); 262 263 264 /***************************************************************************** 265 * 266 * SeqHist 267 * 268 *****************************************************************************/ 269 typedef struct seqhist { 270 SeqAlignPtr assembly; 271 DatePtr replace_date; 272 SeqIdPtr replace_ids; 273 DatePtr replaced_by_date; 274 SeqIdPtr replaced_by_ids; 275 Boolean deleted; 276 DatePtr deleted_date; 277 } SeqHist, PNTR SeqHistPtr; 278 279 NLM_EXTERN SeqHistPtr LIBCALL SeqHistNew PROTO((void)); 280 NLM_EXTERN Boolean LIBCALL SeqHistAsnWrite PROTO((SeqHistPtr shp, AsnIoPtr aip, AsnTypePtr atp)); 281 NLM_EXTERN SeqHistPtr LIBCALL SeqHistAsnRead PROTO((AsnIoPtr aip, AsnTypePtr atp)); 282 NLM_EXTERN SeqHistPtr LIBCALL SeqHistFree PROTO((SeqHistPtr shp)); 283 284 285 /************************************************** 286 * 287 * LinkageEvidence 288 * 289 **************************************************/ 290 typedef struct struct_Linkage_evidence { 291 struct struct_Linkage_evidence PNTR next; 292 Int4 type; 293 } LinkageEvidence, PNTR LinkageEvidencePtr; 294 295 296 NLM_EXTERN LinkageEvidencePtr LIBCALL LinkageEvidenceFree PROTO ((LinkageEvidencePtr )); 297 NLM_EXTERN LinkageEvidencePtr LIBCALL LinkageEvidenceNew PROTO (( void )); 298 NLM_EXTERN LinkageEvidencePtr LIBCALL LinkageEvidenceAsnRead PROTO (( AsnIoPtr, AsnTypePtr)); 299 NLM_EXTERN Boolean LIBCALL LinkageEvidenceAsnWrite PROTO (( LinkageEvidencePtr , AsnIoPtr, AsnTypePtr)); 300 301 /************************************************** 302 * 303 * SeqGap 304 * 305 **************************************************/ 306 typedef struct struct_Seq_gap { 307 Int4 type; 308 Int4 linkage; 309 ValNodePtr linkage_evidence; 310 } SeqGap, PNTR SeqGapPtr; 311 312 313 NLM_EXTERN SeqGapPtr LIBCALL SeqGapFree PROTO ((SeqGapPtr )); 314 NLM_EXTERN SeqGapPtr LIBCALL SeqGapNew PROTO (( void )); 315 NLM_EXTERN SeqGapPtr LIBCALL SeqGapAsnRead PROTO (( AsnIoPtr, AsnTypePtr)); 316 NLM_EXTERN Boolean LIBCALL SeqGapAsnWrite PROTO (( SeqGapPtr , AsnIoPtr, AsnTypePtr)); 317 318 319 /***************************************************************************** 320 * 321 * Delta-seq is just a ValNode where 322 * vnp->choice = 1, vnp->data.ptrvalue = SeqLocPtr 323 * vnp->choice = 2, vnp->data.ptrvalue = SeqLitPtr 324 * 325 * SeqLit is a Seq-literal 326 * 327 *****************************************************************************/ 328 typedef ValNode DeltaSeq, PNTR DeltaSeqPtr; 329 330 NLM_EXTERN Boolean LIBCALL DeltaSeqAsnWrite PROTO((DeltaSeqPtr dsp, AsnIoPtr aip, AsnTypePtr atp)); 331 NLM_EXTERN DeltaSeqPtr LIBCALL DeltaSeqAsnRead PROTO((AsnIoPtr aip, AsnTypePtr atp)); 332 NLM_EXTERN DeltaSeqPtr LIBCALL DeltaSeqFree PROTO((DeltaSeqPtr dsp)); 333 334 /*** this read/write/free a linked list of DeltaSeq *******/ 335 336 NLM_EXTERN Boolean LIBCALL DeltaSeqSetAsnWrite PROTO((DeltaSeqPtr dsp, AsnIoPtr aip, AsnTypePtr set, AsnTypePtr element)); 337 NLM_EXTERN DeltaSeqPtr LIBCALL DeltaSeqSetAsnRead PROTO((AsnIoPtr aip, AsnTypePtr set, AsnTypePtr element)); 338 NLM_EXTERN DeltaSeqPtr LIBCALL DeltaSeqSetFree PROTO((DeltaSeqPtr dsp)); 339 340 /*** SeqDataPtr is an opaque pointer that can hold a byte store or a SeqGap - need to cast pointer to actual type ***/ 341 342 struct SeqData; 343 typedef struct SeqData PNTR SeqDataPtr; 344 345 /*** here is the SeqLit *********************************** 346 * if seq_data is NULL and length != 0, represents a gap of known length. 347 * if seq_data is NULL and length = 0, represents a gap of unknown length 348 * if seq_data is NULL and length != 0, and fuzz is type lim, class unk, 349 * then represents a gap of unknown length, but which has been spread 350 * evenly across a whole delta seq to match BioseqPtr->length. See 351 * SpreadGapsInDeltaSeq() for support to do this. Useful when the length 352 * of a partially sequenced clone is know, but not specific gap lengths 353 ***********************************************************/ 354 355 typedef struct seqlit { 356 Int4 length; 357 IntFuzzPtr fuzz; 358 Uint1 seq_data_type; /* see Bioseq below */ 359 SeqDataPtr seq_data; /* was ByteStorePtr */ 360 } SeqLit, PNTR SeqLitPtr; 361 362 NLM_EXTERN SeqLitPtr LIBCALL SeqLitNew PROTO((void)); 363 NLM_EXTERN Boolean LIBCALL SeqLitAsnWrite PROTO((SeqLitPtr slp, AsnIoPtr aip, AsnTypePtr atp)); 364 NLM_EXTERN SeqLitPtr LIBCALL SeqLitAsnRead PROTO((AsnIoPtr aip, AsnTypePtr atp)); 365 NLM_EXTERN SeqLitPtr LIBCALL SeqLitFree PROTO((SeqLitPtr slp)); 366 367 /***************************************************************************** 368 * 369 * Bioseq. 370 * Inst is incorporated within Bioseq for efficiency 371 * seq_data_type 372 * 0 = not set 373 * 1 = IUPACna 374 * 2 = IUPACaa 375 * 3 = NCBI2na 376 * 4 = NCBI4na 377 * 5 = NCBI8na 378 * 6 = NCBIpna 379 * 7 = NCBI8aa 380 * 8 = NCBIeaa 381 * 9 = NCBIpaa 382 * 11 = NCBIstdaa 383 * 12 = Seq-gap 384 * seq_ext_type 385 * 0 = none 386 * 1 = seg-ext 387 * 2 = ref-ext 388 * 3 = map-ext 389 * 4 = delta-ext 390 * 391 *****************************************************************************/ 392 #define Seq_code_iupacna 1 393 #define Seq_code_iupacaa 2 394 #define Seq_code_ncbi2na 3 395 #define Seq_code_ncbi4na 4 396 #define Seq_code_ncbi8na 5 397 #define Seq_code_ncbipna 6 398 #define Seq_code_ncbi8aa 7 399 #define Seq_code_ncbieaa 8 400 #define Seq_code_ncbipaa 9 401 #define Seq_code_iupacaa3 10 402 #define Seq_code_ncbistdaa 11 403 #define Seq_code_gap 12 404 405 #define Seq_repr_virtual 1 406 #define Seq_repr_raw 2 407 #define Seq_repr_seg 3 408 #define Seq_repr_const 4 409 #define Seq_repr_ref 5 410 #define Seq_repr_consen 6 411 #define Seq_repr_map 7 412 #define Seq_repr_delta 8 413 #define Seq_repr_other 255 414 415 #define Seq_mol_dna 1 416 #define Seq_mol_rna 2 417 #define Seq_mol_aa 3 418 #define Seq_mol_na 4 419 #define Seq_mol_other 255 420 #define ISA_na(x) ((x==1)||(x==2)||(x==4)) 421 #define ISA_aa(x) (x == 3) 422 423 typedef struct bioseq { 424 SeqIdPtr id; /* Seq-ids */ 425 ValNodePtr descr; /* Seq-descr */ 426 Uint1 repr, 427 mol; 428 Int4 length; /* -1 if not set */ 429 IntFuzzPtr fuzz; 430 Uint1 topology, 431 strand, 432 seq_data_type, /* as in Seq_code_type above */ 433 seq_ext_type; 434 SeqDataPtr seq_data; /* was ByteStorePtr */ 435 Pointer seq_ext; 436 SeqAnnotPtr annot; 437 SeqHistPtr hist; 438 Pointer omdp; /* internal objmgrdataptr to speed up indexed functions */ 439 GatherIndex idx; /* internal gather/objmgr tracking fields */ 440 SeqEntryPtr seqentry; /* internal seqentry that points to this bioseq */ 441 } Bioseq, PNTR BioseqPtr; 442 443 NLM_EXTERN BioseqPtr LIBCALL BioseqNew PROTO((void)); 444 NLM_EXTERN Boolean LIBCALL BioseqAsnWrite PROTO((BioseqPtr bsp, AsnIoPtr aip, AsnTypePtr atp)); 445 NLM_EXTERN BioseqPtr LIBCALL BioseqAsnRead PROTO((AsnIoPtr aip, AsnTypePtr atp)); 446 NLM_EXTERN BioseqPtr LIBCALL BioseqFree PROTO((BioseqPtr bsp)); 447 NLM_EXTERN Int2 LIBCALL BioseqLabel PROTO((BioseqPtr bsp, CharPtr buffer, Int2 buflen, Uint1 content)); 448 449 /***************************************************************************** 450 * 451 * BioseqFreeComponents(bsp) 452 * Frees data associated with the Bioseq. 453 * Does not free SeqIds 454 * Does not free Bioseq itself 455 * Used by SeqMgr for caching out 456 * Called by BioseqFree() 457 * 458 *****************************************************************************/ 459 NLM_EXTERN BioseqPtr LIBCALL BioseqFreeComponents PROTO((BioseqPtr bsp)); 460 461 NLM_EXTERN Boolean LIBCALL BioseqInstAsnWrite PROTO((BioseqPtr bsp, AsnIoPtr aip, AsnTypePtr orig)); 462 NLM_EXTERN Boolean LIBCALL BioseqInstAsnRead PROTO((BioseqPtr bsp, AsnIoPtr aip, AsnTypePtr orig)); 463 464 NLM_EXTERN Boolean LIBCALL SeqDataAsnWrite PROTO((SeqDataPtr sdp, Uint1 seqtype, AsnIoPtr aip, AsnTypePtr orig)); 465 NLM_EXTERN Boolean LIBCALL SeqDataAsnWriteXML PROTO((SeqDataPtr sdp, Uint1 seqtype, AsnIoPtr aip, AsnTypePtr orig,Int4 seqlen)); 466 NLM_EXTERN SeqDataPtr LIBCALL SeqDataAsnRead PROTO((AsnIoPtr aip, AsnTypePtr orig, Uint1Ptr typeptr, Int4 length)); 467 NLM_EXTERN SeqDataPtr LIBCALL SeqDataFree PROTO((SeqDataPtr sd, Uint1 seqtype)); 468 469 /***************************************************************************** 470 * 471 * Initialize bioseq and seqcode tables and default numbering 472 * 473 *****************************************************************************/ 474 NLM_EXTERN Boolean LIBCALL BioseqLoad PROTO((void)); 475 476 /***************************************************************************** 477 * 478 * BioseqAsnRead Options 479 * 480 *****************************************************************************/ 481 482 typedef struct op_objseq { 483 SeqIdPtr sip; /* seq id to find */ 484 Boolean found_it; /* set to TRUE when BioseqAsnRead matches sip */ 485 Boolean load_by_id; /* if TRUE, load only if sip matches */ 486 } Op_objseq, PNTR Op_objseqPtr; 487 488 /* types for AsnIoOption OP_NCBIOBJSEQ */ 489 #define BIOSEQ_CHECK_ID 1 /* match Op_objseq.sip */ 490 #define CHECK_EXTRA_DESC 2 /* used by SeqEntryAsnOut */ 491 #define CHECK_EXTRA_FEAT 3 /* used by SeqEntryAsnOut */ 492 493 /***************************************************************************** 494 * 495 * SeqDescr uses an ValNode with choice = 496 1 = * mol-type GIBB-mol , -- type of molecule 497 2 = ** modif SET OF GIBB-mod , -- modifiers 498 3 = * method GIBB-method , -- sequencing method 499 4 = name VisibleString , -- a name for this sequence 500 5 = title VisibleString , -- a title for this sequence 501 6 = org Org-ref , -- if all from one organism 502 7 = comment VisibleString , -- a more extensive comment 503 8 = num Numbering , -- a numbering system 504 9 = maploc Dbtag , -- map location of this sequence 505 10 = pir PIR-block , -- PIR specific info 506 11 = genbank GB-block , -- GenBank specific info 507 12 = pub Pubdesc -- a reference to the publication 508 13 = region VisibleString -- name for this region of sequence 509 14 = user UserObject -- user structured data object 510 15 = sp SP-block -- SWISSPROT specific info 511 512 <in release 4, neighbors is replaced with dbxref -- OBSOLETE > 513 <16 = neighbors Entrez-link -- links to sequence neighbors > 514 515 16 = dbxref Dbtag -- xref to other databases 516 17 = embl EMBL-block -- EMBL specific info 517 18 = create-date Date -- date entry created 518 19 = update-date Date -- date of last update 519 20 = prf PRF-block -- PRF specific information 520 21 = pdb PDB-block -- PDB specific information 521 22 = het Heterogen -- cofactor, etc associated but not bound 522 23 = source BioSource 523 24 = molinfo MolInfo 524 types with * use data.intvalue. Other use data.ptrvalue 525 ** uses a chain of ValNodes which use data.intvalue for enumerated type 526 * 527 *****************************************************************************/ 528 #define Seq_descr_mol_type 1 529 #define Seq_descr_modif 2 530 #define Seq_descr_method 3 531 #define Seq_descr_name 4 532 #define Seq_descr_title 5 533 #define Seq_descr_org 6 534 #define Seq_descr_comment 7 535 #define Seq_descr_num 8 536 #define Seq_descr_maploc 9 537 #define Seq_descr_pir 10 538 #define Seq_descr_genbank 11 539 #define Seq_descr_pub 12 540 #define Seq_descr_region 13 541 #define Seq_descr_user 14 542 #define Seq_descr_sp 15 543 #define Seq_descr_dbxref 16 544 #define Seq_descr_embl 17 545 #define Seq_descr_create_date 18 546 #define Seq_descr_update_date 19 547 #define Seq_descr_prf 20 548 #define Seq_descr_pdb 21 549 #define Seq_descr_het 22 550 #define Seq_descr_source 23 551 #define Seq_descr_molinfo 24 552 #define Seq_descr_modelev 25 553 554 #define SEQDESCR_MAX 26 /* size of array needed for seqdescr filter parameters */ 555 556 /* SeqDescr/SeqDesc will start to be allocated as ObjValNodes with vnp->extended 557 set to 1 and EXTRA_OBJMGR_FIELDS fields available with a cast pointer */ 558 559 typedef ValNode SeqDescr, FAR *SeqDescrPtr; 560 561 NLM_EXTERN Boolean LIBCALL SeqDescrAsnWrite PROTO((SeqDescrPtr anp, AsnIoPtr aip, AsnTypePtr atp)); 562 NLM_EXTERN SeqDescrPtr LIBCALL SeqDescrAsnRead PROTO((AsnIoPtr aip, AsnTypePtr atp)); 563 NLM_EXTERN SeqDescrPtr LIBCALL SeqDescrFree PROTO((SeqDescrPtr anp)); 564 565 /*** these replace the SeqDescrEAsnWrite() function and add others */ 566 567 typedef ValNode SeqDesc, FAR *SeqDescPtr; 568 569 NLM_EXTERN Boolean LIBCALL SeqDescAsnWrite PROTO((SeqDescPtr anp, AsnIoPtr aip, AsnTypePtr atp)); 570 NLM_EXTERN SeqDescPtr LIBCALL SeqDescAsnRead PROTO((AsnIoPtr aip, AsnTypePtr atp)); 571 NLM_EXTERN SeqDescPtr LIBCALL SeqDescFree PROTO((SeqDescPtr anp)); 572 NLM_EXTERN Int2 LIBCALL SeqDescLabel PROTO((SeqDescPtr vnp, CharPtr buffer, Int2 buflen, Boolean content)); 573 574 /** SeqDescrExtraCheck looks for extra Descriptors from SeqEntryAsnOut 575 and adds them to the stream when the descr pointer is NULL 576 *********/ 577 NLM_EXTERN Boolean LIBCALL SeqDescrExtraCheck (AsnIoPtr aip, AsnTypePtr atp); 578 579 /***************************************************************************** 580 * 581 * Pubdesc, Numbering, MolInfo, BioSource types defined in objpubd.h 582 * 583 *****************************************************************************/ 584 585 #ifdef __cplusplus 586 } 587 #endif 588 589 #undef NLM_EXTERN 590 #ifdef NLM_EXPORT 591 #define NLM_EXTERN NLM_EXPORT 592 #else 593 #define NLM_EXTERN 594 #endif 595 596 #endif 597 598 599