OpenMS  2.6.0
MissedCleavages.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-2020.
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: Chris Bielow $
32 // $Authors: Swenja Wagner, Patricia Scheil $
33 // --------------------------------------------------------------------------
34 
35 
36 #pragma once
37 
38 #include <OpenMS/QC/QCBase.h>
39 
40 #include <vector>
41 #include <map>
42 namespace OpenMS
43 {
44  class FeatureMap;
55  class OPENMS_DLLAPI MissedCleavages : public QCBase
56  {
57  public:
59  MissedCleavages() = default;
60 
62  virtual ~MissedCleavages() = default;
63 
73  void compute(FeatureMap& fmap);
74 
76  const String& getName() const override;
77 
79  const std::vector<std::map<UInt32, UInt32>>& getResults() const;
80 
85  QCBase::Status requires() const override;
86 
87  private:
89  std::vector<std::map<UInt32, UInt32>> mc_result_;
90  };
91 } // namespace OpenMS
OpenMS::EmpiricalFormula::getNumberOf
SignedSize getNumberOf(const Element *element) const
returns the number of atoms for a certain element (can be negative)
OpenMS::CubicSpline2d
cubic spline interpolation as described in R.L. Burden, J.D. Faires, Numerical Analysis,...
Definition: CubicSpline2d.h:53
OpenMS::IsotopeDistribution::ContainerType
std::vector< MassAbundance > ContainerType
Definition: IsotopeDistribution.h:72
OpenMS::PeptideHit::getCharge
Int getCharge() const
returns the charge of the peptide
OpenMS::TOPPBase
Base class for TOPP applications.
Definition: TOPPBase.h:144
OpenMS::TextFile::end
ConstIterator end() const
Gives access to the underlying text buffer.
OpenMS::TextFile::addLine
void addLine(const StringType &line)
Definition: TextFile.h:112
TextFile.h
OpenMS::Math::sum
static double sum(IteratorType begin, IteratorType end)
Calculates the sum of a range of values.
Definition: StatisticFunctions.h:120
OpenMS::IsotopeDistribution::set
void set(const ContainerType &distribution)
overwrites the container which holds the distribution using distribution
double
MapRateToScoreType
map< double, double > MapRateToScoreType
Definition: MetaProSIP.cpp:84
OpenMS::QCBase::Status
Storing a status of available/needed inputs (i.e. a set of Requires) as UInt64.
Definition: QCBase.h:120
OpenMS::Math::median
static double median(IteratorType begin, IteratorType end, bool sorted=false)
Calculates the median of a range of values.
Definition: StatisticFunctions.h:151
OpenMS::Internal::AreaIterator
Forward iterator for an area of peaks in an experiment.
Definition: AreaIterator.h:57
OpenMS::String::random
static String random(UInt length)
returns a random string of the given length. It consists of [0-9a-zA-Z]
OpenMS::PeptideHit::getSequence
const AASequence & getSequence() const
returns the peptide sequence without trailing or following spaces
IsotopePattern
pair< double, vector< double > > IsotopePattern
Definition: MetaProSIP.cpp:85
OpenMS::PeptideIdentification::insertHit
void insertHit(const PeptideHit &hit)
Appends a peptide hit.
CubicSpline2d.h
OpenMS::Element
Representation of an element.
Definition: Element.h:53
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::MSExperiment::areaEndConst
ConstAreaIterator areaEndConst() const
Returns an non-mutable invalid area iterator marking the end of an area.
OpenMS::Peak1D::setMZ
void setMZ(CoordinateType mz)
Mutable access to m/z.
Definition: Peak1D.h:121
OpenMS::Peak2D
A 2-dimensional raw data point or peak.
Definition: Peak2D.h:54
OpenMS::Constants::k
const double k
OpenMS::Param::setValue
void setValue(const String &key, const DataValue &value, const String &description="", const StringList &tags=StringList())
Sets a value.
OpenMS::String::NONE
Definition: String.h:82
OpenMS::CoarseIsotopePatternGenerator::estimateFromPeptideWeight
IsotopeDistribution estimateFromPeptideWeight(double average_weight)
Estimate Peptide Isotopedistribution from weight and number of isotopes that should be reported.
OpenMS::MzMLFile
File adapter for MzML files.
Definition: MzMLFile.h:55
OpenMS::String
A more convenient string class.
Definition: String.h:59
OpenMS::String::trim
String & trim()
removes whitespaces (space, tab, line feed, carriage return) at the beginning and the end of the stri...
MzMLFile.h
Feature.h
OpenMS::MSExperiment
In-Memory representation of a mass spectrometry experiment.
Definition: MSExperiment.h:77
OpenMS::ElementDB::getElement
const Element * getElement(const String &name) const
OpenMS::TextFile
This class provides some basic file handling methods for text files.
Definition: TextFile.h:46
OpenMS::CoarseIsotopePatternGenerator
Isotope pattern generator for coarse isotope distributions.
Definition: CoarseIsotopePatternGenerator.h:96
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
FeatureXMLFile.h
OpenMS::Residue::Full
with N-terminus and C-terminus
Definition: Residue.h:153
OpenMS::Internal::ClassTest::ratio
double ratio
Recent ratio of numbers, see TOLERANCE_RELATIVE.
StatisticFunctions.h
OpenMS::Peak1D::setIntensity
void setIntensity(IntensityType intensity)
Mutable access to the data point intensity (height)
Definition: Peak1D.h:112
OpenMS::IsotopeDistribution::getContainer
const ContainerType & getContainer() const
returns the container which holds the distribution
OpenMS::AASequence::toString
String toString() const
returns the peptide as string with modifications embedded in brackets
OpenMS::AASequence::toUnmodifiedString
String toUnmodifiedString() const
returns the peptide as string without any modifications or (e.g., "PEPTIDER")
OpenMS::MSExperiment::const_iterator
Base::const_iterator const_iterator
Definition: MSExperiment.h:125
OpenMS::MSExperiment::getMaxRT
CoordinateType getMaxRT() const
returns the maximal retention time value
OpenMS::Constants::PROTON_MASS_U
const double PROTON_MASS_U
OPENMS_LOG_WARN
#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
Constants.h
OpenMS::Peak2D::setIntensity
void setIntensity(IntensityType intensity)
Non-mutable access to the data point intensity (height)
Definition: Peak2D.h:172
MassDecomposition.h
OpenMS::BaseFeature::setPeptideIdentifications
void setPeptideIdentifications(const std::vector< PeptideIdentification > &peptides)
sets the PeptideIdentification vector
OpenMS::MSExperiment::size
Size size() const
Definition: MSExperiment.h:127
OpenMS::PeptideIdentification::setHits
void setHits(const std::vector< PeptideHit > &hits)
Sets the peptide hits.
OpenMS::PeptideIdentification::getHits
const std::vector< PeptideHit > & getHits() const
returns the peptide hits as const
OpenMS::CubicSpline2d::derivatives
double derivatives(double x, unsigned order) const
evaluates derivative of spline at position x
Element.h
OpenMS::Internal::DIntervalBase::maxPosition
PositionType const & maxPosition() const
Accessor to maximum position.
Definition: DIntervalBase.h:130
OpenMS::Int
int Int
Signed integer type.
Definition: Types.h:102
OpenMS::PeptideIdentification::assignRanks
void assignRanks()
Sorts the hits by score and assigns ranks according to the scores.
OpenMS::Peak2D::setRT
void setRT(CoordinateType coordinate)
Mutable access to the RT coordinate (index 0)
Definition: Peak2D.h:214
OpenMS
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:46
OpenMS::FeatureMap::updateRanges
void updateRanges() override
Updates minimum and maximum position/intensity.
OpenMS::String::number
static String number(double d, UInt n)
returns a string for d with exactly n decimal places
NonNegativeLeastSquaresSolver.h
OpenMS::Matrix< double >
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::MetaInfoInterface::setMetaValue
void setMetaValue(const String &name, const DataValue &value)
Sets the DataValue corresponding to a name.
OpenMS::Element::setIsotopeDistribution
void setIsotopeDistribution(const IsotopeDistribution &isotopes)
sets the isotope distribution of the element
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::TIC
Definition: TIC.h:55
FASTAFile.h
OpenMS::SVOutStream
Stream class for writing to comma/tab/...-separated values files.
Definition: SVOutStream.h:54
int
MassDecompositionAlgorithm.h
OpenMS::QCBase
This class serves as an abstract base class for all QC classes.
Definition: QCBase.h:54
CoarseIsotopePatternGenerator.h
QProcess
OpenMS::FeatureXMLFile::load
void load(const String &filename, FeatureMap &feature_map)
loads the file with name filename into map and calls updateRanges().
FeatureMap.h
Param.h
OpenMS::AASequence::getFormula
EmpiricalFormula getFormula(Residue::ResidueType type=Residue::Full, Int charge=0) const
returns the formula of the peptide
OpenMS::Peak1D::getMZ
CoordinateType getMZ() const
Non-mutable access to m/z.
Definition: Peak1D.h:115
IsotopePatterns
vector< IsotopePattern > IsotopePatterns
Definition: MetaProSIP.cpp:86
GaussModel.h
OpenMS::MSSpectrum::MZEnd
Iterator MZEnd(CoordinateType mz)
Binary search for peak range end (returns the past-the-end iterator)
OPENMS_LOG_DEBUG
#define OPENMS_LOG_DEBUG
Macro for general debugging information.
Definition: LogStream.h:470
OpenMS::PeptideIdentification::setHigherScoreBetter
void setHigherScoreBetter(bool value)
sets the peptide score orientation
OpenMS::MSSpectrum::MZBegin
Iterator MZBegin(CoordinateType mz)
Binary search for peak range begin.
OpenMS::MissedCleavages::mc_result_
std::vector< std::map< UInt32, UInt32 > > mc_result_
container that stores results
Definition: MissedCleavages.h:89
OpenMS::DBoundingBox< 2 >
OpenMS::Peak2D::setMZ
void setMZ(CoordinateType coordinate)
Mutable access to the m/z coordinate (index 1)
Definition: Peak2D.h:202
OpenMS::DefaultParamHandler::setParameters
void setParameters(const Param &param)
Sets the parameters.
OpenMS::IsotopeDistribution::insert
void insert(const Peak1D::CoordinateType &mass, const Peak1D::IntensityType &intensity)
Definition: IsotopeDistribution.h:214
OpenMS::MSSpectrum::setMSLevel
void setMSLevel(UInt ms_level)
Sets the MS level.
OpenMS::String::toQString
QString toQString() const
Conversion to Qt QString.
Normalizer.h
OpenMS::PeptideHit::setCharge
void setCharge(Int charge)
sets the charge of the peptide
OpenMS::PeptideHit::extractProteinAccessionsSet
std::set< String > extractProteinAccessionsSet() const
extracts the set of non-empty protein accessions from peptide evidences
OpenMS::MSExperiment::empty
bool empty() const
Definition: MSExperiment.h:137
seqan::find
bool find(TFinder &finder, const Pattern< TNeedle, FuzzyAC > &me, PatternAuxData< TNeedle > &dh)
Definition: AhoCorasickAmbiguous.h:884
OpenMS::CubicSpline2d::eval
double eval(double x) const
evaluates the spline at position x
OpenMS::String::toUpper
String & toUpper()
Converts the string to uppercase.
OpenMS::Peak1D
A 1-dimensional raw data point or peak.
Definition: Peak1D.h:54
OpenMS::FeatureMap::getUnassignedPeptideIdentifications
const std::vector< PeptideIdentification > & getUnassignedPeptideIdentifications() const
non-mutable access to the unassigned peptide identifications
OpenMS::StringList
std::vector< String > StringList
Vector of String.
Definition: ListUtils.h:70
OpenMS::MSSpectrum::sortByPosition
void sortByPosition()
Lexicographically sorts the peaks by their position.
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::ElementDB::getInstance
static const ElementDB * getInstance()
ModificationsDB.h
SVOutStream.h
OpenMS::EmpiricalFormula::getIsotopeDistribution
IsotopeDistribution getIsotopeDistribution(const IsotopePatternGenerator &method) const
returns the isotope distribution of the formula The details of the calculation of the isotope distrib...
main
int main(int argc, const char **argv)
Definition: INIFileEditor.cpp:73
OpenMS::TextFile::begin
ConstIterator begin() const
Gives access to the underlying text buffer.
OPENMS_LOG_ERROR
#define OPENMS_LOG_ERROR
Macro to be used if non-fatal error are reported (processing continues)
Definition: LogStream.h:455
OpenMS::FeatureMap
A container for features.
Definition: FeatureMap.h:97
OpenMS::IsotopeDistribution
Definition: IsotopeDistribution.h:64
OpenMS::PeptideIdentification
Represents the peptide hits for a spectrum.
Definition: PeptideIdentification.h:62
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::IsotopeDistribution::clear
void clear()
clears the distribution
OpenMS::Feature
An LC-MS feature.
Definition: Feature.h:70
OpenMS::ThresholdMower::filterPeakMap
void filterPeakMap(PeakMap &exp)
OpenMS::Math::mean
static double mean(IteratorType begin, IteratorType end)
Calculates the mean of a range of values.
Definition: StatisticFunctions.h:133
OpenMS::PeptideHit::getScore
double getScore() const
returns the PSM score
OpenMS::EmpiricalFormula
Representation of an empirical formula.
Definition: EmpiricalFormula.h:82
ElementDB.h
OpenMS::Internal::DIntervalBase::minPosition
PositionType const & minPosition() const
Accessor to minimum position.
Definition: DIntervalBase.h:124
OpenMS::FeatureXMLFile
This class provides Input/Output functionality for feature maps.
Definition: FeatureXMLFile.h:68
OpenMS::ThresholdMower
ThresholdMower removes all peaks below a threshold.
Definition: ThresholdMower.h:51
OpenMS::MSExperiment::updateRanges
void updateRanges() override
Updates minimum and maximum position/intensity.
OpenMS::TextFile::store
void store(const String &filename)
Writes the data to a file.
OpenMS::Param
Management and storage of parameters / INI files.
Definition: Param.h:73
OpenMS::File::getTempDirectory
static String getTempDirectory()
The current OpenMS temporary data path (for temporary files)
OpenMS::String::concatenate
void concatenate(StringIterator first, StringIterator last, const String &glue="")
Concatenates all elements from first to last-1 and inserts glue between the elements.
Definition: String.h:467
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:111
OpenMS::MSExperiment::ConstIterator
std::vector< SpectrumType >::const_iterator ConstIterator
Non-mutable iterator.
Definition: MSExperiment.h:113
OpenMS::AASequence::fromString
static AASequence fromString(const String &s, bool permissive=true)
create AASequence object by parsing an OpenMS string
OPENMS_LOG_INFO
#define OPENMS_LOG_INFO
Macro if a information, e.g. a status should be reported.
Definition: LogStream.h:465
OpenMS::PeakFileOptions::setMSLevels
void setMSLevels(const std::vector< Int > &levels)
sets the desired MS levels for peaks to load
OpenMS::Internal::AreaIterator::getRT
CoordinateType getRT() const
returns the retention time of the current scan
Definition: AreaIterator.h:198
SpectrumAlignment.h
PeakPickerHiRes.h
OpenMS::MSSpectrum::ConstIterator
ContainerType::const_iterator ConstIterator
Non-mutable iterator.
Definition: MSSpectrum.h:128
OpenMS::MissedCleavages
This class is a metric for the QualityControl TOPP Tool.
Definition: MissedCleavages.h:55
OpenMS::MSSpectrum
The representation of a 1D spectrum.
Definition: MSSpectrum.h:67
OpenMS::TextFile::ConstIterator
std::vector< String >::const_iterator ConstIterator
Non-mutable iterator.
Definition: TextFile.h:56
OpenMS::Peak1D::getIntensity
IntensityType getIntensity() const
Definition: Peak1D.h:110
File.h
OpenMS::NonNegativeLeastSquaresSolver::solve
static Int solve(const Matrix< double > &A, const Matrix< double > &b, Matrix< double > &x)
This is a wrapper for the external nnls library for the non-negative least square problem Ax=b,...
OpenMS::MzMLFile::getOptions
PeakFileOptions & getOptions()
Mutable access to the options for loading/storing.
TOPPBase.h
ThresholdMower.h
OpenMS::MSExperiment::RTBegin
ConstIterator RTBegin(CoordinateType rt) const
Fast search for spectrum range begin.
OpenMS::MSExperiment::getMinRT
CoordinateType getMinRT() const
returns the minimal retention time value
OpenMS::Math::pearsonCorrelationCoefficient
static double pearsonCorrelationCoefficient(IteratorType1 begin_a, IteratorType1 end_a, IteratorType2 begin_b, IteratorType2 end_b)
Calculates the Pearson correlation coefficient for the values in [begin_a, end_a) and [begin_b,...
Definition: StatisticFunctions.h:505
QCBase.h
OpenMS::PeptideHit
Representation of a peptide hit.
Definition: PeptideHit.h:55