Definition at line 19 of file Alphabet.h.
Public Member Functions | |
CAlphabet (CHAR *alpha, INT len) | |
CAlphabet (E_ALPHABET alpha) | |
CAlphabet (CAlphabet *alpha) | |
~CAlphabet () | |
bool | set_alphabet (E_ALPHABET alpha) |
E_ALPHABET | get_alphabet () |
INT | get_num_symbols () |
INT | get_num_bits () |
BYTE | remap_to_bin (BYTE c) |
BYTE | remap_to_char (BYTE c) |
void | clear_histogram () |
clear histogram | |
void | add_string_to_histogram (CHAR *p, LONG len) |
void | add_string_to_histogram (BYTE *p, LONG len) |
void | add_string_to_histogram (SHORT *p, LONG len) |
void | add_string_to_histogram (WORD *p, LONG len) |
void | add_string_to_histogram (INT *p, LONG len) |
void | add_string_to_histogram (UINT *p, LONG len) |
void | add_string_to_histogram (LONG *p, LONG len) |
void | add_string_to_histogram (ULONG *p, LONG len) |
void | add_byte_to_histogram (BYTE p) |
void | print_histogram () |
print histogram | |
void | get_hist (LONG **h, INT *len) |
const LONG * | get_histogram () |
get pointer to histogram | |
bool | check_alphabet (bool print_error=true) |
bool | check_alphabet_size (bool print_error=true) |
INT | get_num_symbols_in_histogram () |
INT | get_max_value_in_histogram () |
INT | get_num_bits_in_histogram () |
Static Public Member Functions | |
static const CHAR * | get_alphabet_name (E_ALPHABET alphabet) |
Static Public Attributes | |
static const BYTE | B_A = 0 |
static const BYTE | B_C = 1 |
static const BYTE | B_G = 2 |
static const BYTE | B_T = 3 |
static const BYTE | MAPTABLE_UNDEF = 0xff |
static const CHAR * | alphabet_names [11] = {"DNA", "RAWDNA", "RNA", "PROTEIN", "ALPHANUM", "CUBE", "RAW", "IUPAC_NUCLEIC_ACID", "IUPAC_AMINO_ACID", "NONE", "UNKNOWN"} |
static CParallel | parallel |
static CIO | io |
static CVersion | version |
Protected Member Functions | |
void | init_map_table () |
void | copy_histogram (CAlphabet *src) |
Protected Attributes | |
E_ALPHABET | alphabet |
INT | num_symbols |
INT | num_bits |
BYTE | valid_chars [1<< (sizeof(BYTE)*8)] |
BYTE | maptable_to_bin [1<< (sizeof(BYTE)*8)] |
BYTE | maptable_to_char [1<< (sizeof(BYTE)*8)] |
LONG | histogram [1<< (sizeof(BYTE)*8)] |
CAlphabet::CAlphabet | ( | E_ALPHABET | alpha | ) |
CAlphabet::CAlphabet | ( | CAlphabet * | alpha | ) |
CAlphabet::~CAlphabet | ( | ) |
Definition at line 70 of file Alphabet.cpp.
bool CAlphabet::set_alphabet | ( | E_ALPHABET | alpha | ) |
set alphabet and initialize mapping table (for remap)
alpha | new alphabet |
Definition at line 74 of file Alphabet.cpp.
E_ALPHABET CAlphabet::get_alphabet | ( | ) |
INT CAlphabet::get_num_symbols | ( | ) |
get number of symbols in alphabet
Definition at line 61 of file Alphabet.h.
INT CAlphabet::get_num_bits | ( | ) |
get number of bits necessary to store all symbols in alphabet
Definition at line 71 of file Alphabet.h.
remap element e.g translate ACGT to 0123
c | element to remap |
Definition at line 81 of file Alphabet.h.
remap element e.g translate 0123 to ACGT
c | element to remap |
Definition at line 91 of file Alphabet.h.
void CAlphabet::clear_histogram | ( | ) |
make histogram for whole string
p | string | |
len | length of string |
Definition at line 391 of file Alphabet.cpp.
make histogram for whole string
p | string | |
len | length of string |
Definition at line 385 of file Alphabet.cpp.
make histogram for whole string
p | string | |
len | length of string |
Definition at line 405 of file Alphabet.cpp.
make histogram for whole string
p | string | |
len | length of string |
Definition at line 397 of file Alphabet.cpp.
make histogram for whole string
p | string | |
len | length of string |
Definition at line 413 of file Alphabet.cpp.
make histogram for whole string
p | string | |
len | length of string |
Definition at line 421 of file Alphabet.cpp.
make histogram for whole string
p | string | |
len | length of string |
Definition at line 429 of file Alphabet.cpp.
make histogram for whole string
p | string | |
len | length of string |
Definition at line 437 of file Alphabet.cpp.
void CAlphabet::add_byte_to_histogram | ( | BYTE | p | ) |
void CAlphabet::print_histogram | ( | ) |
get histogram
h | where the histogram will be stored | |
len | length of histogram |
Definition at line 172 of file Alphabet.h.
const LONG* CAlphabet::get_histogram | ( | ) |
bool CAlphabet::check_alphabet | ( | bool | print_error = true |
) |
check whether symbols in histogram are valid in alphabet e.g. for DNA if only letters ACGT appear
print_error | if errors shall be printed |
Definition at line 490 of file Alphabet.cpp.
bool CAlphabet::check_alphabet_size | ( | bool | print_error = true |
) |
check whether symbols in histogram ALL fit in alphabet
print_error | if errors shall be printed |
Definition at line 512 of file Alphabet.cpp.
INT CAlphabet::get_num_symbols_in_histogram | ( | ) |
return number of symbols in histogram
Definition at line 460 of file Alphabet.cpp.
INT CAlphabet::get_max_value_in_histogram | ( | ) |
return maximum value in histogram
Definition at line 445 of file Alphabet.cpp.
INT CAlphabet::get_num_bits_in_histogram | ( | ) |
return number of bits required to store all symbols in histogram
Definition at line 472 of file Alphabet.cpp.
const CHAR * CAlphabet::get_alphabet_name | ( | E_ALPHABET | alphabet | ) | [static] |
return alphabet name
alphabet | alphabet type to get name from |
Definition at line 534 of file Alphabet.cpp.
void CAlphabet::init_map_table | ( | ) | [protected] |
init map table
Definition at line 124 of file Alphabet.cpp.
void CAlphabet::copy_histogram | ( | CAlphabet * | src | ) | [protected] |
copy histogram
src | alphabet to copy histogram from |
Definition at line 529 of file Alphabet.cpp.
const BYTE CAlphabet::B_A = 0 [static] |
B_A
Definition at line 242 of file Alphabet.h.
const BYTE CAlphabet::B_C = 1 [static] |
B_C
Definition at line 244 of file Alphabet.h.
const BYTE CAlphabet::B_G = 2 [static] |
B_G
Definition at line 246 of file Alphabet.h.
const BYTE CAlphabet::B_T = 3 [static] |
B_T
Definition at line 248 of file Alphabet.h.
const BYTE CAlphabet::MAPTABLE_UNDEF = 0xff [static] |
MAPTABLE UNDEF
Definition at line 250 of file Alphabet.h.
const CHAR * CAlphabet::alphabet_names = {"DNA", "RAWDNA", "RNA", "PROTEIN", "ALPHANUM", "CUBE", "RAW", "IUPAC_NUCLEIC_ACID", "IUPAC_AMINO_ACID", "NONE", "UNKNOWN"} [static] |
alphabet names
Definition at line 252 of file Alphabet.h.
E_ALPHABET CAlphabet::alphabet [protected] |
alphabet
Definition at line 256 of file Alphabet.h.
INT CAlphabet::num_symbols [protected] |
number of symbols
Definition at line 258 of file Alphabet.h.
INT CAlphabet::num_bits [protected] |
number of bits
Definition at line 260 of file Alphabet.h.
BYTE CAlphabet::valid_chars[1<< (sizeof(BYTE)*8)] [protected] |
valid chars
Definition at line 262 of file Alphabet.h.
BYTE CAlphabet::maptable_to_bin[1<< (sizeof(BYTE)*8)] [protected] |
maptable to bin
Definition at line 264 of file Alphabet.h.
BYTE CAlphabet::maptable_to_char[1<< (sizeof(BYTE)*8)] [protected] |
maptable to char
Definition at line 266 of file Alphabet.h.
LONG CAlphabet::histogram[1<< (sizeof(BYTE)*8)] [protected] |
histogram
Definition at line 268 of file Alphabet.h.
CParallel CSGObject::parallel [static, inherited] |
Definition at line 105 of file SGObject.h.
CIO CSGObject::io [static, inherited] |
Definition at line 106 of file SGObject.h.
CVersion CSGObject::version [static, inherited] |
Definition at line 107 of file SGObject.h.