本文整理汇总了C++中ConsensusMap::at方法的典型用法代码示例。如果您正苦于以下问题:C++ ConsensusMap::at方法的具体用法?C++ ConsensusMap::at怎么用?C++ ConsensusMap::at使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ConsensusMap
的用法示例。
在下文中一共展示了ConsensusMap::at方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: includeMSMSPeptides_
//TODO include run information for each peptide
//includes all MSMS derived peptides into the graph --consensusXML
Size ProteinResolver::includeMSMSPeptides_(ConsensusMap & consensus, vector<PeptideEntry> & peptide_nodes)
{
Size found_peptide = 0;
for (Size pep = 0; pep != consensus.size(); ++pep)
{
ConsensusFeature & feature = consensus.at(pep);
// get all peptide identifications
const vector<PeptideIdentification> & pep_id = feature.getPeptideIdentifications();
for (Size cons_pep = 0; cons_pep < pep_id.size(); ++cons_pep)
{
String seq = pep_id.at(cons_pep).getHits().front().getSequence().toUnmodifiedString();
Size peptide_entry = findPeptideEntry_(seq, peptide_nodes);
if (peptide_entry != peptide_nodes.size())
{
if (!peptide_nodes.at(peptide_entry).experimental)
{
++found_peptide;
}
//should be changed -- for consensus peptide_identification is the consensus and peptide_hit is the PeptideIdentification. PeptideHit is only top hit at the moment
peptide_nodes.at(peptide_entry).peptide_identification = pep;
peptide_nodes.at(peptide_entry).peptide_hit = cons_pep; //only top hit is used at the moment
peptide_nodes.at(peptide_entry).experimental = true;
// get intensity of the feature
peptide_nodes.at(peptide_entry).intensity = feature.getIntensity();
peptide_nodes.at(peptide_entry).origin = feature.getMetaValue("file_origin");
}
}
}
return found_peptide;
}