OpenMS  2.4.0
ROCCurve.h
Go to the documentation of this file.
1 // --------------------------------------------------------------------------
2 // OpenMS -- Open-Source Mass Spectrometry
3 // --------------------------------------------------------------------------
4 // Copyright The OpenMS Team -- Eberhard Karls University Tuebingen,
5 // ETH Zurich, and Freie Universitaet Berlin 2002-2018.
6 //
7 // This software is released under a three-clause BSD license:
8 // * Redistributions of source code must retain the above copyright
9 // notice, this list of conditions and the following disclaimer.
10 // * Redistributions in binary form must reproduce the above copyright
11 // notice, this list of conditions and the following disclaimer in the
12 // documentation and/or other materials provided with the distribution.
13 // * Neither the name of any author or any participating institution
14 // may be used to endorse or promote products derived from this software
15 // without specific prior written permission.
16 // For a full list of authors, refer to the file AUTHORS.
17 // --------------------------------------------------------------------------
18 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19 // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 // ARE DISCLAIMED. IN NO EVENT SHALL ANY OF THE AUTHORS OR THE CONTRIBUTING
22 // INSTITUTIONS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
23 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
24 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
25 // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
26 // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
27 // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
28 // ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 //
30 // --------------------------------------------------------------------------
31 // $Maintainer: Timo Sachsenberg $
32 // $Authors: $
33 // --------------------------------------------------------------------------
34 
35 #pragma once
36 
37 #include <OpenMS/config.h>
38 #include <OpenMS/CONCEPT/Types.h>
39 
40 #include <list>
41 #include <vector>
42 
43 namespace OpenMS
44 {
45  namespace Math
46  {
54  class OPENMS_DLLAPI ROCCurve
55  {
56 public:
57 
58  // @name Constructors and Destructors
59  // @{
61  ROCCurve();
62 
64  virtual ~ROCCurve();
65 
67  ROCCurve(const ROCCurve & source);
68  // @}
69 
70  // @name Operators
71  // @{
73  ROCCurve & operator=(const ROCCurve & source);
74  // @}
75 
76  // @name Accessors
77  // @{
79  void insertPair(double score, bool clas);
80 
82  double AUC();
83 
85  std::vector<std::pair<double, double> > curve(UInt resolution = 10);
86 
88  double cutoffPos(double fraction = 0.95);
89 
91  double cutoffNeg(double fraction = 0.95);
92  // @}
93 
94 private:
95 
97  class OPENMS_DLLAPI simsortdec
98  {
99 public:
100 
101  bool operator()(const std::pair<double, bool> & a, const std::pair<double, bool> & b)
102  {
103  return b.first < a.first;
104  }
105 
106  };
107 
108 
109  std::list<std::pair<double, bool> > score_clas_pairs_;
110 
112 
114  };
115  }
116 }
RNPxlSearch::preprocessSpectra_
void preprocessSpectra_(PeakMap &exp, double fragment_mass_tolerance, bool fragment_mass_tolerance_unit_ppm, bool single_charge_spectra, bool annotate_charge=false)
Definition: RNPxlSearch.cpp:366
OpenMS::SpectrumAlignment::getSpectrumAlignment
void getSpectrumAlignment(std::vector< std::pair< Size, Size > > &alignment, const SpectrumType1 &s1, const SpectrumType2 &s2) const
Definition: SpectrumAlignment.h:86
OpenMS::DataArrays::IntegerDataArray
Integer data array class.
Definition: DataArrays.h:51
RNPxlSearch::RNPxlParameterParsing::getTargetNucleotideToFragmentAdducts
static NucleotideToFragmentAdductMap getTargetNucleotideToFragmentAdducts(StringList fragment_adducts)
Definition: RNPxlSearch.cpp:2421
OpenMS::ProteinIdentification::SearchParameters::digestion_enzyme
Protease digestion_enzyme
The cleavage site information in details (from ProteaseDB)
Definition: ProteinIdentification.h:118
RNPxlSearch::MS2AdductsOfSinglePrecursorAdduct::feasible_adducts
vector< NucleotideToFeasibleFragmentAdducts > feasible_adducts
Definition: RNPxlSearch.cpp:275
OpenMS::ProgressLogger::setProgress
void setProgress(SignedSize value) const
Sets the current progress.
RNPxlSearch::mapPrecursorMassesToScans
void mapPrecursorMassesToScans(const Int min_precursor_charge, const Int max_precursor_charge, const IntList &precursor_isotopes, const double small_peptide_mass_filter_threshold, const Size peptide_min_size, const PeakMap &spectra, multimap< double, pair< Size, int >> &multimap_mass_2_scan_index) const
Definition: RNPxlSearch.cpp:1341
RNPxlSearch::RNPxlParameterParsing::NucleotideToFragmentAdductMap
map< char, set< FragmentAdductDefinition_ > > NucleotideToFragmentAdductMap
Definition: RNPxlSearch.cpp:286
RNPxlSearch::scorePartialLossFragments_
void scorePartialLossFragments_(const PeakSpectrum &exp_spectrum, double fragment_mass_tolerance, bool fragment_mass_tolerance_unit_ppm, const PeakSpectrum &partial_loss_spectrum_z1, const PeakSpectrum &partial_loss_spectrum_z2, const PeakSpectrum &marker_ions_sub_score_spectrum_z1, float &partial_loss_sub_score, float &marker_ions_sub_score, float &plss_MIC, float &plss_err, float &plss_Morph) const
Definition: RNPxlSearch.cpp:2273
RNPxlSearch::AnnotatedHit::cross_linked_nucleotide
char cross_linked_nucleotide
Definition: RNPxlSearch.cpp:326
OpenMS::TOPPBase
Base class for TOPP applications.
Definition: TOPPBase.h:150
OpenMS::TextFile::addLine
void addLine(const StringType &line)
Definition: TextFile.h:112
TextFile.h
RNPxlSearch
Definition: RNPxlSearch.cpp:94
OpenMS::Math::ROCCurve::simsortdec
predicate for sort()
Definition: ROCCurve.h:97
OpenMS::RNPxlModificationMassesResult
Definition: RNPxlModificationsGenerator.h:49
OpenMS::ModificationsDB::getModification
const ResidueModification & getModification(Size index) const
Returns the modification with the given index.
ListUtilsIO.h
OpenMS::Normalizer
Normalizes the peak intensities spectrum-wise.
Definition: Normalizer.h:57
OpenMS::PeptideIndexing::PEPTIDE_IDS_EMPTY
@ PEPTIDE_IDS_EMPTY
Definition: PeptideIndexing.h:133
OpenMS::FalseDiscoveryRate::apply
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.
OpenMS::Internal::AreaIterator
Forward iterator for an area of peaks in an experiment.
Definition: AreaIterator.h:57
OpenMS::AASequence::getPrefix
AASequence getPrefix(Size index) const
returns a peptide sequence of the first index residues
RNPxlSearch::AnnotatedHit::total_MIC
float total_MIC
Definition: RNPxlSearch.cpp:341
RNPxlSearch::FragmentAdductDefinition_::mass
double mass
Definition: RNPxlSearch.cpp:243
OpenMS::ResidueModification
Representation of a modification.
Definition: ResidueModification.h:76
OpenMS::ProteaseDigestion::setEnzyme
void setEnzyme(const String &name)
Sets the enzyme for the digestion (by name)
Types.h
RNPxlSearch::RNPxlFragmentIonGenerator
Definition: RNPxlSearch.cpp:463
OpenMS::FASTAFile::FASTAEntry::identifier
String identifier
Definition: FASTAFile.h:78
OpenMS::DigestionEnzymeDB< DigestionEnzymeProtein, ProteaseDB >::getInstance
static ProteaseDB * getInstance()
this member function serves as a replacement of the constructor
Definition: DigestionEnzymeDB.h:70
Int
OpenMS::MSExperiment::sortSpectra
void sortSpectra(bool sort_mz=true)
Sorts the data points by retention time.
OpenMS::String::substitute
String & substitute(char from, char to)
Replaces all occurrences of the character from by the character to.
OpenMS::FASTAFile
This class serves for reading in and writing FASTA files.
Definition: FASTAFile.h:64
OpenMS::WindowMower
WindowMower augments the highest peaks in a sliding or jumping window.
Definition: WindowMower.h:54
OpenMS::MSExperiment::areaEndConst
ConstAreaIterator areaEndConst() const
Returns an non-mutable invalid area iterator marking the end of an area.
OpenMS::MzMLFile::store
void store(const String &filename, const PeakMap &map) const
Stores a map in an MzML file.
RNPxlSearch::RNPxlFragmentIonGenerator::generatePartialLossSpectrum
static void generatePartialLossSpectrum(const String &unmodified_sequence, const AASequence &fixed_and_variable_modified_peptide, const double &fixed_and_variable_modified_peptide_weight, const String &precursor_rna_adduct, const double &precursor_rna_weight, const int &precursor_charge, const vector< FragmentAdductDefinition_ > &partial_loss_modification, const TheoreticalSpectrumGenerator &partial_loss_spectrum_generator, PeakSpectrum &partial_loss_spectrum)
Definition: RNPxlSearch.cpp:2802
OpenMS::Peak1D::setMZ
void setMZ(CoordinateType mz)
Mutable access to m/z.
Definition: Peak1D.h:119
OpenMS::Constants::k
const double k
OpenMS::FASTAFile::FASTAEntry::sequence
String sequence
Definition: FASTAFile.h:80
OpenMS::Param::setValue
void setValue(const String &key, const DataValue &value, const String &description="", const StringList &tags=StringList())
Sets a value.
OpenMS::ProteinIdentification::SearchParameters::missed_cleavages
UInt missed_cleavages
The number of allowed missed cleavages.
Definition: ProteinIdentification.h:113
OpenMS::MzMLFile
File adapter for MzML files.
Definition: MzMLFile.h:55
OpenMS::String
A more convenient string class.
Definition: String.h:57
OpenMS::MSExperiment::begin
Iterator begin()
Definition: MSExperiment.h:157
OpenMS::ModificationsDB::getInstance
static ModificationsDB * getInstance(OpenMS::String unimod_file="CHEMISTRY/unimod.xml", OpenMS::String psimod_file="CHEMISTRY/PSI-MOD.obo", OpenMS::String xlmod_file="CHEMISTRY/XLMOD.obo")
Returns a pointer to the modifications DB (singleton)
Definition: ModificationsDB.h:77
OpenMS::EmpiricalFormula::getMonoWeight
double getMonoWeight() const
returns the mono isotopic weight of the formula (includes proton charges)
OpenMS::WindowMower::filterPeakSpectrum
void filterPeakSpectrum(PeakSpectrum &spectrum)
MzMLFile.h
RNPxlSearch::AnnotatedHit::immonium_score
float immonium_score
Definition: RNPxlSearch.cpp:344
RNPxlSearch::RNPxlSearch
RNPxlSearch()
Definition: RNPxlSearch.cpp:108
RNPxlSearch::RNPxlParameterParsing::PrecursorsToMS2Adducts
map< String, MS2AdductsOfSinglePrecursorAdduct > PrecursorsToMS2Adducts
Definition: RNPxlSearch.cpp:307
RNPxlReport.h
OpenMS::PeptideIdentification::setRT
void setRT(double rt)
sets the RT of the MS2 spectrum where the identification occurred
OpenMS::MSExperiment
In-Memory representation of a mass spectrometry experiment.
Definition: MSExperiment.h:77
OpenMS::SpectrumSettings::getPrecursors
const std::vector< Precursor > & getPrecursors() const
returns a const reference to the precursors
OpenMS::DigestionEnzymeDB::getAllNames
void getAllNames(std::vector< String > &all_names) const
returns all the enzyme names (does NOT include synonym names)
Definition: DigestionEnzymeDB.h:122
OpenMS::TextFile
This class provides some basic file handling methods for text files.
Definition: TextFile.h:46
OpenMS::PeakFileOptions::addMSLevel
void addMSLevel(int level)
adds a desired MS level for peaks to load
OpenMS::Size
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:127
OpenMS::AASequence::getMonoWeight
double getMonoWeight(Residue::ResidueType type=Residue::Full, Int charge=0) const
IdXMLFile.h
FeatureXMLFile.h
OpenMS::Constants::c
const double c
RNPxlSearch::AnnotatedHit
Slimmer structure as storing all scored candidates in PeptideHit objects takes too much space.
Definition: RNPxlSearch.cpp:318
OpenMS::ResidueModification::N_TERM
@ N_TERM
Definition: ResidueModification.h:99
OpenMS::ResidueModification::setTermSpecificity
void setTermSpecificity(TermSpecificity term_spec)
Sets the term specificity.
OpenMS::RNPxlReport::annotate
static std::vector< RNPxlReportRow > annotate(const PeakMap &spectra, std::vector< PeptideIdentification > &peptide_ids, double marker_ions_tolerance)
OpenMS::Internal::ClassTest::ratio
double ratio
Recent ratio of numbers, see TOLERANCE_RELATIVE.
HyperScore.h
LOG_INFO
#define LOG_INFO
Macro if a information, e.g. a status should be reported.
Definition: LogStream.h:454
RNPxlModificationsGenerator.h
OpenMS::AASequence::toString
String toString() const
returns the peptide as string with modifications embedded in brackets
OpenMS::ProgressLogger::startProgress
void startProgress(SignedSize begin, SignedSize end, const String &label) const
Initializes the progress display.
OpenMS::PeptideIndexing::run
ExitCodes run(std::vector< FASTAFile::FASTAEntry > &proteins, std::vector< ProteinIdentification > &prot_ids, std::vector< PeptideIdentification > &pep_ids)
forward for old interface and pyOpenMS; use run<T>() for more control
Definition: PeptideIndexing.h:147
OpenMS::TheoreticalSpectrumGenerator::getSpectrum
virtual void getSpectrum(PeakSpectrum &spec, const AASequence &peptide, Int min_charge, Int max_charge) const
returns a spectrum with the ion types, that are set in the tool parameters
OpenMS::AASequence::toUnmodifiedString
String toUnmodifiedString() const
returns the peptide as string without any modifications
OpenMS::IntList
std::vector< Int > IntList
Vector of signed integers.
Definition: ListUtils.h:58
OpenMS::ResidueModification::setFullId
void setFullId(const String &full_id="")
Sets the full identifier (Unimod Accession + origin, if available)
OpenMS::Math::ROCCurve
ROCCurves show the trade-off in sensitivity and specificity for binary classifiers using different cu...
Definition: ROCCurve.h:54
ResidueDB.h
SpectrumSettings.h
OpenMS::Constants::PROTON_MASS_U
const double PROTON_MASS_U
OpenMS::ProgressLogger::endProgress
void endProgress() const
Ends the progress display.
RNPxlMarkerIonExtractor.h
RNPxlSearch::registerOptionsAndFlags_
void registerOptionsAndFlags_() override
Sets the valid command line options (with argument) and flags (without argument).
Definition: RNPxlSearch.cpp:114
Constants.h
OpenMS::FASTAFile::FASTAEntry
FASTA entry type (identifier, description and sequence)
Definition: FASTAFile.h:76
RNPxlSearch::RNPxlFragmentIonGenerator::addShiftedImmoniumIons
static void addShiftedImmoniumIons(const String &unmodified_sequence, const String &fragment_shift_name, const double fragment_shift_mass, PeakSpectrum &partial_loss_spectrum, PeakSpectrum::IntegerDataArray &partial_loss_spectrum_charge, PeakSpectrum::StringDataArray &partial_loss_spectrum_annotation)
Definition: RNPxlSearch.cpp:2708
OpenMS::PeptideIndexing::UNEXPECTED_RESULT
@ UNEXPECTED_RESULT
Definition: PeptideIndexing.h:135
OpenMS::String::hasPrefix
bool hasPrefix(const String &string) const
true if String begins with string, false otherwise
OpenMS::String::hasSubstring
bool hasSubstring(const String &string) const
true if String contains the string, false otherwise
OpenMS::EnzymaticDigestion::setMissedCleavages
void setMissedCleavages(Size missed_cleavages)
Sets the number of missed cleavages for the digestion (default is 0). This setting is ignored when lo...
OpenMS::MSExperiment::size
Size size() const
Definition: MSExperiment.h:127
OpenMS::NLargest
NLargest removes all but the n largest peaks.
Definition: NLargest.h:54
OpenMS::PeptideIdentification::setHits
void setHits(const std::vector< PeptideHit > &hits)
Sets the peptide hits.
RNPxlSearch::FragmentAdductDefinition_
Definition: RNPxlSearch.cpp:239
OpenMS::MSSpectrum::getStringDataArrays
const StringDataArrays & getStringDataArrays() const
Returns a const reference to the string meta data arrays.
RNPxlSearch::AnnotatedHit::pl_err
float pl_err
Definition: RNPxlSearch.cpp:337
OpenMS::ProteinIdentification::SearchParameters::fragment_mass_tolerance_ppm
bool fragment_mass_tolerance_ppm
Mass tolerance unit of fragment ions (true: ppm, false: Dalton)
Definition: ProteinIdentification.h:115
OpenMS::DateTime::now
static DateTime now()
Returns the current date and time.
OpenMS::EmpiricalFormula::toString
String toString() const
returns the formula as a string (charges are not included)
OpenMS::ListUtils::concatenate
static String concatenate(const std::vector< T > &container, const String &glue="")
Concatenates all elements of the container and puts the glue string between elements.
Definition: ListUtils.h:175
WindowMower.h
OpenMS::ProteinIdentification::SearchParameters::charges
String charges
The allowed charges for the search.
Definition: ProteinIdentification.h:109
RNPxlSearch::AnnotatedHit::partial_loss_score
float partial_loss_score
Definition: RNPxlSearch.cpp:348
OpenMS::SpectrumAlignment
Aligns the peaks of two sorted spectra Method 1: Using a banded (width via 'tolerance' parameter) ali...
Definition: SpectrumAlignment.h:65
RNPxlFragmentAnnotationHelper.h
OpenMS::DigestionEnzymeDB::getEnzyme
const DigestionEnzymeType * getEnzyme(const String &name) const
Definition: DigestionEnzymeDB.h:99
OpenMS::PeptideIdentification::assignRanks
void assignRanks()
Sorts the hits by score and assigns ranks according to the scores.
OpenMS
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:46
OpenMS::RNPxlModificationMassesResult::mod_combinations
std::map< String, std::set< String > > mod_combinations
Definition: RNPxlModificationsGenerator.h:52
OpenMS::String::number
static String number(double d, UInt n)
returns a string for d with exactly n decimal places
OpenMS::MSExperiment::addSpectrum
void addSpectrum(const MSSpectrum &spectrum)
adds a spectrum to the list
LOG_DEBUG
#define LOG_DEBUG
Macro for general debugging information.
Definition: LogStream.h:458
ProteaseDigestion.h
OpenMS::MSExperiment::areaBeginConst
ConstAreaIterator areaBeginConst(CoordinateType min_rt, CoordinateType max_rt, CoordinateType min_mz, CoordinateType max_mz) const
Returns a non-mutable area iterator for area.
OpenMS::Normalizer::filterPeakMap
void filterPeakMap(PeakMap &exp) const
OpenMS::PeptideHit::PeakAnnotation::charge
int charge
Definition: PeptideHit.h:85
OpenMS::ProteinIdentification::SearchParameters::variable_modifications
std::vector< String > variable_modifications
Allowed variable modifications.
Definition: ProteinIdentification.h:112
OpenMS::ProgressLogger
Base class for all classes that want to report their progress.
Definition: ProgressLogger.h:54
ProteaseDB.h
OpenMS::Internal::RNPxlFragmentAnnotationHelper::getAnnotatedImmoniumIon
static String getAnnotatedImmoniumIon(char c, const String &fragment_shift_name)
LOG_WARN
#define LOG_WARN
Macro if a warning, a piece of information which should be read by the user, should be logged.
Definition: LogStream.h:450
OpenMS::MetaInfoInterface::setMetaValue
void setMetaValue(const String &name, const DataValue &value)
Sets the DataValue corresponding to a name.
RNPxlSearch::AnnotatedHit::pl_Morph
float pl_Morph
Definition: RNPxlSearch.cpp:338
RNPxlSearch::RNPxlFragmentIonGenerator::addMS2MarkerIons
static void addMS2MarkerIons(const vector< FragmentAdductDefinition_ > &marker_ions, PeakSpectrum &spectrum, PeakSpectrum::IntegerDataArray &spectrum_charge, PeakSpectrum::StringDataArray &spectrum_annotation)
Definition: RNPxlSearch.cpp:2671
RNPxlSearch::FragmentAdductDefinition_::operator<
bool operator<(const FragmentAdductDefinition_ &other) const
Definition: RNPxlSearch.cpp:255
OpenMS::MzMLFile::load
void load(const String &filename, PeakMap &map)
Loads a map from a MzML file. Spectra and chromatograms are sorted by default (this can be disabled u...
OpenMS::ResidueModification::C_TERM
@ C_TERM
Definition: ResidueModification.h:98
OpenMS::PeptideHit::PeakAnnotation::annotation
String annotation
Definition: PeptideHit.h:84
RNPxlSearch::RNPxlParameterParsing::getFeasibleFragmentAdducts
static MS2AdductsOfSinglePrecursorAdduct getFeasibleFragmentAdducts(const String &exp_pc_adduct, const String &exp_pc_formula, const NucleotideToFragmentAdductMap &nucleotide_to_fragment_adducts, const set< char > &can_xl)
Definition: RNPxlSearch.cpp:2506
OpenMS::ModifiedPeptideGenerator::applyVariableModifications
static void applyVariableModifications(const std::vector< ResidueModification >::const_iterator &var_mods_begin, const std::vector< ResidueModification >::const_iterator &var_mods_end, const AASequence &peptide, Size max_variable_mods_per_peptide, std::vector< AASequence > &all_modified_peptides, bool keep_original=true)
double
FASTAFile.h
RNPxlSearch::AnnotatedHit::MIC
float MIC
Definition: RNPxlSearch.cpp:331
OpenMS::ProteinIdentification::SearchParameters::db
String db
The used database.
Definition: ProteinIdentification.h:106
OpenMS::String::has
bool has(Byte byte) const
true if String contains the byte, false otherwise
OpenMS::StringView
StringView provides a non-owning view on an existing string.
Definition: String.h:480
RNPxlSearch::RNPxlParameterParsing
Definition: RNPxlSearch.cpp:280
FeatureMap.h
RNPxlSearch::AnnotatedHit::sequence
StringView sequence
Definition: RNPxlSearch.cpp:320
Param.h
RNPxlSearch::RNPxlFragmentIonGenerator::addSpecialLysImmonumIons
static void addSpecialLysImmonumIons(const String &unmodified_sequence, PeakSpectrum &spectrum, PeakSpectrum::IntegerDataArray &spectrum_charge, PeakSpectrum::StringDataArray &spectrum_annotation)
Definition: RNPxlSearch.cpp:2687
RNPxlSearch::can_xl_
set< char > can_xl_
Definition: RNPxlSearch.cpp:104
OpenMS::Peak1D::getMZ
CoordinateType getMZ() const
Non-mutable access to m/z.
Definition: Peak1D.h:113
OpenMS::AASequence::size
Size size() const
returns the number of residues
RNPxlSearch::RNPxlParameterParsing::getAllFeasibleFragmentAdducts
static PrecursorsToMS2Adducts getAllFeasibleFragmentAdducts(const RNPxlModificationMassesResult &precursor_adducts, const NucleotideToFragmentAdductMap &nucleotide_to_fragment_adducts, const set< char > &can_xl)
Definition: RNPxlSearch.cpp:2370
OpenMS::PeptideIdentification::setHigherScoreBetter
void setHigherScoreBetter(bool value)
sets the peptide score orientation
OpenMS::MorpheusScore::compute
static Result compute(double fragment_mass_tolerance, bool fragment_mass_tolerance_unit_ppm, const PeakSpectrum &exp_spectrum, const PeakSpectrum &theo_spectrum)
returns Morpheus Score, #matched ions, #total ions, #matched intensities, #total fragment intensities...
OpenMS::String::split
bool split(const char splitter, std::vector< String > &substrings, bool quote_protect=false) const
Splits a string into substrings using splitter as delimiter.
OpenMS::PeptideHit::PeakAnnotation::mz
double mz
Definition: PeptideHit.h:86
main
int main(int argc, const char **argv)
Definition: RNPxlSearch.cpp:2924
OpenMS::DefaultParamHandler::setParameters
void setParameters(const Param &param)
Sets the parameters.
RNPxlSearch::RNPxlFragmentIonGenerator::addPrecursorWithCompleteRNA_
static void addPrecursorWithCompleteRNA_(const double fixed_and_variable_modified_peptide_weight, const String &precursor_rna_adduct, const double precursor_rna_weight, const int charge, PeakSpectrum &partial_loss_spectrum, MSSpectrum::IntegerDataArray &partial_loss_spectrum_charge, MSSpectrum::StringDataArray &partial_loss_spectrum_annotation)
Definition: RNPxlSearch.cpp:2907
OpenMS::ModifiedPeptideGenerator::applyFixedModifications
static void applyFixedModifications(const std::vector< ResidueModification >::const_iterator &fixed_mods_begin, const std::vector< ResidueModification >::const_iterator &fixed_mods_end, AASequence &peptide)
OpenMS::Internal
Namespace used to hide implementation details from users.
Definition: CompNovoIdentificationBase.h:250
RNPxlSearch::AnnotatedHit::peptide_mod_index
SignedSize peptide_mod_index
Definition: RNPxlSearch.cpp:321
Normalizer.h
OpenMS::PeptideHit::setCharge
void setCharge(Int charge)
sets the charge of the peptide
OpenMS::VersionInfo::getVersion
static String getVersion()
Return the version number of OpenMS.
OpenMS::DefaultParamHandler::getParameters
const Param & getParameters() const
Non-mutable access to the parameters.
RNPxlSearch::AnnotatedHit::isotope_error
int isotope_error
Definition: RNPxlSearch.cpp:323
RNPxlSearch::AnnotatedHit::localization_scores
String localization_scores
Definition: RNPxlSearch.cpp:351
OpenMS::PeptideHit::PeakAnnotation::intensity
double intensity
Definition: PeptideHit.h:87
OpenMS::DataArrays::StringDataArray
String data array class.
Definition: DataArrays.h:57
OpenMS::ProteinIdentification::SearchParameters::fragment_mass_tolerance
double fragment_mass_tolerance
Mass tolerance of fragment ions (Dalton or ppm)
Definition: ProteinIdentification.h:114
OpenMS::Deisotoper::deisotopeAndSingleCharge
static void deisotopeAndSingleCharge(MSSpectrum &spectra, double fragment_tolerance, bool fragment_unit_ppm, int min_charge=1, int max_charge=3, bool keep_only_deisotoped=false, unsigned int min_isopeaks=3, unsigned int max_isopeaks=10, bool make_single_charged=true, bool annotate_charge=false)
OpenMS::Peak1D
A 1-dimensional raw data point or peak.
Definition: Peak1D.h:54
OpenMS::PeptideIndexing::ExitCodes
ExitCodes
Exit codes.
Definition: PeptideIndexing.h:129
OpenMS::StringList
std::vector< String > StringList
Vector of String.
Definition: ListUtils.h:73
OpenMS::MSSpectrum::sortByPosition
void sortByPosition()
Lexicographically sorts the peaks by their position.
RNPxlSearch::postScoreHits_
void postScoreHits_(const PeakMap &exp, vector< vector< AnnotatedHit > > &annotated_hits, Size top_hits, const RNPxlModificationMassesResult &mm, const vector< ResidueModification > &fixed_modifications, const vector< ResidueModification > &variable_modifications, Size max_variable_mods_per_peptide, const TheoreticalSpectrumGenerator &partial_loss_spectrum_generator, double fragment_mass_tolerance, bool fragment_mass_tolerance_unit_ppm, const RNPxlParameterParsing::PrecursorsToMS2Adducts &all_feasible_adducts)
Definition: RNPxlSearch.cpp:513
OpenMS::UInt
unsigned int UInt
Unsigned integer type.
Definition: Types.h:94
OpenMS::PeptideHit::setSequence
void setSequence(const AASequence &sequence)
sets the peptide sequence
OpenMS::Math::ROCCurve::score_clas_pairs_
std::list< std::pair< double, bool > > score_clas_pairs_
Definition: ROCCurve.h:109
OpenMS::ProteinIdentification::SearchParameters::fixed_modifications
std::vector< String > fixed_modifications
Used fixed modifications.
Definition: ProteinIdentification.h:111
RNPxlSearch::postProcessHits_
void postProcessHits_(const PeakMap &exp, vector< vector< AnnotatedHit > > &annotated_hits, vector< ProteinIdentification > &protein_ids, vector< PeptideIdentification > &peptide_ids, Size top_hits, const RNPxlModificationMassesResult &mm, const vector< ResidueModification > &fixed_modifications, const vector< ResidueModification > &variable_modifications, Size max_variable_mods_per_peptide)
Filter by top scoring hits, reconstruct original peptide from memory efficient structure,...
Definition: RNPxlSearch.cpp:1185
ModificationsDB.h
NLargest.h
RNPxlSearch::AnnotatedHit::marker_ions_score
float marker_ions_score
Definition: RNPxlSearch.cpp:347
RNPxlSearch::MS2AdductsOfSinglePrecursorAdduct
Definition: RNPxlSearch.cpp:273
OpenMS::FalseDiscoveryRate
Calculates an FDR from identifications.
Definition: FalseDiscoveryRate.h:64
RNPxlSearch::AnnotatedHit::fragment_annotations
std::vector< PeptideHit::PeakAnnotation > fragment_annotations
Definition: RNPxlSearch.cpp:353
OpenMS::PeptideHit::setPeakAnnotations
void setPeakAnnotations(std::vector< PeptideHit::PeakAnnotation > frag_annotations)
sets the fragment annotations
main
int main(int argc, const char **argv)
Definition: INIFileEditor.cpp:73
RNPxlSearch::AnnotatedHit::hasBetterScore
static bool hasBetterScore(const AnnotatedHit &a, const AnnotatedHit &b)
Definition: RNPxlSearch.cpp:355
RNPxlSearch::AnnotatedHit::score
float score
Definition: RNPxlSearch.cpp:328
RNPxlSearch::MS2AdductsOfSinglePrecursorAdduct::marker_ions
vector< FragmentAdductDefinition_ > marker_ions
Definition: RNPxlSearch.cpp:276
MSExperiment.h
OpenMS::ProteinIdentification::SearchParameters::precursor_mass_tolerance
double precursor_mass_tolerance
Mass tolerance of precursor ions (Dalton or ppm)
Definition: ProteinIdentification.h:116
OpenMS::Math::ROCCurve::neg_
UInt neg_
Definition: ROCCurve.h:113
OpenMS::IdXMLFile::store
void store(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.
OpenMS::SignedSize
ptrdiff_t SignedSize
Signed Size type e.g. used as pointer difference.
Definition: Types.h:134
OpenMS::TheoreticalSpectrumGenerator
Generates theoretical spectra with various options.
Definition: TheoreticalSpectrumGenerator.h:63
OpenMS::ResidueModification::setDiffMonoMass
void setDiffMonoMass(double mass)
sets the difference monoisotopic mass
OpenMS::Internal::RNPxlFragmentAnnotationHelper::fragmentAnnotationDetailsToPHFA
static std::vector< PeptideHit::PeakAnnotation > fragmentAnnotationDetailsToPHFA(const String &ion_type, std::map< Size, std::vector< FragmentAnnotationDetail_ > > ion_annotation_details)
OpenMS::PeptideIdentification
Represents the peptide hits for a spectrum.
Definition: PeptideIdentification.h:62
RNPxlDeisotoper.h
OpenMS::EnzymaticDigestion::digestUnmodified
Size digestUnmodified(const StringView &sequence, std::vector< StringView > &output, Size min_length=1, Size max_length=0) const
Performs the enzymatic digestion of an unmodified sequence.
OpenMS::FASTAFile::load
static void load(const String &filename, std::vector< FASTAEntry > &data)
loads a FASTA file given by 'filename' and stores the information in 'data'
OpenMS::ThresholdMower::filterPeakMap
void filterPeakMap(PeakMap &exp)
OpenMS::ProteaseDigestion
Class for the enzymatic digestion of proteins.
Definition: ProteaseDigestion.h:60
OpenMS::MSExperiment::end
Iterator end()
Definition: MSExperiment.h:167
OpenMS::AASequence::getSuffix
AASequence getSuffix(Size index) const
returns a peptide sequence of the last index residues
OpenMS::RNPxlModificationMassesResult::mod_masses
std::map< String, double > mod_masses
Definition: RNPxlModificationsGenerator.h:51
OpenMS::ResidueModification::setId
void setId(const String &id)
set the identifier of the modification
OpenMS::PeptideHit::getScore
double getScore() const
returns the PSM score
RNPxlSearch::main_
ExitCodes main_(int, const char **) override
The actual "main" method. main_() is invoked by main().
Definition: RNPxlSearch.cpp:1467
OpenMS::Internal::RNPxlFragmentAnnotationHelper::shiftedIonsToString
static String shiftedIonsToString(const std::vector< PeptideHit::PeakAnnotation > &as)
OpenMS::EmpiricalFormula
Representation of an empirical formula.
Definition: EmpiricalFormula.h:81
OpenMS::PeptideIndexing::DATABASE_EMPTY
@ DATABASE_EMPTY
Definition: PeptideIndexing.h:132
ElementDB.h
OpenMS::PeptideIndexing
Refreshes the protein references for all peptide hits in a vector of PeptideIdentifications and adds ...
Definition: PeptideIndexing.h:123
RNPxlSearch::scoreTotalLossFragments_
void scoreTotalLossFragments_(const PeakSpectrum &exp_spectrum, const PeakSpectrum &total_loss_spectrum, double fragment_mass_tolerance, bool fragment_mass_tolerance_unit_ppm, const PeakSpectrum &a_ion_sub_score_spectrum, const PeakSpectrum &precursor_sub_score_spectrum, const PeakSpectrum &immonium_sub_score_spectrum, float &total_loss_score, float &tlss_MIC, float &tlss_err, float &tlss_Morph, float &immonium_sub_score, float &precursor_sub_score, float &a_ion_sub_score) const
Definition: RNPxlSearch.cpp:2218
OpenMS::ModificationsDB::addModification
void addModification(ResidueModification *new_mod)
Add a new modification to ModificationsDB.
OpenMS::PeakFileOptions
Options for loading files containing peak data.
Definition: PeakFileOptions.h:47
OpenMS::ThresholdMower
ThresholdMower removes all peaks below a threshold.
Definition: ThresholdMower.h:51
RNPxlSearch::NucleotideToFeasibleFragmentAdducts
pair< char, vector< FragmentAdductDefinition_ > > NucleotideToFeasibleFragmentAdducts
Definition: RNPxlSearch.cpp:270
OpenMS::TOPPBase::ExitCodes
ExitCodes
Exit codes.
Definition: TOPPBase.h:155
PeptideIndexing.h
OpenMS::ResidueModification::setName
void setName(const String &name)
sets the name of modification
OpenMS::String::reverse
String & reverse()
inverts the direction of the string
OpenMS::ModificationsDB::getAllSearchModifications
void getAllSearchModifications(std::vector< String > &modifications) const
Collects all modifications that can be used for identification searches.
OpenMS::Math::ROCCurve::pos_
UInt pos_
Definition: ROCCurve.h:111
OpenMS::TextFile::store
void store(const String &filename)
Writes the data to a file.
OpenMS::PeakFileOptions::clearMSLevels
void clearMSLevels()
clears the MS levels
OpenMS::ProteinIdentification::SearchParameters::precursor_mass_tolerance_ppm
bool precursor_mass_tolerance_ppm
Mass tolerance unit of precursor ions (true: ppm, false: Dalton)
Definition: ProteinIdentification.h:117
OpenMS::Param
Management and storage of parameters / INI files.
Definition: Param.h:74
OpenMS::RNPxlReportRowHeader
Definition: RNPxlReport.h:79
OpenMS::MSExperiment::clear
void clear(bool clear_meta_data)
Clears all data and meta data.
OpenMS::AASequence
Representation of a peptide/protein sequence.
Definition: AASequence.h:107
MorpheusScore.h
ModifiedPeptideGenerator.h
OpenMS::MSExperiment::ConstIterator
std::vector< SpectrumType >::const_iterator ConstIterator
Non-mutable iterator.
Definition: MSExperiment.h:113
ResidueModification.h
OpenMS::AASequence::fromString
static AASequence fromString(const String &s, bool permissive=true)
create AASequence object by parsing an OpenMS string
TheoreticalSpectrumGenerator.h
OpenMS::MSSpectrum::getIntegerDataArrays
const IntegerDataArrays & getIntegerDataArrays() const
Returns a const reference to the integer meta data arrays.
OpenMS::Internal::AreaIterator::getRT
CoordinateType getRT() const
returns the retention time of the current scan
Definition: AreaIterator.h:198
SpectrumAlignment.h
OpenMS::Constants::C13C12_MASSDIFF_U
const double C13C12_MASSDIFF_U
OpenMS::PeptideIndexing::EXECUTION_OK
@ EXECUTION_OK
Definition: PeptideIndexing.h:131
RNPxlSearch::AnnotatedHit::pl_MIC
float pl_MIC
Definition: RNPxlSearch.cpp:336
RNPxlSearch::AnnotatedHit::rna_mod_index
Size rna_mod_index
Definition: RNPxlSearch.cpp:322
OpenMS::MSSpectrum
The representation of a 1D spectrum.
Definition: MSSpectrum.h:66
RNPxlSearch::AnnotatedHit::err
float err
Definition: RNPxlSearch.cpp:332
OpenMS::ProteinIdentification::SearchParameters
Search parameters of the DB search.
Definition: ProteinIdentification.h:103
OpenMS::PeptideIdentification::setMZ
void setMZ(double mz)
sets the MZ of the MS2 spectrum
FalseDiscoveryRate.h
RNPxlSearch::AnnotatedHit::Morph
float Morph
Definition: RNPxlSearch.cpp:333
OpenMS::Math::ROCCurve::simsortdec::operator()
bool operator()(const std::pair< double, bool > &a, const std::pair< double, bool > &b)
Definition: ROCCurve.h:101
RNPxlSearch::FragmentAdductDefinition_::operator==
bool operator==(const FragmentAdductDefinition_ &other) const
Definition: RNPxlSearch.cpp:262
OpenMS::Peak1D::getIntensity
IntensityType getIntensity() const
Definition: Peak1D.h:108
RNPxlSearch::AnnotatedHit::best_localization
String best_localization
Definition: RNPxlSearch.cpp:352
RNPxlSearch::initializeSpectrumGenerators
void initializeSpectrumGenerators(TheoreticalSpectrumGenerator &total_loss_spectrum_generator, TheoreticalSpectrumGenerator &partial_loss_spectrum_generator, TheoreticalSpectrumGenerator &a_ion_sub_score_spectrum_generator, TheoreticalSpectrumGenerator &immonium_ion_sub_score_spectrum_generator, TheoreticalSpectrumGenerator &precursor_ion_sub_score_spectrum_generator) const
Definition: RNPxlSearch.cpp:1399
OpenMS::PeptideHit::PeakAnnotation
Contains annotations of a peak.
Definition: PeptideHit.h:82
OpenMS::TOPPBase::main
ExitCodes main(int argc, const char **argv)
Main routine of all TOPP applications.
StandardTypes.h
OpenMS::StringConversions::toString
String toString(T i)
toString functions (single argument)
Definition: StringUtils.h:68
OpenMS::NLargest::filterPeakSpectrum
void filterPeakSpectrum(PeakSpectrum &spectrum)
OpenMS::String::toInt
Int toInt() const
Conversion to int.
OPENMS_POSTCONDITION
#define OPENMS_POSTCONDITION(condition, message)
Definition: openswathalgo/include/OpenMS/OPENSWATHALGO/Macros.h:48
OpenMS::RNPxlModificationsGenerator::initModificationMassesRNA
static RNPxlModificationMassesResult initModificationMassesRNA(StringList target_nucleotides, std::set< char > can_xl, StringList mappings, StringList modifications, String sequence_restriction, bool cysteine_adduct, Int max_length=4)
OpenMS::HyperScore::compute
static double compute(double fragment_mass_tolerance, bool fragment_mass_tolerance_unit_ppm, const PeakSpectrum &exp_spectrum, const PeakSpectrum &theo_spectrum)
OpenMS::MzMLFile::getOptions
PeakFileOptions & getOptions()
Mutable access to the options for loading/storing.
OpenMS::ProgressLogger::setLogType
void setLogType(LogType type) const
Sets the progress log that should be used. The default type is NONE!
TOPPBase.h
OpenMS::Internal::RNPxlFragmentAnnotationHelper::addShiftedPeakFragmentAnnotation_
static void addShiftedPeakFragmentAnnotation_(const std::map< Size, std::vector< FragmentAnnotationDetail_ >> &shifted_b_ions, const std::map< Size, std::vector< FragmentAnnotationDetail_ >> &shifted_y_ions, const std::map< Size, std::vector< FragmentAnnotationDetail_ >> &shifted_a_ions, const std::vector< PeptideHit::PeakAnnotation > &shifted_immonium_ions, const std::vector< PeptideHit::PeakAnnotation > &annotated_marker_ions, const std::vector< PeptideHit::PeakAnnotation > &annotated_precursor_ions, std::vector< PeptideHit::PeakAnnotation > &fas)
RNPxlSearch::FragmentAdductDefinition_::name
String name
Definition: RNPxlSearch.cpp:242
OpenMS::Internal::RNPxlFragmentAnnotationHelper::FragmentAnnotationDetail_
Single fragment annotation.
Definition: RNPxlFragmentAnnotationHelper.h:61
OpenMS::PeptideIdentification::setScoreType
void setScoreType(const String &type)
sets the peptide score type
MSSpectrum.h
OpenMS::IdXMLFile
Used to load and store idXML files.
Definition: IdXMLFile.h:63
ThresholdMower.h
RNPxlSearch::AnnotatedHit::a_ion_score
float a_ion_score
Definition: RNPxlSearch.cpp:346
OpenMS::PeptideHit::setScore
void setScore(double score)
sets the PSM score
OpenMS::PeptideHit
Representation of a peptide hit.
Definition: PeptideHit.h:54
RNPxlSearch::AnnotatedHit::precursor_score
float precursor_score
Definition: RNPxlSearch.cpp:345
RNPxlSearch::FragmentAdductDefinition_::formula
EmpiricalFormula formula
Definition: RNPxlSearch.cpp:241
RNPxlSearch::RNPxlParameterParsing::getModifications
static vector< ResidueModification > getModifications(StringList modNames)
Query ResidueModifications (given as strings) from ModificationsDB.
Definition: RNPxlSearch.cpp:2342