libStatGen Software 1
|
Class for helping to filter a SAM/BAM record. More...
#include <CigarHelper.h>
Static Public Member Functions | |
static int32_t | softClipBeginByRefPos (SamRecord &record, int32_t refPosition0Based, CigarRoller &newCigar, int32_t &new0BasedPosition) |
Soft clip the cigar from the beginning of the read at the specified reference position. | |
static int32_t | softClipEndByRefPos (SamRecord &record, int32_t refPosition0Based, CigarRoller &newCigar) |
Soft clip the cigar from the back of the read at the specified reference position. | |
Static Public Attributes | |
static const int32_t | NO_CLIP = -1 |
Class for helping to filter a SAM/BAM record.
Definition at line 24 of file CigarHelper.h.
|
static |
Soft clip the cigar from the beginning of the read at the specified reference position.
If the clip position is deleted/skipped or is immediately followed by a deletion/skip/pad/insert, that entire CIGAR operation is also removed. Nothing is clipped if the reference position is before the read starts, everything is clipped if the reference position is after the read ends.
record | record to calculate the clip for. |
refPosition0Based | 0-based reference position to end the clip at |
newCigar | cigar object to set with the updated cigar. |
new0BasedPosition | new 0-based reference position of the read. |
read | position where the clip ends (last clipped position) or |
Definition at line 23 of file CigarHelper.cpp.
References CigarRoller::Add(), CigarRoller::clear(), Cigar::foundInQuery(), Cigar::foundInReference(), SamRecord::get0BasedPosition(), SamRecord::getCigar(), SamRecord::getCigarInfo(), Cigar::getOperator(), ErrorHandler::handleError(), Cigar::hardClip, CigarRoller::Set(), Cigar::size(), and Cigar::softClip.
|
static |
Soft clip the cigar from the back of the read at the specified reference position.
If the clip position is deleted/skipped or is immediately preceded by a deletion/skip/pad, that entire CIGAR operation is also removed. If the clip position is immediately preceded by an insertion, the insertion is left in the CIGAR. Nothing is clipped if the reference position is after the read ends, everything is clipped if the reference position is before the read starts (including insertions).
record | record to calculate the clip for. |
refPosition0Based | 0-based reference position to start clip at |
newCigar | cigar object to set with the updated cigar. |
read | position where the clip starts or |
Definition at line 184 of file CigarHelper.cpp.
References CigarRoller::Add(), CigarRoller::clear(), Cigar::foundInQuery(), Cigar::foundInReference(), SamRecord::get0BasedAlignmentEnd(), SamRecord::get0BasedPosition(), SamRecord::getCigar(), SamRecord::getCigarInfo(), Cigar::getOperator(), SamRecord::getReadLength(), ErrorHandler::handleError(), Cigar::hardClip, Cigar::isClip(), CigarRoller::Remove(), CigarRoller::Set(), Cigar::size(), and Cigar::softClip.
|
static |
Definition at line 27 of file CigarHelper.h.