|
OpenMS
2.6.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
136 if (options.count(
"bin_size"))
138 bin_size_ = options.at(
"bin_size");
140 if (options.count(
"peak_spread"))
142 peak_spread_ = options.at(
"peak_spread");
144 if (options.count(
"bin_offset"))
146 bin_offset_ = options.at(
"bin_offset");
152 bs_library_.emplace_back(s, bin_size_,
false, peak_spread_, bin_offset_);
154 OPENMS_LOG_INFO <<
"The library contains " << bs_library_.size() <<
" spectra." << std::endl;
159 double bin_size_ = 1.0;
161 double bin_offset_ = 0.4;
164 void getDefaultParameters(
Param& params)
const;
182 void annotateSpectra(
183 const std::vector<MSSpectrum>& spectra,
185 std::vector<MSSpectrum>& annotated_spectra,
187 bool compute_features =
true
204 void annotateSpectra(
205 const std::vector<MSSpectrum>& spectra,
207 std::vector<MSSpectrum>& annotated_spectra
248 const std::vector<MSSpectrum>& annotated_spectra,
249 const std::vector<MSSpectrum>& picked_spectra,
251 std::vector<MSSpectrum>& scored_spectra,
252 bool compute_features =
true
269 const std::vector<MSSpectrum>& annotated_spectra,
270 const std::vector<MSSpectrum>& picked_spectra,
271 std::vector<MSSpectrum>& scored_spectra
287 const std::vector<MSSpectrum>& scored_spectra,
289 std::vector<MSSpectrum>& selected_spectra,
291 bool compute_features =
true
302 const std::vector<MSSpectrum>& scored_spectra,
303 std::vector<MSSpectrum>& selected_spectra
325 std::vector<MSSpectrum>& extracted_spectra,
327 bool compute_features =
true
346 std::vector<MSSpectrum>& extracted_spectra
360 std::vector<Match>& matches
385 void targetedMatching(
386 const std::vector<MSSpectrum>& spectra,
412 void untargetedMatching(
413 const std::vector<MSSpectrum>& spectra,
420 void updateMembers_()
override;
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: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 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:75
static FileTypes::Type getTypeByFileName(const String &filename)
Determines the file type from a file name.
SpectraST MRM List.
Definition: FileTypes.h:102
A more convenient string class.
Definition: String.h:59
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
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:87
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:60
A base class for all classes handling default parameters.
Definition: DefaultParamHandler.h:92
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:46
File adapter for HUPO PSI TraML files.
Definition: TraMLFile.h:63
Facilitates file handling by file type recognition.
Definition: FileHandler.h:62
Type
Actual file types enum.
Definition: FileTypes.h:58
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:73
A container for features.
Definition: FeatureMap.h:97
OpenSWATH Peptide Query Parameter (PQP) SQLite DB, see TransitionPQPFile.
Definition: FileTypes.h:104
static Type nameToType(const String &name)
Converts a file type name into a Type.
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:81
Management and storage of parameters / INI files.
Definition: Param.h:73
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
Compare functor scoring the spectral contrast angle for similarity measurement.
Definition: BinnedSpectralContrastAngle.h:57
The representation of a 1D spectrum.
Definition: MSSpectrum.h:67
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.