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. More... | |
int | getBaseIndex (const char &letter) |
Returns the baseIndex value for the character passed in. More... | |
SPACE_TYPE | getSpaceType () |
Return the space type that is currently set. More... | |
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. More... | |
void | resetPrimerCount () |
Reset the number of primers to 0. More... | |
void | resetBaseMapType () |
Reset the base mapping type to UNKNOWN. More... | |
Static Public Attributes | |
static const int | baseNIndex = 004 |
Value associated with 'N' in the ascii to base map (bad read). More... | |
static const int | baseXIndex = 005 |
Value associated with any non-base character in the ascii to base map (unknown, bad data). More... | |
static const char | int2base [] = "ACGTNMXXXXXXXXXX" |
Convert from int representation to the base. More... | |
static const char | int2colorSpace [] = "0123NXXXXXXXXXXX" |
Convert from int representation to colorspace representation. More... | |
static unsigned char | base2complement [] |
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. More... | |
static unsigned char | baseColor2int [256+1] |
Map ASCII values to a 2 (or 3) bit encoding for the base pair value for both base and color space. More... | |
static unsigned char | base2int [256+1] |
Map ASCII values to a 2 (or 3) bit encoding for the base pair value for just base space (ACTGNactgn). More... | |
static unsigned char | color2int [256+1] |
Map ASCII values to a 2 (or 3) bit encoding for the base pair value for just color space (0123). More... | |
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.
Enumerator | |
---|---|
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.
BaseAsciiMap::BaseAsciiMap | ( | ) |
Definition at line 137 of file BaseAsciiMap.cpp.
BaseAsciiMap::~BaseAsciiMap | ( | ) |
Definition at line 143 of file BaseAsciiMap.cpp.
|
inline |
Returns the baseIndex value for the character passed in.
Definition at line 94 of file BaseAsciiMap.h.
References base2int, baseXIndex, color2int, and setBaseMapType().
Referenced by BaseComposition::updateComposition().
|
inline |
Return the space type that is currently set.
Definition at line 134 of file BaseAsciiMap.h.
References base2int, BASE_SPACE, color2int, COLOR_SPACE, and UNKNOWN.
Referenced by BaseComposition::getSpaceType().
|
inline |
Reset the base mapping type to UNKNOWN.
Definition at line 164 of file BaseAsciiMap.h.
References resetPrimerCount().
Referenced by BaseComposition::resetBaseMapType().
|
inline |
Reset the number of primers to 0.
Definition at line 158 of file BaseAsciiMap.h.
Referenced by resetBaseMapType(), setBaseMapType(), and BaseComposition::updateComposition().
|
inline |
Set the base type based on the passed in option.
Definition at line 72 of file BaseAsciiMap.h.
References base2int, BASE_SPACE, color2int, COLOR_SPACE, and resetPrimerCount().
Referenced by getBaseIndex(), and BaseComposition::setBaseMapType().
|
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.
|
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.
|
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().
|
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.
|
static |
Value associated with 'N' in the ascii to base map (bad read).
Definition at line 28 of file BaseAsciiMap.h.
Referenced by GenomeSequence::operator[]().
|
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().
|
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().
|
static |
Convert from int representation to the base.
Definition at line 38 of file BaseAsciiMap.h.
Referenced by GenomeSequence::operator[]().
|
static |
Convert from int representation to colorspace representation.
Definition at line 40 of file BaseAsciiMap.h.
Referenced by GenomeSequence::operator[]().