PileupElement Class Reference

This is a base class pileup component, representing the information for one reference position. More...

`#include <PileupElement.h>`

Inheritance diagram for PileupElement:
[legend]

## Public Member Functions

| PileupElement ()
| Pileup element constructor.
| PileupElement (const PileupElement &q)
| Constructor that resets the pileup element, does not copy, just resets.
virtual | ~PileupElement ()
| Pileup element destructor.
virtual void | addEntry (SamRecord &record)
| Add an entry to this pileup element.
virtual void | analyze ()
| Perform the analysis associated with this class.
virtual void | reset (int32_t refPosition)
| Resets the entry, setting the new position associated with this element.
const char * | getChromosome () const
| Get the chromosome name stored in this element.
int32_t | getRefPosition () const
| Get the reference position stored in this element.
char | getRefBase ()
| Returns the reference base for this pileup element. More...

## Static Public Member Functions

static void | setReference (GenomeSequence *reference)
| Set the reference to use for all pilepElements.

## Static Public Attributes

static const int32_t | UNSET_POSITION = -1

## Static Protected Member Functions

static GenomeSequence * | getReference ()
| Get a pointer to the reference.

## Detailed Description

This is a base class pileup component, representing the information for one reference position.

Child classes will be defined to detail more information that needs to be saved and how it should be analyzed.

Definition at line 26 of file PileupElement.h.

## Member Function Documentation

## getRefBase()

char PileupElement::getRefBase | ( |  | ) |

Returns the reference base for this pileup element.

Only works if a reference has been set, otherwise, 'N' is returned.

Definition at line 74 of file PileupElement.cpp.

{
if(myRefPtr != NULL)
{
// Add 1 to pos because getBase expects 1-based index.
return(myRefPtr->getBase(myChromosome.c_str(), myRefPosition+1));
}
return('N');
}

References GenomeSequence::getBase().

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

- bam/PileupElement.h
- bam/PileupElement.cpp

GenomeSequence::getBase
char getBase(const char *chromosomeName, unsigned int chromosomeIndex) const
given a chromosome name and 1-based position, return the reference base.
Definition: GenomeSequence.h:388