#include <Genotype.h>
Inheritance diagram for Genotype:

Public Types | |
| enum | { SNP_A_ORDINAL = 1, SNP_C_ORDINAL = 2, SNP_G_ORDINAL = 3, SNP_T_ORDINAL = 4 } |
Public Member Functions | |
| Genotype () | |
| Genotype (const char *g) | |
| Genotype (const std::string &g) | |
| Genotype (const int allele1, const int allele2) | |
| bool | isMissing (void) const |
| void | setMissing (void) |
| void | set (const char *genotype) |
| void | set (const std::string &genotype) |
| const std::string | get (void) const |
| void | set (const int allele1, const int allele2) |
| void | setAllele1 (const int allele1) |
| void | setAllele2 (const int allele2) |
| void | setAllele1 (const char *allele1) |
| void | setAllele2 (const char *allele2) |
| void | setAllele1 (const std::string &allele1) |
| void | setAllele2 (const std::string &allele2) |
| const Number | getAllele1 (void) const |
| const Number | getAllele2 (void) const |
| Genotype & | operator+= (const int allele) |
| Genotype & | operator-= (const int allele) |
| Genotype & | operator+= (const Number &allele) |
| Genotype & | operator-= (const Number &allele) |
| bool | operator< (const Data &b) const |
| bool | operator== (const Data &b) const |
| const DATATYPE | getDataType (void) const |
| virtual Genotype * | clone () const |
Static Public Member Functions | |
| static void | addGenotypeMissingValue (std::string &value) |
| static bool | isMissingValue (std::string value) |
| static bool | isA (const std::string &s) |
| Determines whether a string is a valid Genotype string. | |
Private Member Functions | |
| void | _orderAlleles (void) |
| void | _setNormalizedStringRepresentation (void) |
| const char * | _itoa (unsigned int i) const |
| const char * | _snpOrdinalToCString (unsigned int allele) |
| const char * | _setAllele (const char *input, unsigned &value, bool &snp) |
Private Attributes | |
| bool | _isMissing |
| bool | _isSNP |
| std::string | _genotype |
| unsigned int | _allele1 |
| unsigned int | _allele2 |
Static Private Attributes | |
| static std::set< std::string > | _genotypeMissingValue |
| static const char | _normalDelimiter = '/' |
| static const char | _alternateDelimiter = '|' |
Genotype deals with both microsatellite marker alleles and SNP alleles.
|
|
|
|
|
|
|
|
|
|
|
|
|
||||||||||||
|
|
|
|
|
|
|
_orderAlleles(): The normal convention is to have the lesser allele shown first: |
|
||||||||||||||||
|
_setAllele(): set an allele from a char* input |
|
|
_setNormalizedStringRepresentation(): Convert genotype to the normalized form d{1,}/d{1,} or [ACGT]/[ACGT] |
|
|
_snpOrdinalToCString(): Convert unsigned int to a SNP ordinal. |
|
|
|
|
|
Implements Data. |
|
|
Implements Data. |
|
|
|
|
|
|
|
|
Implements Data. |
|
|
Determines whether a string is a valid Genotype string. isA(): Determines whether a string is a valid Genotype string |
|
|
Implements Data. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
operator < NOTA BENE: This is used for SORTING ONLY Implements Data. |
|
|
Implements Data. |
|
||||||||||||
|
|
|
|
Implements Data. |
|
|
Implements Data. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Implements Data. |
|
|
|
|
|
|
|
|
|
|
|
String representation of the genotype alleles |
|
|
|
|
|
|
|
|
Is the genotype for a SNP? |
|
|
|
1.4.4