本文整理汇总了C++中StringHash::Find方法的典型用法代码示例。如果您正苦于以下问题:C++ StringHash::Find方法的具体用法?C++ StringHash::Find怎么用?C++ StringHash::Find使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类StringHash
的用法示例。
在下文中一共展示了StringHash::Find方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
//.........这里部分代码省略.........
if (done) break;
}
// Advance to the next position where needed
for (int i = 0; i < n; i++)
if (glf[i].position == position)
glf[i].NextBaseEntry();
// Figure out the current analysis position
refBase = glf[0].data.refBase;
position = glf[0].position;
for (int i = 1; i < n; i++)
if (position > glf[i].position)
{
position = glf[i].position;
refBase = glf[i].data.refBase;
}
// Avoid alignments that extend past the end of the chromosome
if (position >= glf[firstGlf].maxPosition)
break;
baseCounts[(int)refBase]++;
// These lines can be uncommented for debugging purposes
// for (int i = 0; i < n; i++)
// printf("GLF %d : position %d, refBase %d\n", i, position, refBase);
// printf("Position: %d, refBase: %d\n", position, refBase);
if (positions.Entries())
{
filter = glf[firstGlf].label + ":" + position;
if (positions.Find(filter) < 0) continue;
}
if (refBase == 0) continue;
// Corrected calculation of root-mean-square Map Quality score
// and check if we have at least one sample with good quality data
int currentDepth = 0, totalDepth = 0, numCovered = 0;
double currentQuality = 0.0, averageMapQuality = 0.0;
bool passMapQualityFilter = false;
for (int i = 0; i < n; i++)
{
currentDepth = glf[i].GetDepth(position);
if (currentDepth != 0)
{
totalDepth += currentDepth;
numCovered++; // not currently used -- will be "NS"
currentQuality = glf[i].GetMapQuality(position);
averageMapQuality +=
currentDepth * currentQuality * currentQuality;
if (currentQuality >= mapQuality)
passMapQualityFilter = true;
}
}
averageMapQuality = sqrt(averageMapQuality / totalDepth);
filter.Clear();
if (!passMapQualityFilter)
{