本文整理汇总了C++中bam_record::read_size方法的典型用法代码示例。如果您正苦于以下问题:C++ bam_record::read_size方法的具体用法?C++ bam_record::read_size怎么用?C++ bam_record::read_size使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类bam_record
的用法示例。
在下文中一共展示了bam_record::read_size方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: addRead
void
addRead(
const bam_record& bamRead)
{
if (_isRegionInit)
{
if (bamRead.pos() > _endPos + 1000)
{
_maxPos=_endPos;
setNewRegion();
}
}
if (! _isRegionInit)
{
_minPos=bamRead.pos();
_maxPos=bamRead.pos();
_endPos=bamRead.pos() + bamRead.read_size();
_isRegionInit=true;
}
else
{
if (bamRead.pos() > _maxPos)
{
_maxPos = bamRead.pos();
_endPos=bamRead.pos() + bamRead.read_size();
}
}
_count++;
_totalReadLength += bamRead.read_size();
}
示例2: pos
void
addRead(
const bam_record& bamRead)
{
const pos_t pos(bamRead.pos()-1);
const unsigned rsize(bamRead.read_size());
if (! _isRegionInit)
{
_maxPos=pos;
_isRegionInit=true;
}
for (; _maxPos<pos; ++_maxPos) flushPos(_maxPos);
_depth.inc(pos,rsize);
_count++;
}
示例3: leadingMismatchLen
/// extract poorly aligned read ends (semi-aligned and/or soft-clipped)
/// to internal candidate format
static
void
getSVCandidatesFromSemiAligned(
const ReadScannerOptions& opt,
const ReadScannerDerivOptions& dopt,
const bam_record& bamRead,
const SimpleAlignment& bamAlign,
const FRAGSOURCE::index_t fragSource,
const reference_contig_segment& refSeq,
std::vector<SVObservation>& candidates)
{
unsigned leadingMismatchLen(0);
unsigned trailingMismatchLen(0);
pos_t leadingRefPos(0), trailingRefPos(0);
getSVBreakendCandidateSemiAligned(bamRead, bamAlign, refSeq,
dopt.isUseOverlappingPairs,
leadingMismatchLen, leadingRefPos,
trailingMismatchLen, trailingRefPos);
if ((leadingMismatchLen + trailingMismatchLen) >= bamRead.read_size()) return;
using namespace SVEvidenceType;
static const index_t svSource(SEMIALIGN);
// semi-aligned reads don't define a full hypothesis, so they're always evidence for a 'complex' ie. undefined, event
// in a fashion analogous to clipped reads
static const bool isComplex(true);
if (leadingMismatchLen >= opt.minSemiAlignedMismatchLen)
{
const pos_t pos(leadingRefPos);
candidates.push_back(GetSplitSVCandidate(dopt,bamRead.target_id(),pos,pos,svSource, fragSource,isComplex));
}
if (trailingMismatchLen >= opt.minSemiAlignedMismatchLen)
{
const pos_t pos(trailingRefPos);
candidates.push_back(GetSplitSVCandidate(dopt,bamRead.target_id(),pos,pos,svSource, fragSource,isComplex));
}
}