libuproc  1.2.0
Macros | Typedefs | Enumerations | Functions
codon.h File Reference

Module: Nucleotides and codons. More...

#include <stdbool.h>
#include "uproc/common.h"

Go to the source code of this file.

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...
 

Detailed Description

Module: Nucleotides and codons.