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:
Inheritance graph
[legend]
Collaboration diagram for PileupElement:
Collaboration graph
[legend]

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

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.

References GenomeSequence::getBase().

00075 {
00076     if(myRefPtr != NULL)
00077     {
00078         // Add 1 to pos because getBase expects 1-based index.
00079         return(myRefPtr->getBase(myChromosome.c_str(), myRefPosition+1));
00080     }
00081     return('N');
00082 }


The documentation for this class was generated from the following files:
Generated on Mon Feb 11 13:45:25 2013 for libStatGen Software by  doxygen 1.6.3