本文整理汇总了C++中ConsensusFeature::getPeptideIdentifications方法的典型用法代码示例。如果您正苦于以下问题:C++ ConsensusFeature::getPeptideIdentifications方法的具体用法?C++ ConsensusFeature::getPeptideIdentifications怎么用?C++ ConsensusFeature::getPeptideIdentifications使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ConsensusFeature
的用法示例。
在下文中一共展示了ConsensusFeature::getPeptideIdentifications方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: compatibleIDs_
bool StablePairFinder::compatibleIDs_(const ConsensusFeature& feat1, const ConsensusFeature& feat2) const
{
// a feature without identifications always matches:
if (feat1.getPeptideIdentifications().empty() || feat2.getPeptideIdentifications().empty())
return true;
const vector<PeptideIdentification>& pep1 = feat1.getPeptideIdentifications();
const vector<PeptideIdentification>& pep2 = feat2.getPeptideIdentifications();
set<String> best1, best2;
for (vector<PeptideIdentification>::const_iterator pep_it = pep1.begin(); pep_it != pep1.end(); ++pep_it)
{
if (pep_it->getHits().empty())
continue; // shouldn't be the case
best1.insert(getBestHitSequence_(*pep_it).toString());
}
for (vector<PeptideIdentification>::const_iterator pep_it = pep2.begin(); pep_it != pep2.end(); ++pep_it)
{
if (pep_it->getHits().empty())
continue; // shouldn't be the case
best2.insert(getBestHitSequence_(*pep_it).toString());
}
return best1 == best2;
}
示例2: add
void MetaDataBrowser::add(ConsensusFeature & feature)
{
//peptide ids
for (std::vector<PeptideIdentification>::iterator it = feature.getPeptideIdentifications().begin(); it != feature.getPeptideIdentifications().end(); ++it)
{
add(*it);
}
add(static_cast<MetaInfoInterface &>(feature));
treeview_->expandItem(treeview_->findItems(QString::number(0), Qt::MatchExactly, 1).first());
}