NCBI C++ ToolKit
blast_encoding.h
Go to the documentation of this file.

Go to the SVN repository for this file.

1 /* $Id: blast_encoding.h 36670 2008-01-24 21:22:19Z camacho $
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  * Author: Christiam Camacho
27  *
28  */
29 
30 /** @file blast_encoding.h
31  * Declarations of static arrays used to define some NCBI encodings to be used
32  * in a toolkit independent manner by the BLAST engine.
33  */
34 
35 #ifndef ALGO_BLAST_CORE___BLAST_ENCODING__H
36 #define ALGO_BLAST_CORE___BLAST_ENCODING__H
37 
40 
41 /** @addtogroup AlgoBlast
42  *
43  * @{
44  */
45 
46 #ifdef __cplusplus
47 extern "C" {
48 #endif
49 
50 /** Different types of sequence encodings for sequence retrieval from the
51  * BLAST database
52  */
53 typedef enum {
54  eBlastEncodingProtein = 0, /**< NCBIstdaa */
55  eBlastEncodingNucleotide = 1, /**< Special encoding for preliminary
56  stage of BLAST: permutation of NCBI4na.
57  A.k.a.: BLASTNA encoding
58  */
59  eBlastEncodingNcbi4na = 2, /**< NCBI4na */
60  eBlastEncodingNcbi2na = 3, /**< NCBI2na */
61  eBlastEncodingError = 255 /**< Error value for encoding */
63 
64 /* Nucleotide encodings */
65 
66 /** Translates between ncbi4na and blastna. The first four elements
67  * of this array match ncbi2na. */
69 
70 /** Translates between blastna and ncbi4na. */
72 
73 /** Translates between iupacna and blastna. */
75 
76 /** Translates between iupacna and ncbi4na. */
78 
79 /** Translates between ncbieaa and ncbistdaa. */
81 
82 /** Translates between ncbieaa and ncbistdaa. */
83 NCBI_XBLAST_EXPORT extern const char NCBISTDAA_TO_AMINOACID[];
84 
85 /** Translates between blastna and iupacna. */
86 NCBI_XBLAST_EXPORT extern const char BLASTNA_TO_IUPACNA[];
87 
88 /** Translates between ncbi4na and iupacna. */
89 NCBI_XBLAST_EXPORT extern const char NCBI4NA_TO_IUPACNA[];
90 
91 #define BLAST2NA_SIZE 4 /**< Size of compressed nucleic acid alphabet */
92 #define BLASTNA_SIZE 16 /**< Size of nucleic acid alphabet */
93 #define BLASTAA_SIZE 28 /**< Size of aminoacid alphabet */
94 
95 
96 #define BLASTNA_SEQ_CODE 99 /**< Identifies the blastna alphabet, for use in
97  blast only. */
98 #define BLASTAA_SEQ_CODE 11 /**< == Seq_code_ncbistdaa */
99 #define NCBI4NA_SEQ_CODE 4 /**< == Seq_code_ncbi4na */
100 
101 /** Sentinel byte for protein sequences */
103 /** Sentinel nibble for nucleotide sequences */
105 
106 #ifdef __cplusplus
107 }
108 #endif
109 
110 /* @} */
111 
112 #endif /* ALGO_BLAST_CORE___BLAST_ENCODING__H */
Defines to provide correct exporting from BLAST DLL in Windows.
#define NCBI_XBLAST_EXPORT
NULL operations for other cases.
Definition: blast_export.h:65
const Uint1 BLASTNA_TO_NCBI4NA[]
Translates between blastna and ncbi4na.
EBlastEncoding
Different types of sequence encodings for sequence retrieval from the BLAST database.
const Uint1 IUPACNA_TO_NCBI4NA[]
Translates between iupacna and ncbi4na.
const char NCBI4NA_TO_IUPACNA[]
Translates between ncbi4na and iupacna.
const char BLASTNA_TO_IUPACNA[]
Translates between blastna and iupacna.
const Uint1 NCBI4NA_TO_BLASTNA[]
Translates between ncbi4na and blastna.
const Uint1 AMINOACID_TO_NCBISTDAA[]
Translates between ncbieaa and ncbistdaa.
const Uint1 kProtSentinel
Sentinel byte for protein sequences.
const Uint1 kNuclSentinel
Sentinel nibble for nucleotide sequences.
const Uint1 IUPACNA_TO_BLASTNA[]
Translates between iupacna and blastna.
const char NCBISTDAA_TO_AMINOACID[]
Translates between ncbieaa and ncbistdaa.
@ eBlastEncodingNcbi4na
NCBI4na.
@ eBlastEncodingProtein
NCBIstdaa.
@ eBlastEncodingError
Error value for encoding.
@ eBlastEncodingNucleotide
Special encoding for preliminary stage of BLAST: permutation of NCBI4na.
@ eBlastEncodingNcbi2na
NCBI2na.
uint8_t Uint1
1-byte (8-bit) unsigned integer
Definition: ncbitype.h:99
Type and macro definitions from C toolkit that are not defined in C++ toolkit.
Modified on Thu Feb 29 12:23:03 2024 by modify_doxy.py rev. 669887