1 /* asn2gnbk.h 2 * =========================================================================== 3 * 4 * PUBLIC DOMAIN NOTICE 5 * National Center for Biotechnology Information (NCBI) 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 do not place any restriction on its use or reproduction. 13 * We would, however, appreciate having the NCBI and the author cited in 14 * any work or product based on this material 15 * 16 * Although all reasonable efforts have been taken to ensure the accuracy 17 * and reliability of the software and data, the NLM and the U.S. 18 * Government do not and cannot warrant the performance or results that 19 * may be obtained by using this software or data. The NLM and the U.S. 20 * Government disclaim all warranties, express or implied, including 21 * warranties of performance, merchantability or fitness for any particular 22 * purpose. 23 * 24 * =========================================================================== 25 * 26 * File Name: asn2gnbk.h 27 * 28 * Author: Karl Sirotkin, Tom Madden, Tatiana Tatusov, Jonathan Kans 29 * 30 * Version Creation Date: 10/21/98 31 * 32 * $Revision: 6.92 $ 33 * 34 * File Description: New GenBank flatfile generator 35 * 36 * Modifications: 37 * -------------------------------------------------------------------------- 38 * ========================================================================== 39 */ 40 41 #ifndef _ASN2NGNBK_ 42 #define _ASN2NGNBK_ 43 44 #include <ncbi.h> 45 #include <objall.h> 46 47 #undef NLM_EXTERN 48 #ifdef NLM_IMPORT 49 #define NLM_EXTERN NLM_IMPORT 50 #else 51 #define NLM_EXTERN extern 52 #endif 53 54 #ifdef __cplusplus 55 extern "C" { 56 #endif 57 58 /* choices of format, mode, and style */ 59 60 typedef enum { 61 GENBANK_FMT = 1, 62 EMBL_FMT, 63 GENPEPT_FMT, 64 EMBLPEPT_FMT, 65 FTABLE_FMT 66 } FmtType; 67 68 typedef enum { 69 RELEASE_MODE = 1, 70 ENTREZ_MODE, 71 SEQUIN_MODE, 72 DUMP_MODE 73 } ModType; 74 75 typedef enum { 76 NORMAL_STYLE = 1, 77 SEGMENT_STYLE, 78 MASTER_STYLE, 79 CONTIG_STYLE 80 } StlType; 81 82 /* bit flags for modifying behavior */ 83 84 typedef unsigned long FlgType; 85 86 #define CREATE_HTML_FLATFILE 1 87 #define CREATE_XML_GBSEQ_FILE 2 88 #define CREATE_ASN_GBSEQ_FILE 3 89 90 #define SHOW_CONTIG_FEATURES 4 91 #define SHOW_CONTIG_SOURCES 8 92 93 #define SHOW_FAR_TRANSLATION 16 94 #define TRANSLATE_IF_NO_PRODUCT 32 95 #define ALWAYS_TRANSLATE_CDS 48 96 97 #define SHOW_FAR_TRANSCRIPTION 16 98 #define TRANSCRIBE_IF_NO_PRODUCT 32 99 #define ALWAYS_TRANSCRIBE_MRNA 48 100 101 #define REFSEQ_CONVENTIONS 64 102 103 #define ONLY_NEAR_FEATURES 128 104 #define FAR_FEATURES_SUPPRESS 256 105 #define NEAR_FEATURES_SUPPRESS 384 106 107 #define COPY_GPS_CDS_UP 512 108 #define COPY_GPS_GENE_DOWN 1024 109 110 #define SHOW_CONTIG_AND_SEQ 2048 111 112 #define SHOW_TRANCRIPTION 4096 113 #define SHOW_PEPTIDE 8192 114 115 #define PRODUCE_OLD_GBSEQ 16384 116 117 #define DDBJ_VARIANT_FORMAT 32768 118 119 #define SPECIAL_GAP_DISPLAY 65536 120 121 #define FORCE_PRIMARY_BLOCK 131072 122 #define FORCE_ALLOW_FAR_FEATS 262144 123 124 #define RELAXED_MAPPING 524288 125 126 #define GPIPE_DEFLINES 1048576 127 128 #define HIDE_PROTEIN_ID 2097152 129 130 #define HIDE_GI_NUMBERS 4194304 131 132 /* locking behavior for system performance */ 133 134 typedef unsigned long LckType; 135 136 #define LOCK_FAR_COMPONENTS 2 137 #define LOCK_FAR_LOCATIONS 4 138 #define LOCK_FAR_PRODUCTS 8 139 #define LOOKUP_FAR_COMPONENTS 16 140 #define LOOKUP_FAR_LOCATIONS 32 141 #define LOOKUP_FAR_PRODUCTS 64 142 #define LOOKUP_FAR_HISTORY 128 143 #define LOOKUP_FAR_INFERENCE 256 144 #define LOOKUP_FAR_OTHERS 512 145 146 /* bit flags for unusual customized reports */ 147 148 typedef unsigned long CstType; 149 150 #define SHOW_FEATURE_STATS 1 151 #define SHOW_REFERENCE_STATS 2 152 153 #define HIDE_FEATURES 4 154 155 #define HIDE_IMP_FEATS 8 156 #define HIDE_VARS_AND_REPT_REGNS 16 157 #define HIDE_SITES_BONDS_REGIONS 32 158 #define HIDE_CDD_FEATS 64 159 #define HIDE_CDS_PROD_FEATS 128 160 161 #define HIDE_GENE_RIFS 256 162 #define ONLY_GENE_RIFS 512 163 #define ONLY_REVIEW_PUBS 768 164 #define NEWEST_PUBS 1024 165 #define OLDEST_PUBS 1280 166 #define HIDE_ALL_PUBS 1792 167 168 #define SHOW_PROT_FTABLE 2048 169 #define SHOW_FTABLE_REFS 4096 170 171 #define HIDE_SOURCE_FEATS 8192 172 #define HIDE_GAP_FEATS 16384 173 #define HIDE_SEQUENCE 32768 174 175 #define EXPANDED_GAP_DISPLAY 65536 176 #define HIDE_GO_TERMS 131072 177 #define HIDE_TRANSLATION 262144 178 179 #define HIDE_EVIDENCE_QUALS 524288 180 181 #define NEW_XML_POLICY 1048576 182 #define OLD_GBSEQ_XML 2097152 183 184 #define FORCE_SEQ_SPANS 4194304 185 186 /* opaque pointer for special extensions */ 187 188 struct XtraData; 189 typedef struct XtraData* XtraPtr; 190 191 /* flatfile generation functions */ 192 193 NLM_EXTERN Boolean SeqEntryToGnbk ( 194 SeqEntryPtr sep, 195 SeqLocPtr slp, 196 FmtType format, 197 ModType mode, 198 StlType style, 199 FlgType flags, 200 LckType locks, 201 CstType custom, 202 XtraPtr extra, 203 FILE *fp 204 ); 205 206 NLM_EXTERN Boolean BioseqToGnbk ( 207 BioseqPtr bsp, 208 SeqLocPtr slp, 209 FmtType format, 210 ModType mode, 211 StlType style, 212 FlgType flags, 213 LckType locks, 214 CstType custom, 215 XtraPtr extra, 216 FILE *fp 217 ); 218 219 NLM_EXTERN CharPtr GetFlatFileAffilString (AffilPtr afp); 220 221 NLM_EXTERN void PrintFTCodeBreak ( 222 ValNodePtr PNTR head, 223 CodeBreakPtr cbp, 224 BioseqPtr target 225 ); 226 227 NLM_EXTERN void PrintFTCodeBreakEx ( 228 ValNodePtr PNTR head, 229 CodeBreakPtr cbp, 230 BioseqPtr target, 231 Boolean masterStyle, 232 Boolean relaxed, 233 SeqLocPtr subloc 234 ); 235 236 #ifdef __cplusplus 237 } 238 #endif 239 240 #undef NLM_EXTERN 241 #ifdef NLM_EXPORT 242 #define NLM_EXTERN NLM_EXPORT 243 #else 244 #define NLM_EXTERN 245 #endif 246 247 #endif /* ndef _ASN2NGNBK_ */ 248 249