OpenMS
NuXLReport.h
Go to the documentation of this file.
1 // Copyright (c) 2002-2023, The OpenMS Team -- EKU Tuebingen, ETH Zurich, and FU Berlin
2 // SPDX-License-Identifier: BSD-3-Clause
3 //
4 // --------------------------------------------------------------------------
5 // $Maintainer: Timo Sachsenberg $
6 // $Authors: Timo Sachsenberg $
7 // --------------------------------------------------------------------------
8 
9 #pragma once
10 
14 
20 #include <OpenMS/FORMAT/TextFile.h>
21 
22 #include <vector>
23 
24 namespace OpenMS
25 {
26 
28 struct OPENMS_DLLAPI NuXLReportRow
29 {
30  bool no_id;
31 
32  // columns
33  double rt;
34  double original_mz;
39  double score;
40  int rank;
45  double NA_weight;
46  double xl_weight;
47  StringList meta_values; // the actual values of exported metadata
51  double m_H;
52  double m_2H;
53  double m_3H;
54  double m_4H;
56  String getString(const String& separator) const;
57 };
58 
60 struct OPENMS_DLLAPI NuXLReportRowHeader
61 {
62  static String getString(const String& separator, const StringList& meta_values_to_export);
63 };
64 
66 struct OPENMS_DLLAPI NuXLReport
67 {
68  static std::vector<NuXLReportRow> annotate(
69  const PeakMap& spectra,
70  PeptideIdentificationList& peptide_ids,
71  const StringList& meta_values_to_export,
72  double marker_ions_tolerance);
73 };
74 
75 
77 struct OPENMS_DLLAPI NuXLProteinReport
78 {
79  static void annotateProteinModificationForTopHits(std::vector<ProteinIdentification>& prot_ids,
80  const PeptideIdentificationList& peps,
81  TextFile& tsv_file);
82 
83  // crosslink efficiency = frequency of the crosslinked amino acid / frequency of the amino acid in all crosslink spectrum matches
84  static std::map<char, double> getCrossLinkEfficiency(const PeptideIdentificationList& peps);
85 
86  // returns map of adduct to counts
87  static std::map<String, size_t> countAdducts(const PeptideIdentificationList& peps);
88 
89  static void mapAccessionToTDProteins(ProteinIdentification& prot_id, std::map<String, ProteinHit*>& acc2protein_targets, std::map<String, ProteinHit*>& acc2protein_decoys);
90 };
91 
92 }
In-Memory representation of a mass spectrometry run.
Definition: MSExperiment.h:49
Container for peptide identifications from multiple spectra.
Definition: PeptideIdentificationList.h:66
Representation of a protein identification run.
Definition: ProteinIdentification.h:51
A more convenient string class.
Definition: String.h:34
Definition: TextFile.h:21
int Int
Signed integer type.
Definition: Types.h:72
std::vector< String > StringList
Vector of String.
Definition: ListUtils.h:44
Main OpenMS namespace.
Definition: openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19
std::map< String, std::vector< std::pair< double, double > > > MarkerIonsType
name to mass-intensity pair
Definition: NuXLMarkerIonExtractor.h:23
protein report
Definition: NuXLReport.h:78
static void annotateProteinModificationForTopHits(std::vector< ProteinIdentification > &prot_ids, const PeptideIdentificationList &peps, TextFile &tsv_file)
static std::map< String, size_t > countAdducts(const PeptideIdentificationList &peps)
static void mapAccessionToTDProteins(ProteinIdentification &prot_id, std::map< String, ProteinHit * > &acc2protein_targets, std::map< String, ProteinHit * > &acc2protein_decoys)
static std::map< char, double > getCrossLinkEfficiency(const PeptideIdentificationList &peps)
create header line
Definition: NuXLReport.h:61
static String getString(const String &separator, const StringList &meta_values_to_export)
struct to hold a single report line
Definition: NuXLReport.h:29
bool no_id
Definition: NuXLReport.h:30
double m_H
Definition: NuXLReport.h:51
double m_3H
Definition: NuXLReport.h:53
double best_localization_score
Definition: NuXLReport.h:41
double score
Definition: NuXLReport.h:39
NuXLMarkerIonExtractor::MarkerIonsType marker_ions
Definition: NuXLReport.h:48
String localization_scores
Definition: NuXLReport.h:42
StringList meta_values
Definition: NuXLReport.h:47
double peptide_weight
Definition: NuXLReport.h:44
double m_4H
Definition: NuXLReport.h:54
double NA_weight
Definition: NuXLReport.h:45
int rank
Definition: NuXLReport.h:40
double rel_prec_error
Definition: NuXLReport.h:50
Int charge
Definition: NuXLReport.h:38
String fragment_annotation
Definition: NuXLReport.h:55
double xl_weight
Definition: NuXLReport.h:46
String getString(const String &separator) const
double m_2H
Definition: NuXLReport.h:52
String peptide
Definition: NuXLReport.h:36
String best_localization
Definition: NuXLReport.h:43
double original_mz
Definition: NuXLReport.h:34
double abs_prec_error
Definition: NuXLReport.h:49
double rt
Definition: NuXLReport.h:33
String NA
Definition: NuXLReport.h:37
String accessions
Definition: NuXLReport.h:35
create PSM report
Definition: NuXLReport.h:67
static std::vector< NuXLReportRow > annotate(const PeakMap &spectra, PeptideIdentificationList &peptide_ids, const StringList &meta_values_to_export, double marker_ions_tolerance)