libuproc
1.2.0
|
Macros | |
#define | UPROC_NT_BITS 4 |
Number of bits needed to represent a valid nucleotide. More... | |
#define | UPROC_CODON_NTS 3 |
Number of nucleotides in a codon. More... | |
#define | UPROC_CODON_BITS (UPROC_CODON_NTS * UPROC_NT_BITS) |
Bits used to represent a codon. More... | |
#define | UPROC_CODON_COUNT (4 * 4 * 4) |
Number of codons consisting of only A, C, G and T/U. More... | |
#define | UPROC_BINARY_CODON_COUNT (1 << UPROC_CODON_BITS) |
Number of all possible binary representations of a codon mask. More... | |
Typedefs | |
typedef int | uproc_nt |
Type for nucleotides. More... | |
typedef unsigned | uproc_codon |
Type used to represent a codon (or codon mask) More... | |
Enumerations | |
enum | { UPROC_NT_A = (1 << 0), UPROC_NT_C = (1 << 1), UPROC_NT_G = (1 << 2), UPROC_NT_T = (1 << 3), UPROC_NT_U = UPROC_NT_T, UPROC_NT_N = (UPROC_NT_A | UPROC_NT_C | UPROC_NT_G | UPROC_NT_T), UPROC_NT_NOT_CHAR = -1, UPROC_NT_NOT_IUPAC = -2 } |
Nucleotide values. More... | |
Functions | |
void | uproc_codon_append (uproc_codon *codon, uproc_nt nt) |
Append nucleotide to codon. More... | |
void | uproc_codon_prepend (uproc_codon *codon, uproc_nt nt) |
Prepend nucleotide to codon. More... | |
uproc_nt | uproc_codon_get_nt (uproc_codon codon, unsigned position) |
Retrieve a codon's nucleotide at a certain position. More... | |
bool | uproc_codon_match (uproc_codon codon, uproc_codon mask) |
Match a codon against a "codon mask". More... | |
#define UPROC_NT_BITS 4 |
Number of bits needed to represent a valid nucleotide.
#define UPROC_CODON_NTS 3 |
Number of nucleotides in a codon.
#define UPROC_CODON_BITS (UPROC_CODON_NTS * UPROC_NT_BITS) |
Bits used to represent a codon.
#define UPROC_CODON_COUNT (4 * 4 * 4) |
Number of codons consisting of only A, C, G and T/U.
#define UPROC_BINARY_CODON_COUNT (1 << UPROC_CODON_BITS) |
Number of all possible binary representations of a codon mask.
typedef int uproc_nt |
Type for nucleotides.
This type can represent a standard base (A, C, G, T/U) or one of the IUPAC wildcard characters (http://www.bioinformatics.org/sms/iupac.html), except gaps. Each of the standard bases is represented by a distinct bit, matching against a wildcard is then a simple bitwise &.
It is defined as a signed integer, so negative values can be used as return values in case of an error.
typedef unsigned uproc_codon |
Type used to represent a codon (or codon mask)
This type needs to be able to store at least UPROC_CODON_BITS bits.
anonymous enum |
Nucleotide values.
void uproc_codon_append | ( | uproc_codon * | codon, |
uproc_nt | nt | ||
) |
void uproc_codon_prepend | ( | uproc_codon * | codon, |
uproc_nt | nt | ||
) |
uproc_nt uproc_codon_get_nt | ( | uproc_codon | codon, |
unsigned | position | ||
) |
Retrieve a codon's nucleotide at a certain position.
codon | codon to extract nt from |
position | position of the desired nt |
position
is >= UPROC_CODON_NTS bool uproc_codon_match | ( | uproc_codon | codon, |
uproc_codon | mask | ||
) |