libStatGen Software 1
|
Class to perform a pileup of all reads by position, assuming the reads are coordinate sorted. More...
#include <Pileup.h>
Public Member Functions | |
Pileup (const FUNC_CLASS &fp=FUNC_CLASS()) | |
Constructor using the default maximum number of bases a read spans. More... | |
Pileup (int window, const FUNC_CLASS &fp=FUNC_CLASS()) | |
Constructor that sets the maximum number of bases a read spans. More... | |
Pileup (const std::string &refSeqFileName, const FUNC_CLASS &fp=FUNC_CLASS()) | |
Perform pileup with a reference. More... | |
Pileup (int window, const std::string &refSeqFileName, const FUNC_CLASS &fp=FUNC_CLASS()) | |
Perform pileup with a reference and a specified window size. More... | |
virtual | ~Pileup () |
Destructor. More... | |
virtual int | processFile (const std::string &fileName, uint16_t excludeFlag=0x0704, uint16_t includeFlag=0) |
Performs a pileup on the specified file. More... | |
virtual void | processAlignment (SamRecord &record) |
Add an alignment to the pileup. More... | |
virtual void | processAlignmentRegion (SamRecord &record, int startPos, int endPos, PosList *excludeList=NULL) |
Add only positions that fall within the specified region of the alignment to the pileup and outside of the specified excluded positions. More... | |
void | flushPileup () |
Done processing, flush every position that is currently being stored in the pileup. More... | |
Protected Member Functions | |
void | addAlignmentPosition (int refPosition, SamRecord &record) |
virtual void | flushPileup (int refID, int refPosition) |
void | flushPileup (int refPosition) |
int | pileupPosition (int refPosition) |
virtual void | resetElement (PILEUP_TYPE &element, int position) |
virtual void | addElement (PILEUP_TYPE &element, SamRecord &record) |
virtual void | analyzeElement (PILEUP_TYPE &element) |
virtual void | analyzeHead () |
Protected Attributes | |
FUNC_CLASS | myAnalyzeFuncPtr |
std::vector< PILEUP_TYPE > | myElements |
int | pileupStart |
int | pileupHead |
int | pileupTail |
int | pileupWindow |
int | myCurrentRefID |
GenomeSequence * | myRefPtr |
Class to perform a pileup of all reads by position, assuming the reads are coordinate sorted.
Pileup< PILEUP_TYPE, FUNC_CLASS >::Pileup | ( | const FUNC_CLASS & | fp = FUNC_CLASS() | ) |
Constructor using the default maximum number of bases a read spans.
Definition at line 152 of file Pileup.h.
Pileup< PILEUP_TYPE, FUNC_CLASS >::Pileup | ( | int | window, |
const FUNC_CLASS & | fp = FUNC_CLASS() |
||
) |
Constructor that sets the maximum number of bases a read spans.
This is the "window" the length of the buffer that holds the pileups for each position until the read start has moved past the position.
Definition at line 168 of file Pileup.h.
Pileup< PILEUP_TYPE, FUNC_CLASS >::Pileup | ( | const std::string & | refSeqFileName, |
const FUNC_CLASS & | fp = FUNC_CLASS() |
||
) |
Perform pileup with a reference.
Definition at line 184 of file Pileup.h.
Pileup< PILEUP_TYPE, FUNC_CLASS >::Pileup | ( | int | window, |
const std::string & | refSeqFileName, | ||
const FUNC_CLASS & | fp = FUNC_CLASS() |
||
) |
Perform pileup with a reference and a specified window size.
Definition at line 204 of file Pileup.h.
Destructor.
Definition at line 224 of file Pileup.h.
|
protected |
Definition at line 384 of file Pileup.h.
|
protectedvirtual |
|
protectedvirtual |
void Pileup< PILEUP_TYPE, FUNC_CLASS >::flushPileup |
Done processing, flush every position that is currently being stored in the pileup.
Definition at line 368 of file Pileup.h.
|
protectedvirtual |
Definition at line 421 of file Pileup.h.
|
protected |
Definition at line 439 of file Pileup.h.
|
protected |
Definition at line 466 of file Pileup.h.
|
virtual |
Add an alignment to the pileup.
Definition at line 296 of file Pileup.h.
References SamRecord::get0BasedAlignmentEnd(), SamRecord::get0BasedPosition(), and SamRecord::getReferenceID().
|
virtual |
Add only positions that fall within the specified region of the alignment to the pileup and outside of the specified excluded positions.
record | alignment to be added to the pileup. |
startPos | 0-based start position of the bases that should be added to the pileup. |
endPos | 0-based end position of the bases that should be added to the pileup (this position is not added). Set to -1 if there is no end position to the region. |
excludeList | list of refID/positions to exclude from processing. |
Definition at line 316 of file Pileup.h.
References SamRecord::get0BasedAlignmentEnd(), SamRecord::get0BasedPosition(), SamRecord::getReferenceID(), and PosList::hasPosition().
|
virtual |
Performs a pileup on the specified file.
excludeFlag | if specified, if any bit set in the exclude flag is set in the record's flag, it will be dropped. Defaulted to exclude:
|
includeFlag | if specified, every bit must be set in the record's flag for it to be included - defaulted to 0, no bits are required to be set. |
Definition at line 235 of file Pileup.h.
References SamFile::COORDINATE, SamRecord::getFlag(), SamFile::GetStatus(), SamFile::GetStatusMessage(), StatGenStatus::NO_MORE_RECS, SamFile::OpenForRead(), SamFile::ReadHeader(), SamFile::ReadRecord(), SamFile::SetReference(), and SamFile::setSortedValidation().
|
protectedvirtual |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |