|
OpenMS
2.5.0
|
Go to the documentation of this file.
57 template <
typename RealT =
double>
92 template <
typename ProbabilityIterator,
typename CoordinateIterator>
93 void update(ProbabilityIterator
const probability_begin,
94 ProbabilityIterator
const probability_end,
95 CoordinateIterator
const coordinate_begin)
98 Base::update(probability_begin, probability_end, coordinate_begin);
106 ProbabilityIterator prob_iter = probability_begin;
107 CoordinateIterator coord_iter = coordinate_begin;
108 for (; prob_iter != probability_end; ++prob_iter, ++coord_iter)
111 RealType diff_squared = diff * diff;
115 if (*coord_iter <
mean_)
128 RealType frac = (diff / stdev + 1.) / 2.;
129 RealType prob_frac = frac * *prob_iter;
132 prob_frac = *prob_iter * (1. - frac);
void validateTargetedExperiment(const OpenMS::TargetedExperiment &targeted_exp)
Validate a TargetedExperiment (check that all ids are unique)
Struct for temporary folder structure.
Definition: SiriusAdapterAlgorithm.h:53
This class supports reading and writing of OpenSWATH transition lists.
Definition: TransitionTSVFile.h:144
Base class for TOPP applications.
Definition: TOPPBase.h:144
This class supports reading and writing of PQP files.
Definition: TransitionPQPFile.h:219
Param copy(const String &prefix, bool remove_prefix=false) const
Returns a new Param object containing all entries that start with prefix.
void setCompounds(const std::vector< Compound > &rhs)
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.
void store(const String &filename, const TargetedExperiment &id) const
Stores a map in a TraML file.
int getIsotopePatternIterations()
String getNoMasstraceInfoIsotopePattern()
static void preprocessingSirius(const String &featureinfo, const MSExperiment &spectra, std::vector< FeatureMap > &v_fp, KDTreeFeatureMaps &fp_map_kd, const SiriusAdapterAlgorithm &sirius_algo, FeatureMapping::FeatureToMs2Indices &feature_mapping)
Preprocessing needed for SIRIUS.
Definition: SiriusAdapterAlgorithm.h:46
const static std::vector< String > callSiriusQProcess(const String &tmp_ms_file, const String &tmp_out_dir, String &executable, const String &out_csifingerid, const SiriusAdapterAlgorithm &sirius_algo)
Call SIRIUS with QProcess.
void sortSpectra(bool sort_mz=true)
Sorts the data points by retention time.
RealType variance1() const
"variance to the left hand side"
Definition: AsymmetricStatistics.h:80
File adapter for MzML files.
Definition: MzMLFile.h:55
A more convenient string class.
Definition: String.h:58
A basic LC-MS feature.
Definition: BaseFeature.h:56
File not found exception.
Definition: Exception.h:523
RealType sum_
Definition: BasicStatistics.h:258
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
RealType variance2() const
"variance to the right hand side"
Definition: AsymmetricStatistics.h:86
RealType mean_
Definition: BasicStatistics.h:256
void convertTargetedExperimentToTSV(const char *filename, OpenMS::TargetedExperiment &targeted_exp)
Write out a targeted experiment (TraML structure) into a tsv file.
void getPrimaryMSRunPath(StringList &toFill) const
get the file path to the first MS run
static std::set< Size > correctToHighestIntensityMS1Peak(MSExperiment &exp, double mz_tolerance, bool ppm, std::vector< double > &delta_mzs, std::vector< double > &mzs, std::vector< double > &rts)
Selection of the peak with the highest intensity as corrected precursor mass in a given mass range (e...
RealType variance_
Definition: BasicStatistics.h:257
RealType variance1_
Definition: AsymmetricStatistics.h:144
#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
profile data
Definition: SpectrumSettings.h:74
const std::vector< PeptideIdentification > & getPeptideIdentifications() const
returns a const reference to the PeptideIdentification vector
void clear()
Set sum, mean, and variance to zero.
Definition: BasicStatistics.h:103
UInt getMSLevel() const
Returns the MS level.
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:46
File adapter for HUPO PSI TraML files.
Definition: TraMLFile.h:63
void update(ProbabilityIterator probability_begin, ProbabilityIterator const probability_end)
This does the actual calculation.
Definition: BasicStatistics.h:113
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...
SpectrumType
Spectrum peak type.
Definition: SpectrumSettings.h:70
Calculates some basic statistical parameters of a distribution: sum, mean, variance,...
Definition: BasicStatistics.h:67
static bool copyDirRecursively(const QString &from_dir, const QString &to_dir, File::CopyOptions option=CopyOptions::OVERWRITE)
Internal class for asymmetric distributions.
Definition: AsymmetricStatistics.h:58
static void store(const MSExperiment &spectra, const OpenMS::String &msfile, const FeatureMapping::FeatureToMs2Indices &feature_mapping, const bool &feature_only, const int &isotope_pattern_iterations, const bool no_mt_info, std::vector< SiriusMSFile::CompoundInfo > &v_cmpinfo)
Internal structure used in SiriusAdapter that is used for the conversion of a MzMlFile to an internal...
void load(const String &filename, FeatureMap &feature_map)
loads the file with name filename into map and calls updateRanges().
#define OPENMS_LOG_DEBUG
Macro for general debugging information.
Definition: LogStream.h:470
static void checkFeatureSpectraNumber(const String &featureinfo, const FeatureMapping::FeatureToMs2Indices &feature_mapping, const MSExperiment &spectra, const SiriusAdapterAlgorithm &sirius_algo)
logs number of features and spectra used
static int extract_scan_index(const String &path)
Extract scan_index from filepath.
void setParameters(const Param ¶m)
Sets the parameters.
QString toQString() const
Conversion to Qt QString.
std::vector< String > StringList
Vector of String.
Definition: ListUtils.h:70
void detectingTransitionsCompound(OpenMS::TargetedExperiment &exp, int min_transitions, int max_transitions)
Filters transitions by intensity, only keeping the top N transitions.
BasicStatistics< RealT > Base
The real type and basic statistics specified as template argument.
Definition: AsymmetricStatistics.h:62
int main(int argc, const char **argv)
Definition: INIFileEditor.cpp:73
A container for features.
Definition: FeatureMap.h:95
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 extractSiriusFragmentAnnotationMapping(const String &path_to_sirius_workspace, MSSpectrum &msspectrum_to_fill, bool use_exact_mass=false)
extractSiriusFragmentAnnotationMapping Extract native id (./spectrum.ms) and fragment annotation (....
Definition: FeatureMapping.h:48
This class provides Input/Output functionality for feature maps.
Definition: FeatureXMLFile.h:68
Map< const BaseFeature *, std::vector< size_t > > assignedMS2
Definition: FeatureMapping.h:50
AsymmetricStatistics()
Default constructor.
Definition: AsymmetricStatistics.h:73
void update(ProbabilityIterator const probability_begin, ProbabilityIterator const probability_end, CoordinateIterator const coordinate_begin)
You can call this as often as you like, using different input vectors.
Definition: AsymmetricStatistics.h:93
void convertTargetedExperimentToPQP(const char *filename, OpenMS::TargetedExperiment &targeted_exp)
Write out a targeted experiment (TraML structure) into a PQP file.
T ppmToMass(T ppm, T mz_ref)
Compute the mass diff in [Th], given a ppm value and a reference point.
Definition: MathFunctions.h:263
void setTransitions(const std::vector< ReactionMonitoringTransition > &transitions)
set transition list
Management and storage of parameters / INI files.
Definition: Param.h:73
Map class based on the STL map (containing several convenience functions)
Definition: Map.h:50
RealType variance2_
Definition: AsymmetricStatistics.h:144
A description of a targeted experiment containing precursor and production ions.
Definition: TargetedExperiment.h:64
#define OPENMS_LOG_INFO
Macro if a information, e.g. a status should be reported.
Definition: LogStream.h:465
Generate assays from a TargetedExperiment.
Definition: MRMAssay.h:68
File is empty.
Definition: Exception.h:594
The representation of a 1D spectrum.
Definition: MSSpectrum.h:67
const std::vector< DataProcessing > & getDataProcessing() const
returns a const reference to the description of the applied data processing
void insert(const String &prefix, const Param ¶m)
Stores a set of features, together with a 2D tree for fast search.
Definition: KDTreeFeatureMaps.h:49
Base::RealType RealType
Definition: AsymmetricStatistics.h:63
Predicate that determines if a peak lies inside/outside a specific intensity range.
Definition: RangeUtils.h:526
RealT RealType
The real type specified as template argument.
Definition: BasicStatistics.h:74
const std::vector< ProteinIdentification > & getProteinIdentifications() const
non-mutable access to the protein identifications