本文整理汇总了C++中DeBruijnNode::getName方法的典型用法代码示例。如果您正苦于以下问题:C++ DeBruijnNode::getName方法的具体用法?C++ DeBruijnNode::getName怎么用?C++ DeBruijnNode::getName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DeBruijnNode
的用法示例。
在下文中一共展示了DeBruijnNode::getName方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
BlastQueryPath::BlastQueryPath(Path path, BlastQuery * query) :
m_path(path), m_query(query)
{
//This function follows the path, returning the BLAST hits it finds for the
//query. It requires that the hits occur in order, i.e. that each hit in
//the path begins later in the query than the previous hit.
BlastHit * previousHit = 0;
QList<DeBruijnNode *> pathNodes = m_path.getNodes();
for (int i = 0; i < pathNodes.size(); ++i)
{
DeBruijnNode * node = pathNodes[i];
QList<BlastHit *> hitsThisNode;
QList< QSharedPointer<BlastHit> > queryHits = query->getHits();
for (int j = 0; j < queryHits.size(); ++j)
{
BlastHit * hit = queryHits[j].data();
if (hit->m_node->getName() == node->getName())
hitsThisNode.push_back(hit);
}
std::sort(hitsThisNode.begin(), hitsThisNode.end(),
BlastHit::compareTwoBlastHitPointers);
for (int j = 0; j < hitsThisNode.size(); ++j)
{
BlastHit * hit = hitsThisNode[j];
//First check to make sure the hits are within the path. This means
//if we are in the first or last nodes of the path, we need to make
//sure that our hit is contained within the start/end positions.
if ( (i != 0 || hit->m_nodeStart >= m_path.getStartLocation().getPosition()) &&
(i != pathNodes.size()-1 || hit->m_nodeEnd <= m_path.getEndLocation().getPosition()))
{
//Now make sure that the hit follows the previous hit in the
//query.
if (previousHit == 0 ||
hit->m_queryStart > previousHit->m_queryStart)
{
m_hits.push_back(hit);
previousHit = hit;
}
}
}
}
}
示例2: pointEachNodeToItsReverseComplement
void AssemblyGraph::pointEachNodeToItsReverseComplement()
{
QMapIterator<QString, DeBruijnNode*> i(m_deBruijnGraphNodes);
while (i.hasNext())
{
i.next();
DeBruijnNode * positiveNode = i.value();
if (positiveNode->isPositiveNode())
{
DeBruijnNode * negativeNode = m_deBruijnGraphNodes[getOppositeNodeName(positiveNode->getName())];
if (negativeNode != 0)
{
positiveNode->setReverseComplement(negativeNode);
negativeNode->setReverseComplement(positiveNode);
}
}
}
}