本文整理汇总了C++中SamFile::PrintStatistics方法的典型用法代码示例。如果您正苦于以下问题:C++ SamFile::PrintStatistics方法的具体用法?C++ SamFile::PrintStatistics怎么用?C++ SamFile::PrintStatistics使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SamFile
的用法示例。
在下文中一共展示了SamFile::PrintStatistics方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: execute
//.........这里部分代码省略.........
// Check for valid quality.
if((qual[index] < START_QUAL) || (qual[index] > MAX_QUAL))
{
if(qual)
{
std::cerr << "Invalid Quality found: " << qual[index]
<< ". Must be between "
<< START_QUAL << " and " << MAX_QUAL << ".\n";
}
if(phred)
{
std::cerr << "Invalid Phred Quality found: " << qual[index] - PHRED_DIFF
<< ". Must be between "
<< START_QUAL << " and " << MAX_QUAL << ".\n";
}
// Skip an invalid quality.
++index;
// Update the position if this is found in the reference or a clip.
if(Cigar::foundInReference(cigarChar) || Cigar::isClip(cigarChar))
{
++refPos;
}
continue;
}
// Increment the count for this quality.
++(qualCount[(int)(qual[index])]);
++(phredCount[(int)(qual[index]) - PHRED_DIFF]);
// Update the position if this is found in the reference or a clip.
if(Cigar::foundInReference(cigarChar) || Cigar::isClip(cigarChar))
{
++refPos;
}
++index;
}
}
}
// Check the next thing to do for the read.
if((baseQCPtr != NULL) || baseSum)
{
// Pileup the bases for this read.
pileup.processAlignmentRegion(samRecord, myStartPos, myEndPos, dbsnpListPtr);
}
}
// Done with a section, move on to the next one.
// New section, so flush the pileup.
pileup.flushPileup();
}
// Flush the rest of the pileup.
if((baseQCPtr != NULL) || baseSum)
{
// Pileup the bases.
pileup.processAlignmentRegion(samRecord, myStartPos, myEndPos, dbsnpListPtr);
PileupElementBaseQCStats::printSummary();
ifclose(baseQCPtr);
}
std::cerr << "Number of records read = " <<
samIn.GetCurrentRecordCount() << std::endl;
if(basic)
{
std::cerr << std::endl;
samIn.PrintStatistics();
}
// Print the quality stats.
if(qual)
{
std::cerr << std::endl;
std::cerr << "Quality\tCount\n";
for(int i = START_QUAL; i <= MAX_QUAL; i++)
{
std::cerr << i << "\t" << qualCount[i] << std::endl;
}
}
// Print the phred quality stats.
if(phred)
{
std::cerr << std::endl;
std::cerr << "Phred\tCount\n";
for(int i = START_PHRED; i <= MAX_PHRED; i++)
{
std::cerr << i << "\t" << phredCount[i] << std::endl;
}
}
SamStatus::Status status = samIn.GetStatus();
if(status == SamStatus::NO_MORE_RECS)
{
// A status of NO_MORE_RECS means that all reads were successful.
status = SamStatus::SUCCESS;
}
return(status);
}