当前位置: 首页>>代码示例>>C++>>正文


C++ ConsensusFeature::getPeptideIdentifications方法代码示例

本文整理汇总了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;
  }
开发者ID:chahuistle,项目名称:OpenMS,代码行数:26,代码来源:StablePairFinder.cpp

示例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());
  }
开发者ID:OpenMS,项目名称:OpenMS,代码行数:12,代码来源:MetaDataBrowser.cpp


注:本文中的ConsensusFeature::getPeptideIdentifications方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。