|
OpenMS
2.6.0
|
Go to the documentation of this file.
37 #include <OpenMS/config.h>
64 explicit ROCCurve(
const std::vector<std::pair<double,bool>> & pairs);
82 void insertPair(
double score,
bool clas);
91 std::vector<std::pair<double, double> > curve(
UInt resolution = 10);
95 double cutoffPos(
double fraction = 0.95);
99 double cutoffNeg(
double fraction = 0.95);
112 inline double trapezoidal_area(
double x1,
double x2,
double y1,
double y2);
119 bool operator()(
const std::pair<double, bool> & a,
const std::pair<double, bool> & b)
121 return b.first < a.first;
void getSpectrumAlignment(std::vector< std::pair< Size, Size > > &alignment, const SpectrumType1 &s1, const SpectrumType2 &s2) const
Definition: SpectrumAlignment.h:88
Integer data array class.
Definition: DataArrays.h:52
Protease digestion_enzyme
The cleavage site information in details (from ProteaseDB)
Definition: ProteinIdentification.h:273
void setProgress(SignedSize value) const
Sets the current progress.
Base class for TOPP applications.
Definition: TOPPBase.h:144
void addLine(const StringType &line)
Definition: TextFile.h:112
static void deisotopeAndSingleCharge(MSSpectrum &spectrum, 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, bool annotate_iso_peak_count=false, bool use_decreasing_model=true, unsigned int start_intensity_check=2, bool add_up_intensity=false)
Detect isotopic clusters in a mass spectrum.
predicate for sort()
Definition: ROCCurve.h:115
Normalizes the peak intensities spectrum-wise.
Definition: Normalizer.h:57
Definition: PeptideIndexing.h:139
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.
Forward iterator for an area of peaks in an experiment.
Definition: AreaIterator.h:57
AASequence getPrefix(Size index) const
returns a peptide sequence of the first index residues
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.
Representation of a modification.
Definition: ResidueModification.h:76
void setEnzyme(const String &name)
Sets the enzyme for the digestion (by name)
String identifier
Definition: FASTAFile.h:78
static ProteaseDB * getInstance()
this member function serves as a replacement of the constructor
Definition: DigestionEnzymeDB.h:69
void sortSpectra(bool sort_mz=true)
Sorts the data points by retention time.
String & substitute(char from, char to)
Replaces all occurrences of the character from by the character to.
This class serves for reading in and writing FASTA files.
Definition: FASTAFile.h:64
WindowMower augments the highest peaks in a sliding or jumping window.
Definition: WindowMower.h:54
ConstAreaIterator areaEndConst() const
Returns an non-mutable invalid area iterator marking the end of an area.
void store(const String &filename, const PeakMap &map) const
Stores a map in an MzML file.
void setMZ(CoordinateType mz)
Mutable access to m/z.
Definition: Peak1D.h:121
String sequence
Definition: FASTAFile.h:80
void setValue(const String &key, const DataValue &value, const String &description="", const StringList &tags=StringList())
Sets a value.
UInt missed_cleavages
The number of allowed missed cleavages.
Definition: ProteinIdentification.h:268
File adapter for MzML files.
Definition: MzMLFile.h:55
A more convenient string class.
Definition: String.h:59
Iterator begin()
Definition: MSExperiment.h:157
void filterPeakSpectrum(PeakSpectrum &spectrum)
void setRT(double rt)
sets the RT of the MS2 spectrum where the identification occurred
In-Memory representation of a mass spectrometry experiment.
Definition: MSExperiment.h:77
const std::vector< Precursor > & getPrecursors() const
returns a const reference to the precursors
std::map< String, std::set< String > > mod_combinations
empirical formula -> nucleotide formula(s) (formulas if modifications lead to ambiguities)
Definition: RNPxlModificationsGenerator.h:53
void getAllNames(std::vector< String > &all_names) const
returns all the enzyme names (does NOT include synonym names)
Definition: DigestionEnzymeDB.h:122
This class provides some basic file handling methods for text files.
Definition: TextFile.h:46
void addMSLevel(int level)
adds a desired MS level for peaks to load
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:127
double getMonoWeight(Residue::ResidueType type=Residue::Full, Int charge=0) const
Definition: ResidueModification.h:99
static std::vector< RNPxlReportRow > annotate(const PeakMap &spectra, std::vector< PeptideIdentification > &peptide_ids, double marker_ions_tolerance)
double ratio
Recent ratio of numbers, see TOLERANCE_RELATIVE.
String toString() const
returns the peptide as string with modifications embedded in brackets
void startProgress(SignedSize begin, SignedSize end, const String &label) const
Initializes the progress display.
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:171
virtual void getSpectrum(PeakSpectrum &spec, const AASequence &peptide, Int min_charge, Int max_charge) const
Generates a spectrum for a peptide sequence, with the ion types that are set in the tool parameters.
String toUnmodifiedString() const
returns the peptide as string without any modifications or (e.g., "PEPTIDER")
std::vector< Int > IntList
Vector of signed integers.
Definition: ListUtils.h:55
bool operator<(const QTCluster &q1, const QTCluster &q2)
ROCCurves show the trade-off in sensitivity and specificity for binary classifiers using different cu...
Definition: ROCCurve.h:54
const double PROTON_MASS_U
#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
void endProgress() const
Ends the progress display.
FASTA entry type (identifier, description and sequence)
Definition: FASTAFile.h:76
Definition: PeptideIndexing.h:141
bool hasPrefix(const String &string) const
true if String begins with string, false otherwise
bool hasSubstring(const String &string) const
true if String contains the string, false otherwise
void setMissedCleavages(Size missed_cleavages)
Sets the number of missed cleavages for the digestion (default is 0). This setting is ignored when lo...
Size size() const
Definition: MSExperiment.h:127
NLargest removes all but the n largest peaks.
Definition: NLargest.h:54
void setHits(const std::vector< PeptideHit > &hits)
Sets the peptide hits.
const StringDataArrays & getStringDataArrays() const
Returns a const reference to the string meta data arrays.
bool fragment_mass_tolerance_ppm
Mass tolerance unit of fragment ions (true: ppm, false: Dalton)
Definition: ProteinIdentification.h:270
static DateTime now()
Returns the current date and time.
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:193
static ModificationsDB * getInstance()
Returns a pointer to the modifications DB (singleton)
String charges
The allowed charges for the search.
Definition: ProteinIdentification.h:264
Aligns the peaks of two sorted spectra Method 1: Using a banded (width via 'tolerance' parameter) ali...
Definition: SpectrumAlignment.h:67
const DigestionEnzymeType * getEnzyme(const String &name) const
Definition: DigestionEnzymeDB.h:98
void assignRanks()
Sorts the hits by score and assigns ranks according to the scores.
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:46
static String number(double d, UInt n)
returns a string for d with exactly n decimal places
void addSpectrum(const MSSpectrum &spectrum)
adds a spectrum to the list
static void applyFixedModifications(const MapToResidueType &fixed_mods, AASequence &peptide)
ConstAreaIterator areaBeginConst(CoordinateType min_rt, CoordinateType max_rt, CoordinateType min_mz, CoordinateType max_mz) const
Returns a non-mutable area iterator for area.
void filterPeakMap(PeakMap &exp) const
int charge
Definition: PeptideHit.h:86
std::vector< String > variable_modifications
Allowed variable modifications.
Definition: ProteinIdentification.h:267
Base class for all classes that want to report their progress.
Definition: ProgressLogger.h:54
static String getAnnotatedImmoniumIon(char c, const String &fragment_shift_name)
static std::map< String, PurityScores > computePrecursorPurities(const PeakMap &spectra, double precursor_mass_tolerance, bool precursor_mass_tolerance_unit_ppm)
compute precursor purity metrics for each MS2 spectrum in a PeakMap This is the main function of this...
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...
Definition: ResidueModification.h:98
String annotation
Definition: PeptideHit.h:85
String db
The used database.
Definition: ProteinIdentification.h:261
bool has(Byte byte) const
true if String contains the byte, false otherwise
StringView provides a non-owning view on an existing string.
Definition: String.h:489
CoordinateType getMZ() const
Non-mutable access to m/z.
Definition: Peak1D.h:115
Size size() const
returns the number of residues
#define OPENMS_LOG_DEBUG
Macro for general debugging information.
Definition: LogStream.h:470
void setHigherScoreBetter(bool value)
sets the peptide score orientation
std::vector< std::pair< double, bool > > score_clas_pairs_
Definition: ROCCurve.h:127
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...
bool split(const char splitter, std::vector< String > &substrings, bool quote_protect=false) const
Splits a string into substrings using splitter as delimiter.
double mz
Definition: PeptideHit.h:87
void setParameters(const Param ¶m)
Sets the parameters.
Namespace used to hide implementation details from users.
Definition: CompNovoIdentificationBase.h:244
void setCharge(Int charge)
sets the charge of the peptide
static String getVersion()
Return the version number of OpenMS.
const Param & getParameters() const
Non-mutable access to the parameters.
double intensity
Definition: PeptideHit.h:88
String data array class.
Definition: DataArrays.h:59
double fragment_mass_tolerance
Mass tolerance of fragment ions (Dalton or ppm)
Definition: ProteinIdentification.h:269
A 1-dimensional raw data point or peak.
Definition: Peak1D.h:54
ExitCodes
Exit codes.
Definition: PeptideIndexing.h:135
std::vector< String > StringList
Vector of String.
Definition: ListUtils.h:70
void sortByPosition()
Lexicographically sorts the peaks by their position.
unsigned int UInt
Unsigned integer type.
Definition: Types.h:94
void setSequence(const AASequence &sequence)
sets the peptide sequence
std::vector< String > fixed_modifications
Used fixed modifications.
Definition: ProteinIdentification.h:266
Calculates false discovery rates (FDR) from identifications.
Definition: FalseDiscoveryRate.h:77
void setPeakAnnotations(std::vector< PeptideHit::PeakAnnotation > frag_annotations)
sets the fragment annotations
int main(int argc, const char **argv)
Definition: INIFileEditor.cpp:73
String toString(const T &i)
fallback template for general purpose using Boost::Karma; more specializations below
Definition: StringUtils.h:127
double precursor_mass_tolerance
Mass tolerance of precursor ions (Dalton or ppm)
Definition: ProteinIdentification.h:271
UInt neg_
Definition: ROCCurve.h:131
const std::string ISOTOPE_ERROR
ptrdiff_t SignedSize
Signed Size type e.g. used as pointer difference.
Definition: Types.h:134
Generates theoretical spectra for peptides with various options.
Definition: TheoreticalSpectrumGenerator.h:68
const ResidueModification * addModification(std::unique_ptr< ResidueModification > new_mod)
Add a new modification to ModificationsDB. If the modification already exists (based on its fullID) i...
static std::vector< PeptideHit::PeakAnnotation > fragmentAnnotationDetailsToPHFA(const String &ion_type, std::map< Size, std::vector< FragmentAnnotationDetail_ > > ion_annotation_details)
conversion of RNPxl annotations to PeptideHit::PeakAnnotation
Represents the peptide hits for a spectrum.
Definition: PeptideIdentification.h:62
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.
bool operator==(const IDBoostGraph::ProteinGroup &lhs, const IDBoostGraph::ProteinGroup &rhs)
String substr(size_t pos=0, size_t n=npos) const
Wrapper for the STL substr() method. Returns a String object with its contents initialized to a subst...
static void load(const String &filename, std::vector< FASTAEntry > &data)
loads a FASTA file given by 'filename' and stores the information in 'data'
void filterPeakMap(PeakMap &exp)
Class for the enzymatic digestion of proteins.
Definition: ProteaseDigestion.h:60
Iterator end()
Definition: MSExperiment.h:167
AASequence getSuffix(Size index) const
returns a peptide sequence of the last index residues
static String shiftedIonsToString(const std::vector< PeptideHit::PeakAnnotation > &as)
Definition: PeptideIndexing.h:138
Refreshes the protein references for all peptide hits in a vector of PeptideIdentifications and adds ...
Definition: PeptideIndexing.h:126
Options for loading files containing peak data.
Definition: PeakFileOptions.h:47
ThresholdMower removes all peaks below a threshold.
Definition: ThresholdMower.h:51
String & reverse()
inverts the direction of the string
void getAllSearchModifications(std::vector< String > &modifications) const
Collects all modifications that can be used for identification searches.
UInt pos_
Definition: ROCCurve.h:129
void store(const String &filename)
Writes the data to a file.
Definition: ModifiedPeptideGenerator.h:58
void clearMSLevels()
clears the MS levels
bool precursor_mass_tolerance_ppm
Mass tolerance unit of precursor ions (true: ppm, false: Dalton)
Definition: ProteinIdentification.h:272
Management and storage of parameters / INI files.
Definition: Param.h:73
void clear(bool clear_meta_data)
Clears all data and meta data.
Representation of a peptide/protein sequence.
Definition: AASequence.h:111
std::vector< SpectrumType >::const_iterator ConstIterator
Non-mutable iterator.
Definition: MSExperiment.h:113
static AASequence fromString(const String &s, bool permissive=true)
create AASequence object by parsing an OpenMS string
std::map< String, double > mod_masses
empirical formula -> mass
Definition: RNPxlModificationsGenerator.h:52
static void applyVariableModifications(const MapToResidueType &var_mods, const AASequence &peptide, Size max_variable_mods_per_peptide, std::vector< AASequence > &all_modified_peptides, bool keep_original=true)
#define OPENMS_LOG_INFO
Macro if a information, e.g. a status should be reported.
Definition: LogStream.h:465
const IntegerDataArrays & getIntegerDataArrays() const
Returns a const reference to the integer meta data arrays.
CoordinateType getRT() const
returns the retention time of the current scan
Definition: AreaIterator.h:198
static MapToResidueType getModifications(const StringList &modNames)
Retrieve modifications from strings.
const double C13C12_MASSDIFF_U
Definition: PeptideIndexing.h:137
The representation of a 1D spectrum.
Definition: MSSpectrum.h:67
Search parameters of the DB search.
Definition: ProteinIdentification.h:258
void setMZ(double mz)
sets the MZ of the MS2 spectrum
bool operator()(const std::pair< double, bool > &a, const std::pair< double, bool > &b)
Definition: ROCCurve.h:119
IntensityType getIntensity() const
Definition: Peak1D.h:110
Contains annotations of a peak.
Definition: PeptideHit.h:83
void filterPeakSpectrum(PeakSpectrum &spectrum)
Int toInt() const
Conversion to int.
#define OPENMS_POSTCONDITION(condition, message)
Definition: openswathalgo/include/OpenMS/OPENSWATHALGO/Macros.h:48
static RNPxlModificationMassesResult initModificationMassesRNA(StringList target_nucleotides, StringList nt_groups, std::set< char > can_xl, StringList mappings, StringList modifications, String sequence_restriction, bool cysteine_adduct, Int max_length=4)
bool sorted_
Definition: ROCCurve.h:133
static double compute(double fragment_mass_tolerance, bool fragment_mass_tolerance_unit_ppm, const PeakSpectrum &exp_spectrum, const PeakSpectrum &theo_spectrum)
compute the (ln transformed) X!Tandem HyperScore 1. the dot product of peak intensities between match...
PeakFileOptions & getOptions()
Mutable access to the options for loading/storing.
void setLogType(LogType type) const
Sets the progress log that should be used. The default type is NONE!
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)
Definition: RNPxlModificationsGenerator.h:50
Single fragment annotation.
Definition: RNPxlFragmentAnnotationHelper.h:62
void setScoreType(const String &type)
sets the peptide score type
Used to load and store idXML files.
Definition: IdXMLFile.h:63
void setScore(double score)
sets the PSM score
Representation of a peptide hit.
Definition: PeptideHit.h:55