 |
OpenMS
3.0.0
|
|
Go to the documentation of this file.
43 #include <unordered_map>
46 #include <unordered_set>
51 struct ScoreToTgtDecLabelPairs;
90 void apply(std::vector<PeptideIdentification>& fwd_ids, std::vector<PeptideIdentification>& rev_ids)
const;
98 void apply(std::vector<PeptideIdentification>&
id,
bool annotate_peptide_fdr =
false)
const;
106 void apply(std::vector<ProteinIdentification>& fwd_ids, std::vector<ProteinIdentification>& rev_ids)
const;
113 void apply(std::vector<ProteinIdentification>& ids)
const;
120 void applyEstimated(std::vector<ProteinIdentification>& ids)
const;
131 double applyEvaluateProteinIDs(
const std::vector<ProteinIdentification>& ids,
double pepCutoff = 1.0,
UInt fpCutoff = 50,
double diffWeight = 0.2)
const;
141 double applyEvaluateProteinIDs(
const ProteinIdentification& ids,
double pepCutoff = 1.0,
UInt fpCutoff = 50,
double diffWeight = 0.2)
const;
152 double applyEvaluateProteinIDs(
ScoreToTgtDecLabelPairs& score_to_tgt_dec_fraction_pairs,
double pepCutoff = 1.0,
UInt fpCutoff = 50,
double diffWeight = 0.2)
const;
155 void applyBasic(
const std::vector<ProteinIdentification> & run_info, std::vector<PeptideIdentification> & ids);
157 void applyBasic(std::vector<PeptideIdentification> & ids,
bool higher_score_better,
int charge = 0,
String identifier =
"",
bool only_best_per_pep =
false);
159 void applyBasic(
ConsensusMap & cmap,
bool use_unassigned_peptides =
true);
176 double rocN(
const std::vector<PeptideIdentification>& ids,
Size fp_cutoff)
const;
180 double rocN(
const std::vector<PeptideIdentification>& ids,
Size fp_cutoff,
const String& identifier)
const;
184 double rocN(
const ConsensusMap& ids,
Size fp_cutoff,
bool include_unassigned_peptides =
false)
const;
188 double rocN(
const ConsensusMap& ids,
Size fp_cutoff,
const String& identifier,
bool include_unassigned_peptides =
false)
const;
242 void calculateFDRs_(std::map<double, double>& score_to_fdr, std::vector<double>& target_scores, std::vector<double>& decoy_scores,
bool q_value,
bool higher_score_better)
const;
245 void handleObservationMatch_(
248 std::vector<double>& target_scores,
249 std::vector<double>& decoy_scores,
250 std::map<IdentificationData::IdentifiedMolecule, bool>& molecule_to_decoy,
251 std::map<IdentificationData::ObservationMatchRef, double>& match_to_score)
const;
255 void calculateEstimatedQVal_(std::map<double, double> &scores_to_FDR,
257 bool higher_score_better)
const;
264 void calculateFDRBasic_(std::map<double,double>& scores_to_FDR,
ScoreToTgtDecLabelPairs& scores_labels,
bool qvalue,
bool higher_score_better)
const;
268 double trapezoidal_area_xEqy(
double exp1,
double exp2,
double act1,
double act2)
const;
271 double trapezoidal_area(
double x1,
double x2,
double y1,
double y2)
const;
Base class for TOPP applications.
Definition: TOPPBase.h:147
void apply(std::vector< PeptideIdentification > &fwd_ids, std::vector< PeptideIdentification > &rev_ids) const
Calculates the FDR of two runs, a forward run and a decoy run on peptide level.
void store(const String &filename, const std::vector< ProteinIdentification > &protein_ids, const std::vector< PeptideIdentification > &peptide_ids, const String &document_id="")
Stores the data in an idXML file.
A more convenient string class.
Definition: String.h:58
Finds decoy strings in ProteinIdentification runs.
Definition: FalseDiscoveryRate.h:212
static void updateProteinReferences(std::vector< PeptideIdentification > &peptides, const std::vector< ProteinIdentification > &proteins, bool remove_peptides_without_reference=false)
Removes references to missing proteins.
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:127
static bool updateProteinGroups(std::vector< ProteinIdentification::ProteinGroup > &groups, const std::vector< ProteinHit > &hits)
Update protein groups after protein hits were filtered.
#define OPENMS_LOG_WARN
Macro if a warning, a piece of information which should be read by the user, should be logged.
Definition: LogStream.h:460
Representation of a protein identification run.
Definition: ProteinIdentification.h:70
A base class for all classes handling default parameters.
Definition: DefaultParamHandler.h:92
void load(const String &filename, std::vector< ProteinIdentification > &protein_ids, std::vector< PeptideIdentification > &peptide_ids)
Loads the identifications of an idXML file without identifier.
#define OPENMS_LOG_FATAL_ERROR
Macro to be used if fatal error are reported (processing stops)
Definition: LogStream.h:450
bool is_prefix
on success, was it a prefix or suffix
Definition: FalseDiscoveryRate.h:222
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47
static void removeUnreferencedProteins(ConsensusMap &cmap, bool include_unassigned)
String name
on success, what was the decoy string?
Definition: FalseDiscoveryRate.h:221
Wrapper that adds operator< to iterators, so they can be used as (part of) keys in maps/sets or multi...
Definition: MetaData.h:45
void applyBasic(const std::vector< ProteinIdentification > &run_info, std::vector< PeptideIdentification > &ids)
simpler reimplementation of the apply function above for PSMs. With charge and identifier info from r...
static void updateHitRanks(std::vector< IdentificationType > &ids)
Updates the hit ranks on all peptide or protein IDs.
Definition: IDFilter.h:742
void setParameters(const Param ¶m)
Sets the parameters.
const Param & getDefaults() const
Non-mutable access to the default parameters.
static Size countHits(const std::vector< IdentificationType > &ids)
Returns the total number of peptide/protein hits in a vector of peptide/protein identifications.
Definition: IDFilter.h:614
A container for consensus elements.
Definition: ConsensusMap.h:82
unsigned int UInt
Unsigned integer type.
Definition: Types.h:94
Calculates false discovery rates (FDR) from identifications.
Definition: FalseDiscoveryRate.h:77
int main(int argc, const char **argv)
Definition: INIFileEditor.cpp:71
Representation of spectrum identification results and associated data.
Definition: IdentificationData.h:94
Finds the most common decoy string in the accessions of proteins. Checks for suffix and prefix and so...
Definition: FalseDiscoveryRate.h:218
Param copy(const std::string &prefix, bool remove_prefix=false) const
Returns a new Param object containing all entries that start with prefix.
Definition: IDScoreGetterSetter.h:55
static void removeEmptyIdentifications(std::vector< IdentificationType > &ids)
Removes peptide or protein identifications that have no hits in them.
Definition: IDFilter.h:828
Management and storage of parameters / INI files.
Definition: Param.h:69
static String prefix(const String &this_s, size_t length)
Definition: StringUtilsSimple.h:147
bool success
did more than 30% of proteins have the *same* prefix or suffix
Definition: FalseDiscoveryRate.h:220
static void filterHitsByScore(std::vector< IdentificationType > &ids, double threshold_score)
Filters peptide or protein identifications according to the score of the hits.
Definition: IDFilter.h:840
#define OPENMS_LOG_INFO
Macro if a information, e.g. a status should be reported.
Definition: LogStream.h:465
Used to load and store idXML files.
Definition: IdXMLFile.h:68