libStatGen Software  1
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:

List of all members.

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.

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 GenomeSequencegetReference ()
 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

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.

References GenomeSequence::getBase().

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

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends