SubcloneSeeker  1.0.0
Subclone deconvolution software framework
 All Classes Files Functions Variables Macros Pages
RefGenome Class Reference

Encapsulates a reference genome. More...

#include <RefGenome.h>

Public Member Functions

int queryChromID (std::string chrom)
 
size_t queryChromLengthWithID (int chromID)
 
size_t queryGenomeLength ()
 
size_t queryChromStartBase (int chromID)
 
const std::vector< std::string > & vec_chroms ()
 
const std::vector< int > & vec_chromIDs ()
 

Static Public Member Functions

static RefGenomegetInstance ()
 The method that returns the singleton object for the reference genome. More...
 

Protected Attributes

std::map< int, size_t > _chromLengthMap
 
std::vector< std::string > _chromNames
 
std::vector< int > _chromIDs
 

Static Protected Attributes

static RefGenome_refGenome = NULL
 

Detailed Description

Encapsulates a reference genome.

It right now has a HG19 reference genome built in, in terms of chromosome length.

Member Function Documentation

RefGenome * RefGenome::getInstance ( )
static

The method that returns the singleton object for the reference genome.

Returns
The singleton object of RefGenome
int RefGenome::queryChromID ( std::string  chrom)

returns an integer id for a given chromosome in string. The main purpose for the id representation is to unify different notions of the same chromosome, e.g. "chr10" and "10" will both be mapped to int value 10.

Parameters
chromThe string representation of a chromosome, usually read in from a .seg.txt file
Returns
an integer value representing the chromosome.
size_t RefGenome::queryChromLengthWithID ( int  chromID)

Returns the length of a chromsome

Parameters
chromIDthe integer representation of a chromosome
Returns
the length of the chromosome
size_t RefGenome::queryChromStartBase ( int  chromID)

Returns the starting position of a given chromosome, in the context of the entire genome

Parameters
chromIDthe integer representation of a chromosome
Returns
the 0-base position of the first base of the given chromosome, in the entire genome
size_t RefGenome::queryGenomeLength ( )

Returns the length of the entire genome

Returns
the length of the entire genome
const std::vector<int>& RefGenome::vec_chromIDs ( )
inline

Returns all the chromosome IDs in the genome

Returns
a vector of all chromosomes, in the format of integer ID
const std::vector<std::string>& RefGenome::vec_chroms ( )
inline

Returns all the chromosomes in the genome

Returns
a vector of all chromosomes, in the format of string

Member Data Documentation

std::vector<int> RefGenome::_chromIDs
protected

The vector of all chromosomes, in id format

std::map<int, size_t> RefGenome::_chromLengthMap
protected

The map between an chromosome id and its length

std::vector<std::string> RefGenome::_chromNames
protected

The vector of all chromosomes, in string format

RefGenome * RefGenome::_refGenome = NULL
staticprotected

The singleton object


The documentation for this class was generated from the following files: