|
OpenMS
2.5.0
|
Go to the documentation of this file.
82 template <
typename SpectrumType>
85 double tolerance = (
double)param_.getValue(
"tolerance");
89 for (
Size i = 0; i < spectrum.size(); ++i)
92 for (
Size j = i; i + j < spectrum.size(); ++j)
94 double diff = spectrum[i + j].getPosition()[0] - spectrum[i].getPosition()[0];
106 totaldiff += spectrum[i + j].getIntensity() + spectrum[i].getIntensity();
107 std::map<double, char>::const_iterator aait = aamass_.lower_bound(diff);
108 if (aait == aamass_.end())
113 if (fabs(aait->first - diff) <= tolerance)
115 gooddiff += spectrum[i + j].getIntensity() + spectrum[i].getIntensity();
120 if ((aait) != aamass_.end() && fabs((aait)->first - diff) <= tolerance)
122 gooddiff += spectrum[i + j].getIntensity() + spectrum[i].getIntensity();
129 return gooddiff / totaldiff;
135 return "GoodDiffFilter";
GoodDiffFilter counts the number ob peak pairs whose m/z difference can be explained by a amino acid ...
Definition: GoodDiffFilter.h:53
void setProgress(SignedSize value) const
Sets the current progress.
Base class for TOPP applications.
Definition: TOPPBase.h:144
static constexpr const float DEFAULT_BIN_WIDTH_HIRES
Definition: BinnedSpectrum.h:99
This is a binned representation of a PeakSpectrum.
Definition: BinnedSpectrum.h:75
File adapter for MzML files.
Definition: MzMLFile.h:55
A more convenient string class.
Definition: String.h:58
In-Memory representation of a mass spectrometry experiment.
Definition: MSExperiment.h:77
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:127
TOPPGNPSExport()
Definition: GNPSExport.cpp:82
void startProgress(SignedSize begin, SignedSize end, const String &label) const
Initializes the progress display.
void registerOptionsAndFlags_() override
Sets the valid command line options (with argument) and flags (without argument).
Definition: GNPSExport.cpp:93
void endProgress() const
Ends the progress display.
const std::vector< PeptideIdentification > & getPeptideIdentifications() const
returns a const reference to the PeptideIdentification vector
const_iterator end() const
Definition: GNPSExport.cpp:79
ExitCodes main_(int, const char **) override
The actual "main" method. main_() is invoked by main().
Definition: GNPSExport.cpp:115
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:46
Base class for all classes that want to report their progress.
Definition: ProgressLogger.h:54
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...
A FilterFunctor extracts some spectrum characteristics for quality assessment.
Definition: FilterFunctor.h:44
const ChargeType & getCharge() const
Non-mutable access to charge state.
CoordinateType getMZ() const
Non-mutable access to m/z.
Definition: Peak1D.h:115
A consensus feature spanning multiple LC-MS/MS experiments.
Definition: ConsensusFeature.h:69
#define OPENMS_LOG_DEBUG
Macro for general debugging information.
Definition: LogStream.h:470
A 1-dimensional raw data point or peak.
Definition: Peak1D.h:54
A container for consensus elements.
Definition: ConsensusMap.h:79
std::vector< String > StringList
Vector of String.
Definition: ListUtils.h:70
CoordinateType getRT() const
Returns the RT coordinate (index 0)
Definition: Peak2D.h:208
void load(const String &filename, ConsensusMap &map)
Loads a consensus map from file and calls updateRanges.
int main(int argc, const char **argv)
Definition: GNPSExport.cpp:378
static const String getProductName()
Definition: GoodDiffFilter.h:133
const_iterator begin() const
ExitCodes
Exit codes.
Definition: TOPPBase.h:149
static FilterFunctor * create()
Definition: GoodDiffFilter.h:79
std::map< double, char > aamass_
list of unique amino acid masses
Definition: GoodDiffFilter.h:144
CoordinateType getMZ() const
Returns the m/z coordinate (index 1)
Definition: Peak2D.h:196
Compare functor scoring the spectral contrast angle for similarity measurement.
Definition: BinnedSpectralContrastAngle.h:57
The representation of a 1D spectrum.
Definition: MSSpectrum.h:67
double apply(SpectrumType &spectrum)
Definition: GoodDiffFilter.h:83
ExitCodes main(int argc, const char **argv)
Main routine of all TOPP applications.
UInt64 getUniqueId() const
Non-mutable access to unique id - returns the unique id.
Definition: UniqueIdInterface.h:105
void setLogType(LogType type) const
Sets the progress log that should be used. The default type is NONE!
static constexpr const float DEFAULT_BIN_OFFSET_HIRES
default bin offset for high-resolution data (adapted from doi:10.1007/s13361-015-1179-x)
Definition: BinnedSpectrum.h:102
This class provides Input functionality for ConsensusMaps and Output functionality for alignments and...
Definition: ConsensusXMLFile.h:61