18 #ifndef _BASE_ASCII_MAP_H 19 #define _BASE_ASCII_MAP_H 21 #include "StringBasics.h" 88 myBase2IntMapPtr = NULL;
96 if (myBase2IntMapPtr == NULL)
99 if (myPrimerCount < myNumPrimerBases)
104 return(base2int[(
int)letter]);
115 if (myBase2IntMapPtr == NULL)
122 if ((myBase2IntMapPtr == color2int) && (myPrimerCount < myNumPrimerBases))
127 return(base2int[(
int)letter]);
130 return myBase2IntMapPtr[(int)letter];
136 if (myBase2IntMapPtr == base2int)
140 else if (myBase2IntMapPtr == color2int)
154 myNumPrimerBases = numPrimerBases;
166 myBase2IntMapPtr = NULL;
177 if (base2int[(
int)letter] != baseXIndex)
182 else if (color2int[(
int)letter] != baseXIndex)
190 myBase2IntMapPtr = NULL;
196 unsigned int myNumPrimerBases;
200 unsigned int myPrimerCount;
202 unsigned char* myBase2IntMapPtr;
void resetPrimerCount()
Reset the number of primers to 0.
static const char int2base[]
Convert from int representation to the base.
Map between characters and the associated base type.
void setNumPrimerBases(int numPrimerBases)
Set the number of primer bases expected before the actual base/color space type occurs for the rest o...
Color space only (0,1,2,3,.).
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)...
Base decision on the first raw seq character/type has yet to be determined.
void setBaseMapType(SPACE_TYPE spaceType)
Set the base type based on the passed in option.
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...
SPACE_TYPE getSpaceType()
Return the space type that is currently set.
void resetBaseMapType()
Reset the base mapping type to UNKNOWN.
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)...
SPACE_TYPE
The type of space (color or base) to use in the mapping.
int getBaseIndex(const char &letter)
Returns the baseIndex value for the character passed in.
static unsigned char base2complement[]
This table maps 5' base space to the 3' complement base space values, as well as 5' color space value...
static const int baseNIndex
Value associated with 'N' in the ascii to base map (bad read).
static const int baseXIndex
Value associated with any non-base character in the ascii to base map (unknown, bad data)...
static const char int2colorSpace[]
Convert from int representation to colorspace representation.