Loading...
Searching...
No Matches
Chromosome Class Reference

## Public Member Functions

| Chromosome (GenomeSequence *gs, unsigned int chrosomeIndex)
| Chromosome (GenomeSequence *gs, const char *chromosomeName)
| Chromosome (const char *genomseSequenceFileName, unsigned int chromosomeIndex, bool isColorSpace)
| Chromosome (const std::string &genomseSequenceFileName, unsigned int chromosomeIndex, bool isColorSpace)
genomeIndex_t | Length () const
char | operator[] (genomeIndex_t index) const
const char * | Name () const

## Detailed Description

Definition at line 6 of file Chromosome.h.

## Constructor & Destructor Documentation

## Chromosome() [1/4]

Chromosome::Chromosome | ( | GenomeSequence * | gs,
|  | unsigned int | chrosomeIndex )

explicit

Definition at line 4 of file Chromosome.cpp.

{
assert(gs);
assert(chromosomeIndex < (unsigned int)gs->getChromosomeCount());
this->gs = gs;
this->chromosomeIndex = chromosomeIndex;
this->offset = gs->getChromosomeStart((int)chromosomeIndex);
this->chromosomeSize = gs->getChromosomeSize((int)chromosomeIndex);
}

## Chromosome() [2/4]

Chromosome::Chromosome | ( | GenomeSequence * | gs,
|  | const char * | chromosomeName )

explicit

Definition at line 15 of file Chromosome.cpp.

{
assert(gs);
this->gs = gs;
this->chromosomeIndex = gs->getChromosome(chromosomeName);
assert(chromosomeIndex != INVALID_CHROMOSOME_INDEX);
this->offset = gs->getChromosomeStart((int)chromosomeIndex);
this->chromosomeSize = gs->getChromosomeSize((int)chromosomeIndex);
}

## Chromosome() [3/4]

Chromosome::Chromosome | ( | const char * | genomseSequenceFileName,
|  | unsigned int | chromosomeIndex,
|  | bool | isColorSpace )

explicit

Definition at line 27 of file Chromosome.cpp.

{
std::string s(genomseSequenceFileName);
gs = new GenomeSequence;
assert(gs);
gs->setReferenceName(s);
assert(!gs->open(isColorSpace));
this->chromosomeIndex = chromosomeIndex;
this->offset = gs->getChromosomeStart((int)chromosomeIndex);
this->chromosomeSize = gs->getChromosomeSize((int)chromosomeIndex);
}

## Chromosome() [4/4]

Chromosome::Chromosome | ( | const std::string & | genomseSequenceFileName,
|  | unsigned int | chromosomeIndex,
|  | bool | isColorSpace )

explicit

Definition at line 39 of file Chromosome.cpp.

{
gs = new GenomeSequence;
assert(gs);
gs->setReferenceName(genomseSequenceFileName);
assert(!gs->open(isColorSpace));
this->chromosomeIndex = chromosomeIndex;
this->offset = gs->getChromosomeStart((int)chromosomeIndex);
this->chromosomeSize = gs->getChromosomeSize((int)chromosomeIndex);
}

## Member Function Documentation

## Length()

genomeIndex_t Chromosome::Length | ( |  | ) | const

inline

Definition at line 12 of file Chromosome.h.

{
return chromosomeSize;
}

## Name()

const char * Chromosome::Name | ( |  | ) | const

inline

Definition at line 22 of file Chromosome.h.

{
return gs->getChromosomeName(this->chromosomeIndex);
}

## operator[]()

char Chromosome::operator[] | ( | genomeIndex_t | index | ) | const

inline

Definition at line 17 of file Chromosome.h.

{
index += offset;
return (*gs)[index];
}

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

- general/Chromosome.h
- general/Chromosome.cpp