 |
OpenMS
3.0.0
|
|
Go to the documentation of this file.
37 #include <OpenMS/config.h>
92 virtual void generateScores(
94 std::vector<std::pair<Size,double>>& scores,
99 const std::vector<MSSpectrum>& library,
100 const std::map<String,DataValue>& options
118 std::vector<std::pair<Size,double>>& scores,
123 const BinnedSpectrum in_bs(spec, bin_size_,
false, peak_spread_, bin_offset_);
124 for (
Size i = 0; i < bs_library_.size(); ++i)
126 const double cmp_score = cmp_bs_(in_bs, bs_library_[i]);
127 if (cmp_score >= min_score)
129 scores.emplace_back(i, cmp_score);
134 void init(
const std::vector<MSSpectrum>& library,
const std::map<String,DataValue>& options)
override;
139 double bin_size_ = 1.0;
141 double bin_offset_ = 0.4;
144 void getDefaultParameters(
Param& params)
const;
162 void annotateSpectra(
163 const std::vector<MSSpectrum>& spectra,
165 std::vector<MSSpectrum>& annotated_spectra,
167 bool compute_features =
true
184 void annotateSpectra(
185 const std::vector<MSSpectrum>& spectra,
187 std::vector<MSSpectrum>& annotated_spectra
202 void annotateSpectra(
203 const std::vector<MSSpectrum>& spectra,
206 std::vector<MSSpectrum>& annotated_spectra)
const;
218 bool add_unidentified_features =
false)
const;
258 const std::vector<MSSpectrum>& annotated_spectra,
259 const std::vector<MSSpectrum>& picked_spectra,
261 std::vector<MSSpectrum>& scored_spectra,
262 bool compute_features =
true
279 const std::vector<MSSpectrum>& annotated_spectra,
280 const std::vector<MSSpectrum>& picked_spectra,
281 std::vector<MSSpectrum>& scored_spectra
297 const std::vector<MSSpectrum>& scored_spectra,
299 std::vector<MSSpectrum>& selected_spectra,
301 bool compute_features =
true
312 const std::vector<MSSpectrum>& scored_spectra,
313 std::vector<MSSpectrum>& selected_spectra
335 std::vector<MSSpectrum>& extracted_spectra,
337 bool compute_features =
true
356 std::vector<MSSpectrum>& extracted_spectra
376 std::vector<MSSpectrum>& extracted_spectra
397 std::vector<MSSpectrum>& extracted_spectra,
412 std::vector<Match>& matches
437 void targetedMatching(
438 const std::vector<MSSpectrum>& spectra,
464 void untargetedMatching(
465 const std::vector<MSSpectrum>& spectra,
497 void updateMembers_()
override;
500 void deisotopeMS2Spectra_(
MSExperiment& experiment)
const;
503 void removeMS2SpectraPeaks_(
MSExperiment& experiment)
const;
528 std::vector<MSSpectrum>& extracted_spectra,
530 const bool compute_features
void validateTargetedExperiment(const OpenMS::TargetedExperiment &targeted_exp)
Validate a TargetedExperiment (check that all ids are unique)
This class supports reading and writing of OpenSWATH transition lists.
Definition: TransitionTSVFile.h:144
Base class for TOPP applications.
Definition: TOPPBase.h:147
This class supports reading and writing of PQP files.
Definition: TransitionPQPFile.h:215
void store(const String &filename, const TargetedExperiment &id) const
Stores a map in a TraML file.
This is a binned representation of a PeakSpectrum.
Definition: BinnedSpectrum.h:80
static FileTypes::Type getTypeByFileName(const String &filename)
Determines the file type from a file name.
SpectraST MRM List.
Definition: FileTypes.h:100
A more convenient string class.
Definition: String.h:58
In-Memory representation of a mass spectrometry run.
Definition: MSExperiment.h:70
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:127
void load(const String &filename, TargetedExperiment &id)
Loads a map from a TraML file.
any TSV file, for example msInspect file or OpenSWATH transition file (see TransitionTSVFile)
Definition: FileTypes.h:86
void convertTargetedExperimentToTSV(const char *filename, OpenMS::TargetedExperiment &targeted_exp)
Write out a targeted experiment (TraML structure) into a tsv file.
Unknown file extension.
Definition: FileTypes.h:58
A base class for all classes handling default parameters.
Definition: DefaultParamHandler.h:92
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47
File adapter for HUPO PSI TraML files.
Definition: TraMLFile.h:63
Facilitates file handling by file type recognition.
Definition: FileHandler.h:66
Type
Actual file types enum.
Definition: FileTypes.h:56
static FileTypes::Type getType(const String &filename)
Tries to determine the file type (by name or content)
void setParameters(const Param ¶m)
Sets the parameters.
const Param & getDefaults() const
Non-mutable access to the default parameters.
void convertPQPToTargetedExperiment(const char *filename, OpenMS::TargetedExperiment &targeted_exp, bool legacy_traml_id=false)
Read in a PQP file and construct a targeted experiment (TraML structure)
std::vector< String > StringList
Vector of String.
Definition: ListUtils.h:70
unsigned int UInt
Unsigned integer type.
Definition: Types.h:94
void convertTSVToTargetedExperiment(const char *filename, FileTypes::Type filetype, OpenMS::TargetedExperiment &targeted_exp)
Read in a tsv/mrm file and construct a targeted experiment (TraML structure)
int main(int argc, const char **argv)
Definition: INIFileEditor.cpp:71
A container for features.
Definition: FeatureMap.h:98
OpenSWATH Peptide Query Parameter (PQP) SQLite DB, see TransitionPQPFile.
Definition: FileTypes.h:102
Param copy(const std::string &prefix, bool remove_prefix=false) const
Returns a new Param object containing all entries that start with prefix.
static Type nameToType(const String &name)
void convertTargetedExperimentToPQP(const char *filename, OpenMS::TargetedExperiment &targeted_exp)
Write out a targeted experiment (TraML structure) into a PQP file.
TraML (HUPO PSI format) for transitions (.traML)
Definition: FileTypes.h:80
Management and storage of parameters / INI files.
Definition: Param.h:69
A description of a targeted experiment containing precursor and production ions.
Definition: TargetedExperiment.h:64
Compare functor scoring the spectral contrast angle for similarity measurement.
Definition: BinnedSpectralContrastAngle.h:57
The representation of a 1D spectrum.
Definition: MSSpectrum.h:66
void setLogType(LogType type) const
Sets the progress log that should be used. The default type is NONE!
static String typeToName(Type type)
Returns the name/extension of the type.