/usr/include/ncbi/asn2gnbp.h is in libncbi6-dev 6.1.20120620-7.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 | /* asn2gnbp.h
* ===========================================================================
*
* PUBLIC DOMAIN NOTICE
* National Center for Biotechnology Information (NCBI)
*
* This software/database is a "United States Government Work" under the
* terms of the United States Copyright Act. It was written as part of
* the author's official duties as a United States Government employee and
* thus cannot be copyrighted. This software/database is freely available
* to the public for use. The National Library of Medicine and the U.S.
* Government do not place any restriction on its use or reproduction.
* We would, however, appreciate having the NCBI and the author cited in
* any work or product based on this material
*
* Although all reasonable efforts have been taken to ensure the accuracy
* and reliability of the software and data, the NLM and the U.S.
* Government do not and cannot warrant the performance or results that
* may be obtained by using this software or data. The NLM and the U.S.
* Government disclaim all warranties, express or implied, including
* warranties of performance, merchantability or fitness for any particular
* purpose.
*
* ===========================================================================
*
* File Name: asn2gnbp.h
*
* Author: Karl Sirotkin, Tom Madden, Tatiana Tatusov, Jonathan Kans
*
* Version Creation Date: 10/21/98
*
* $Revision: 6.46 $
*
* File Description: New GenBank flatfile generator, private header
*
* Modifications:
* --------------------------------------------------------------------------
* ==========================================================================
*/
#ifndef _ASN2NGNBP_
#define _ASN2NGNBP_
#include <asn2gnbk.h>
#include <objgbseq.h>
#include <objinsdseq.h>
#undef NLM_EXTERN
#ifdef NLM_IMPORT
#define NLM_EXTERN NLM_IMPORT
#else
#define NLM_EXTERN extern
#endif
#ifdef __cplusplus
extern "C" {
#endif
/* internal block type identifiers */
typedef enum {
HEAD_BLOCK = 1,
LOCUS_BLOCK,
DEFLINE_BLOCK,
ACCESSION_BLOCK,
VERSION_BLOCK,
PROJECT_BLOCK,
PID_BLOCK,
DBSOURCE_BLOCK,
DATE_BLOCK,
KEYWORDS_BLOCK,
SEGMENT_BLOCK,
SOURCE_BLOCK,
ORGANISM_BLOCK,
REF_STATS_BLOCK,
REFERENCE_BLOCK,
PRIMARY_BLOCK,
COMMENT_BLOCK,
FEAT_STATS_BLOCK,
FEATHEADER_BLOCK,
SOURCEFEAT_BLOCK,
FEATURE_BLOCK,
BASECOUNT_BLOCK,
ORIGIN_BLOCK,
SEQUENCE_BLOCK,
CONTIG_BLOCK,
WGS_BLOCK,
GENOME_BLOCK,
SLASH_BLOCK,
TAIL_BLOCK
} BlockType;
NLM_EXTERN CharPtr asn2gnbk_block_label (
BlockType blocktype
);
typedef enum {
HEAD_MASK = 0x00000001,
LOCUS_MASK = 0x00000002,
DEFLINE_MASK = 0x00000004,
ACCESSION_MASK = 0x00000008,
VERSION_MASK = 0x00000010,
PROJECT_MASK = 0x00000020,
PID_MASK = 0x00000040,
DBSOURCE_MASK = 0x00000080,
DATE_MASK = 0x00000100,
KEYWORDS_MASK = 0x00000200,
SEGMENT_MASK = 0x00000400,
SOURCE_MASK = 0x00000800,
ORGANISM_MASK = 0x00001000,
REF_STATS_MASK = 0x00002000,
REFERENCE_MASK = 0x00004000,
PRIMARY_MASK = 0x00008000,
COMMENT_MASK = 0x00010000,
FEAT_STATS_MASK = 0x00020000,
FEATHEADER_MASK = 0x00040000,
SOURCEFEAT_MASK = 0x00080000,
FEATURE_MASK = 0x00100000,
BASECOUNT_MASK = 0x00200000,
ORIGIN_MASK = 0x00400000,
SEQUENCE_MASK = 0x00800000,
CONTIG_MASK = 0x01000000,
WGS_MASK = 0x02000000,
GENOME_MASK = 0x04000000,
SLASH_MASK = 0x08000000,
TAIL_MASK = 0x10000000
} BlockMask;
#define ASN2GB_BASE_BLOCK \
Uint2 entityID; \
Uint2 itemtype; \
Uint4 itemID; \
Int4 section; \
Int4 paragraph; \
BlockType blocktype; \
CharPtr string; \
/* base block structure for most paragraph types */
typedef struct base_block {
ASN2GB_BASE_BLOCK
} BaseBlock, PNTR BaseBlockPtr;
/* version block includes VERSION and NID sections */
/* organism block includes SOURCE and ORGANISM sections */
/* source (feat) block should be the same as the organism block */
/* references are grouped by published, unpublished, and cit-subs */
typedef enum {
REF_CAT_PUB = 1,
REF_CAT_UNP,
REF_CAT_SUB
} RefType;
typedef struct ref_block {
ASN2GB_BASE_BLOCK
Int4 pmid;
Int4 muid;
CharPtr uniquestr;
Int2 serial;
RefType category;
Int2 sites;
} RefBlock, PNTR RefBlockPtr;
/* featdeftype allows specific feature classes to be identified */
typedef struct feat_block {
ASN2GB_BASE_BLOCK
Uint1 featdeftype;
} FeatBlock, PNTR FeatBlockPtr;
/* sequences are broken up into paragraphs and use the section's internal SeqPort */
typedef struct seq_block {
ASN2GB_BASE_BLOCK
Int4 start;
Int4 stop;
Int4 extend;
CharPtr bases;
} SeqBlock, PNTR SeqBlockPtr;
typedef struct IndxData {
CharPtr locus;
CharPtr accession;
CharPtr version;
CharPtr gi;
CharPtr div;
CharPtr base_cnt;
ValNodePtr authors;
ValNodePtr genes;
ValNodePtr journals;
ValNodePtr keywords;
ValNodePtr secondaries;
} IndxBlock, PNTR IndxPtr;
/* structure for single segment or pop/phy/mut set component */
typedef struct asn2gb_sect {
/* data identifiers for individual accession report */
BioseqPtr target;
BioseqPtr bsp;
SeqLocPtr slp;
Uint2 seg;
Int2 numsegs;
Int4 from;
Int4 to;
/* local array pointing to all blocks in this section */
BaseBlockPtr PNTR blockArray;
Int4 numBlocks;
/* references for feature citation matching, serial number assignment */
RefBlockPtr PNTR referenceArray;
Int2 numReferences;
/* index is needed per section -- EY --- */
IndxBlock index;
/* gbseq block is needed per section for GenBank-style XML */
GBSeq gbseq;
} Asn2gbSect, PNTR Asn2gbSectPtr;
/* master pointer returned to application */
typedef struct asn2gb_job {
/* data identifiers for sequence or sequences to report */
Uint2 entityID;
BioseqPtr bsp;
BioseqSetPtr bssp;
SeqLocPtr slp;
/* each accession report from LOCUS to // is a single section */
Asn2gbSectPtr PNTR sectionArray;
Int4 numSections;
/* master array pointing to all blocks in all sections */
BaseBlockPtr PNTR paragraphArray;
Int4 numParagraphs;
/* sorted array to get paragraphs for entityID/itemtype/itemID */
BaseBlockPtr PNTR paragraphByIDs;
} Asn2gbJob, PNTR Asn2gbJobPtr;
/* callback types and structure for special extensions */
typedef void (*Asn2gbWriteFunc) (
CharPtr str,
Pointer userdata,
BlockType blocktype,
Uint2 entityID,
Uint2 itemtype,
Uint4 itemID,
Int4 left,
Int4 right
);
typedef ValNodePtr (*Asn2gbLockFunc) (SeqIdPtr sip, Pointer remotedata);
typedef void (*Asn2gbFreeFunc) (ValNodePtr vnp, Pointer remotedata);
typedef struct XtraData {
Asn2gbWriteFunc ffwrite;
CharPtr ffhead;
CharPtr fftail;
IndxPtr index;
GBSeqPtr gbseq;
AsnIoPtr aip;
AsnTypePtr atp;
Pointer userdata;
Asn2gbLockFunc remotelock;
Asn2gbFreeFunc remotefree;
Pointer remotedata;
Int4 prevGi;
Int4 nextGi;
BlockMask bkmask;
Boolean reindex;
Boolean seqspans;
} XtraBlock;
/*
asn2gnbk_setup creates a structure laying out the flatfile structure.
Of the first three parameters (bsp, bssp, slp), only one should not be NULL.
If bsp is passed in, that is the target bioseq. If bssp is passed in, it is
expected to be a population/phylogenetic/mutation study, and all records are
shown, but with no segment numbers.
asn2gnbk_format creates a string for a given paragraph.
asn2gnbk_cleanup frees the structure and all components.
SeqEntryToGnbk calls asn2gnbk_setup, _format, and _cleanup internally.
*/
NLM_EXTERN Asn2gbJobPtr asn2gnbk_setup (
BioseqPtr bsp,
BioseqSetPtr bssp,
SeqLocPtr slp,
FmtType format,
ModType mode,
StlType style,
FlgType flags,
LckType locks,
CstType custom,
XtraPtr extra
);
NLM_EXTERN CharPtr asn2gnbk_format (
Asn2gbJobPtr ajp,
Int4 paragrap
);
NLM_EXTERN Asn2gbJobPtr asn2gnbk_cleanup (
Asn2gbJobPtr ajp
);
/* public function to get URLs for collaboration-approved db_xrefs */
NLM_EXTERN CharPtr asn2gnbk_dbxref (
DbtagPtr dbt
);
/* public function to get string of genbank-style feature qualifiers */
NLM_EXTERN CharPtr FormatFeatureQuals (
SeqFeatPtr sfp
);
#ifdef __cplusplus
}
#endif
#undef NLM_EXTERN
#ifdef NLM_EXPORT
#define NLM_EXTERN NLM_EXPORT
#else
#define NLM_EXTERN
#endif
#endif /* ndef _ASN2NGNBP_ */
|