OpenMS
Loading...
Searching...
No Matches
PercolatorFeatureSetHelper.h
Go to the documentation of this file.
1// Copyright (c) 2002-present, OpenMS Inc. -- EKU Tuebingen, ETH Zurich, and FU Berlin
2// SPDX-License-Identifier: BSD-3-Clause
3//
4// --------------------------------------------------------------------------
5// $Maintainer: Mathias Walzer $
6// $Authors: Mathias Walzer, Matthew The $
7// --------------------------------------------------------------------------
8
9#pragma once
10
11#include <vector>
12#include <cmath>
13#include <string>
14#include <map>
15// #include <algorithm>
16#include <limits>
17
25
26namespace OpenMS
27{
38 class OPENMS_DLLAPI PercolatorFeatureSetHelper
39 {
40
41 public:
50 static void concatMULTISEPeptideIds(PeptideIdentificationList& all_peptide_ids, PeptideIdentificationList& new_peptide_ids, const std::string& search_engine);
51
60 static void mergeMULTISEPeptideIds(PeptideIdentificationList& all_peptide_ids, PeptideIdentificationList& new_peptide_ids, const std::string& search_engine);
61
69 static void mergeMULTISEProteinIds(std::vector<ProteinIdentification>& all_protein_ids, std::vector<ProteinIdentification>& new_protein_ids);
70
71
79 static void addMSGFFeatures(PeptideIdentificationList& peptide_ids, StringList& feature_set);
80
88 static void addXTANDEMFeatures(PeptideIdentificationList& peptide_ids, StringList& feature_set);
89
97 static void addCOMETFeatures(PeptideIdentificationList& peptide_ids, StringList& feature_set);
98
111 static void addANDESFeatures(PeptideIdentificationList& peptide_ids, StringList& feature_set);
112
120 static void addMASCOTFeatures(PeptideIdentificationList& peptide_ids, StringList& feature_set);
121
132 static void addMULTISEFeatures(PeptideIdentificationList& peptide_ids, StringList& search_engines_used, StringList& feature_set, bool complete_only = true, bool limits_imputation = false);
133
142 static void addCONCATSEFeatures(PeptideIdentificationList& peptide_id_list, StringList& search_engines_used, StringList& feature_set);
143
151 static void checkExtraFeatures(const std::vector<PeptideHit> &psms, StringList& extra_features);
152
159 static void addMSFRAGGERFeatures(StringList& extra_features);
160
161
162 protected:
164 static double rescaleFragmentFeature_(double featureValue, int NumMatchedMainIons);
165
167 static void assignDeltaScore_(std::vector<PeptideHit>& hits, const std::string& score_ref, const std::string& output_ref);
168
171
174 {
175 inline bool operator() (const ProteinHit& h1, const ProteinHit& h2)
176 {
177 return (h1.getAccession() < h2.getAccession());
178 }
179 };
180
183 {
184 inline bool operator() (const PeptideEvidence& h1, const PeptideEvidence& h2)
185 {
186 return (h1.getProteinAccession() < h2.getProteinAccession());
187 }
188 };
189
190 };
191
192} //namespace OpenMS
193
194
typename VecMember::iterator iterator
Definition ExposedVector.h:68
Representation of a peptide evidence.
Definition PeptideEvidence.h:28
const std::string & getProteinAccession() const
get the protein accession the peptide matches to. If not available the empty string is returned.
Container for peptide identifications from multiple spectra.
Definition PeptideIdentificationList.h:66
Percolator feature set and integration helper.
Definition PercolatorFeatureSetHelper.h:39
static void addMSFRAGGERFeatures(StringList &extra_features)
addMSFraggerFeatures
static void addMASCOTFeatures(PeptideIdentificationList &peptide_ids, StringList &feature_set)
addMASCOTFeatures
static std::string getScanMergeKey_(PeptideIdentificationList::iterator it, PeptideIdentificationList::iterator start)
gets the scan identifier to merge by
static void mergeMULTISEPeptideIds(PeptideIdentificationList &all_peptide_ids, PeptideIdentificationList &new_peptide_ids, const std::string &search_engine)
mergeMULTISEPeptideIds
static void addXTANDEMFeatures(PeptideIdentificationList &peptide_ids, StringList &feature_set)
addXTANDEMFeatures
static void addMSGFFeatures(PeptideIdentificationList &peptide_ids, StringList &feature_set)
addMSGFFeatures
static void addCOMETFeatures(PeptideIdentificationList &peptide_ids, StringList &feature_set)
addCOMETFeatures
static void concatMULTISEPeptideIds(PeptideIdentificationList &all_peptide_ids, PeptideIdentificationList &new_peptide_ids, const std::string &search_engine)
concatMULTISEPeptideIds
static void checkExtraFeatures(const std::vector< PeptideHit > &psms, StringList &extra_features)
checkExtraFeatures
static void mergeMULTISEProteinIds(std::vector< ProteinIdentification > &all_protein_ids, std::vector< ProteinIdentification > &new_protein_ids)
mergeMULTISEProteinIds
static void addMULTISEFeatures(PeptideIdentificationList &peptide_ids, StringList &search_engines_used, StringList &feature_set, bool complete_only=true, bool limits_imputation=false)
addMULTISEFeatures
static void addCONCATSEFeatures(PeptideIdentificationList &peptide_id_list, StringList &search_engines_used, StringList &feature_set)
addCONCATSEFeatures
static double rescaleFragmentFeature_(double featureValue, int NumMatchedMainIons)
Rescales the fragment features to penalize features calculated by few ions, adapted from MSGFtoPercol...
static void assignDeltaScore_(std::vector< PeptideHit > &hits, const std::string &score_ref, const std::string &output_ref)
helper function for assigning the frequently occurring feature delta score
static void addANDESFeatures(PeptideIdentificationList &peptide_ids, StringList &feature_set)
addANDESFeatures
Representation of a protein hit.
Definition ProteinHit.h:35
const std::string & getAccession() const
returns the accession of the protein
std::vector< std::string > StringList
Vector of String.
Definition ListUtils.h:44
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19
For accession dependent sorting of PeptideEvidences.
Definition PercolatorFeatureSetHelper.h:183
For accession dependent sorting of ProteinHits.
Definition PercolatorFeatureSetHelper.h:174