libStatGen Software
1
|
Map between characters and the associated base type. More...
#include <BaseAsciiMap.h>
Public Types | |
enum | SPACE_TYPE { UNKNOWN, BASE_SPACE, COLOR_SPACE } |
The type of space (color or base) to use in the mapping. More... | |
Public Member Functions | |
void | setBaseMapType (SPACE_TYPE spaceType) |
Set the base type based on the passed in option. | |
int | getBaseIndex (const char &letter) |
Returns the baseIndex value for the character passed in. | |
SPACE_TYPE | getSpaceType () |
Return the space type that is currently set. | |
void | setNumPrimerBases (int numPrimerBases) |
Set the number of primer bases expected before the actual base/color space type occurs for the rest of the entries. | |
void | resetPrimerCount () |
Reset the number of primers to 0. | |
void | resetBaseMapType () |
Reset the base mapping type to UNKNOWN. | |
Static Public Attributes | |
static const int | baseNIndex = 004 |
Value associated with 'N' in the ascii to base map (bad read). | |
static const int | baseXIndex = 005 |
Value associated with any non-base character in the ascii to base map (unknown, bad data). | |
static const char | int2base [] = "ACGTNMXXXXXXXXXX" |
Convert from int representation to the base. | |
static const char | int2colorSpace [] = "0123NXXXXXXXXXXX" |
Convert from int representation to colorspace representation. | |
static unsigned char | base2complement [] = "NNNNNNNNNNNNNNNN" |
This table maps 5' base space to the 3' complement base space values, as well as 5' color space values to the corresponding 3' complement color space values. | |
static unsigned char | baseColor2int [256+1] = "\005\005\005\005\005\005\005\005\005\005\005\005\005\005\005\005" |
Map ASCII values to a 2 (or 3) bit encoding for the base pair value for both base and color space. | |
static unsigned char | base2int [256+1] = "\005\005\005\005\005\005\005\005\005\005\005\005\005\005\005\005" |
Map ASCII values to a 2 (or 3) bit encoding for the base pair value for just base space (ACTGNactgn). | |
static unsigned char | color2int [256+1] = "\005\005\005\005\005\005\005\005\005\005\005\005\005\005\005\005" |
Map ASCII values to a 2 (or 3) bit encoding for the base pair value for just color space (0123). |
Map between characters and the associated base type.
Definition at line 24 of file BaseAsciiMap.h.
The type of space (color or base) to use in the mapping.
UNKNOWN |
Base decision on the first raw seq character/type has yet to be determined. |
BASE_SPACE |
Bases only (A,C,G,T,N). |
COLOR_SPACE |
Color space only (0,1,2,3,.). |
Definition at line 44 of file BaseAsciiMap.h.
{ /// Base decision on the first raw seq character/type has yet /// to be determined. UNKNOWN, BASE_SPACE, ///< Bases only (A,C,G,T,N). COLOR_SPACE ///< Color space only (0,1,2,3,.). };
void BaseAsciiMap::setNumPrimerBases | ( | int | numPrimerBases | ) | [inline] |
Set the number of primer bases expected before the actual base/color space type occurs for the rest of the entries.
Definition at line 152 of file BaseAsciiMap.h.
{ myNumPrimerBases = numPrimerBases; }
unsigned char BaseAsciiMap::base2complement = "NNNNNNNNNNNNNNNN" [static] |
This table maps 5' base space to the 3' complement base space values, as well as 5' color space values to the corresponding 3' complement color space values.
In both cases, invalids are mapped to 'N', which isn't accurate for ABI SOLiD, but internally it shouldn't matter (on output it will).
Definition at line 41 of file BaseAsciiMap.h.
unsigned char BaseAsciiMap::base2int = "\005\005\005\005\005\005\005\005\005\005\005\005\005\005\005\005" [static] |
Map ASCII values to a 2 (or 3) bit encoding for the base pair value for just base space (ACTGNactgn).
'A'/'a' -> 0; 'C'/'c' -> 1; 'G'/'g' -> 2; 'T'/'t' -> 3; 'N'/'n' -> 4; anything else -> 5.
Definition at line 61 of file BaseAsciiMap.h.
Referenced by getBaseIndex(), getSpaceType(), and setBaseMapType().
unsigned char BaseAsciiMap::baseColor2int = "\005\005\005\005\005\005\005\005\005\005\005\005\005\005\005\005" [static] |
Map ASCII values to a 2 (or 3) bit encoding for the base pair value for both base and color space.
'A'/'a'/'0' -> 0; 'C'/'c'/'1' -> 1; 'G'/'g'/'2' -> 2; 'T'/'t'/'3' -> 3; 'N'/'n'/'4' -> 4; anything else -> 5.
Definition at line 56 of file BaseAsciiMap.h.
const int BaseAsciiMap::baseXIndex = 005 [static] |
Value associated with any non-base character in the ascii to base map (unknown, bad data).
Definition at line 31 of file BaseAsciiMap.h.
Referenced by getBaseIndex().
unsigned char BaseAsciiMap::color2int = "\005\005\005\005\005\005\005\005\005\005\005\005\005\005\005\005" [static] |
Map ASCII values to a 2 (or 3) bit encoding for the base pair value for just color space (0123).
'0' -> 0; '1' -> 1; '2' -> 2; '3' -> 3; '4' -> 4; anything else -> 5.
Definition at line 65 of file BaseAsciiMap.h.
Referenced by getBaseIndex(), getSpaceType(), and setBaseMapType().