|
OpenMS
2.6.0
|
Go to the documentation of this file.
67 return transition_group_id +
"_Precursor_i" +
String(isotope);
83 std::vector<String> substrings;
84 precursor_id.
split(
"_", substrings);
86 if (substrings.size() == 3)
return substrings[0];
87 else if (substrings.size() > 3)
90 for (
Size k = 0;
k < substrings.size() - 2;
k++) r += substrings[
k] +
"_";
91 return r.
prefix(r.size() - 1);
109 double min_upper_edge_dist,
110 double lower,
double upper);
125 double min_upper_edge_dist,
126 double lower,
double upper);
146 double& lower,
double& upper,
double& center);
159 template <
class TargetedExperimentT>
161 const TargetedExperimentT& targeted_exp,
162 TargetedExperimentT& selected_transitions,
163 double min_upper_edge_dist)
165 if (exp.
size() == 0 || exp[0].getPrecursors().
size() == 0)
168 <<
" does not have any experiments or any precursors. Is it a SWATH map? "
169 <<
"I will move to the next map."
173 double upper, lower, center;
176 if (selected_transitions.getTransitions().size() == 0)
179 <<
" no transition were within the precursor window of " << lower <<
" to " << upper
213 bool useQualCutoff =
false,
214 double qualCutoff = 0.0);
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.
const std::vector< Peptide > & getPeptides() const
PeakMap MapType
Definition: PeakPickerIterative.cpp:84
const Map< String, std::vector< CVTerm > > & getCVTerms() const
returns the accession string of the term
constexpr Int writtenDigits(const FloatingPointType &=FloatingPointType())
Number of digits commonly used for writing a floating point type (a.k.a. precision)....
Definition: Types.h:294
A method or algorithm argument contains illegal values.
Definition: Exception.h:648
General data processing (if no other term applies)
Definition: DataProcessing.h:60
The interface of a consumer of spectra and chromatograms.
Definition: IMSDataConsumer.h:69
Represents a peptide (amino acid sequence)
Definition: TargetedExperimentHelper.h:370
void generateDecoys(const OpenMS::TargetedExperiment &exp, OpenMS::TargetedExperiment &dec, const String &method, const double aim_decoy_fraction, const bool switchKR, const String &decoy_tag, const int max_attempts, const double identity_threshold, const double precursor_mz_shift, const double product_mz_shift, const double product_mz_threshold, const std::vector< String > &fragment_types, const std::vector< size_t > &fragment_charges, const bool enable_specific_losses, const bool enable_unspecific_losses, const int round_decPow=-4) const
Generate decoys from a TargetedExperiment.
const String & getIdentifier() const
retrieve document identifier (e.g. an LSID)
static FileTypes::Type getTypeByFileName(const String &filename)
Determines the file type from a file name.
void store(const String &filename, const PeakMap &map) const
Stores a map in an MzML file.
SpectraST MRM List.
Definition: FileTypes.h:102
std::vector< String > protein_refs
Definition: TargetedExperimentHelper.h:435
MzML file (.mzML)
Definition: FileTypes.h:72
MzXML file (.mzXML)
Definition: FileTypes.h:64
Description of the experimental settings.
Definition: ExperimentalSettings.h:59
File adapter for MzML files.
Definition: MzMLFile.h:55
A more convenient string class.
Definition: String.h:59
This class generates a TargetedExperiment object with decoys based on a TargetedExperiment object.
Definition: MRMDecoy.h:88
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
String toString(bool full_precision=true) const
Conversion to String full_precision Controls number of fractional digits for all double types or list...
static bool checkSwathMapAndSelectTransitions(const OpenMS::PeakMap &exp, const TargetedExperimentT &targeted_exp, TargetedExperimentT &selected_transitions, double min_upper_edge_dist)
Check the map and select transition in one function.
Definition: OpenSwathHelper.h:160
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
String prefix(SizeType length) const
returns the prefix of length length
void convertTargetedExperimentToTSV(const char *filename, OpenMS::TargetedExperiment &targeted_exp)
Write out a targeted experiment (TraML structure) into a tsv file.
IntensityType getIntensity() const
Definition: Peak2D.h:166
Unknown file extension.
Definition: FileTypes.h:60
#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
Definition: TransitionExperiment.h:207
Decoy transition.
Definition: ReactionMonitoringTransition.h:71
Size size() const
Definition: MSExperiment.h:127
std::map< String, MRMTransitionGroupType > TransitionGroupMapType
Definition: MRMFeatureFinderScoring.h:109
Quality Control function for OpenSwath.
Definition: SwathQC.h:63
static String computePrecursorId(const String &transition_group_id, int isotope)
Compute unique precursor identifier.
Definition: OpenSwathHelper.h:65
static void convertTargetedExp(const OpenMS::TargetedExperiment &transition_exp_, OpenSwath::LightTargetedExperiment &transition_exp)
convert from the OpenMS TargetedExperiment to the LightTargetedExperiment
static String computeTransitionGroupId(const String &precursor_id)
Compute transition group id.
Definition: OpenSwathHelper.h:81
bool hasPeptide(const String &ref) const
A helper class that is used by several OpenSWATH tools.
Definition: OpenSwathHelper.h:48
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:46
File adapter for HUPO PSI TraML files.
Definition: TraMLFile.h:63
String sequence
Definition: TargetedExperimentHelper.h:437
Scoring of an spectrum given library intensities of a transition group.
Definition: DIAPrescoring.h:64
std::vector< LightTransition > & getTransitions()
Definition: TransitionExperiment.h:219
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...
std::vector< DataProcessingPtr > & getDataProcessing()
returns a mutable reference to the description of the applied processing
Facilitates file handling by file type recognition.
Definition: FileHandler.h:62
void load(const String &filename, FeatureMap &feature_map)
loads the file with name filename into map and calls updateRanges().
Type
Actual file types enum.
Definition: FileTypes.h:58
Unable to create file exception.
Definition: Exception.h:636
DecoyTransitionType getDecoyTransitionType() const
Returns the type of transition (target or decoy)
This class stores a SRM/MRM transition.
Definition: ReactionMonitoringTransition.h:56
void setChromatograms(const std::vector< MSChromatogram > &chromatograms)
sets the chromatogram list
#define OPENMS_LOG_DEBUG
Macro for general debugging information.
Definition: LogStream.h:470
static FileTypes::Type getType(const String &filename)
Tries to determine the file type (by name or content)
bool hasCharge() const
Whether peptide or compound has set charge state.
Definition: TargetedExperimentHelper.h:248
bool split(const char splitter, std::vector< String > &substrings, bool quote_protect=false) const
Splits a string into substrings using splitter as delimiter.
void setParameters(const Param ¶m)
Sets the parameters.
const Param & getDefaults() const
Non-mutable access to the default parameters.
QString toQString() const
Conversion to Qt QString.
Unknown type.
Definition: ReactionMonitoringTransition.h:69
static OpenSwath::SpectrumAccessPtr getSpectrumAccessOpenMSPtr(boost::shared_ptr< OpenMS::PeakMap > exp)
Simple Factory method to get a SpectrumAccess Ptr from an MSExperiment.
Definition: DataFrameWriter.h:71
void setIdentifier(const String &id)
set document identifier (e.g. an LSID)
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< LightTransition > transitions
Definition: TransitionExperiment.h:216
std::vector< String > StringList
Vector of String.
Definition: ListUtils.h:70
void store(const String &filename, const FeatureMap &feature_map)
stores the map feature_map in file with name filename.
CoordinateType getRT() const
Returns the RT coordinate (index 0)
Definition: Peak2D.h:208
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)
bool hasCVTerm(const String &accession) const
checks whether the term has a value
int main(int argc, const char **argv)
Definition: INIFileEditor.cpp:73
ptrdiff_t SignedSize
Signed Size type e.g. used as pointer difference.
Definition: Types.h:134
A container for features.
Definition: FeatureMap.h:97
OpenSWATH Peptide Query Parameter (PQP) SQLite DB, see TransitionPQPFile.
Definition: FileTypes.h:104
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...
An LC-MS feature.
Definition: Feature.h:70
const std::vector< Protein > & getProteins() const
boost::shared_ptr< ISpectrumAccess > SpectrumAccessPtr
Definition: openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:89
This class provides Input/Output functionality for feature maps.
Definition: FeatureXMLFile.h:68
const Peptide & getPeptideByRef(const String &ref) const
std::vector< OpenSwath::SwathMap > loadMzML(const String &file, const String &tmp, boost::shared_ptr< ExperimentalSettings > &exp_meta, const String &readoptions="normal", Interfaces::IMSDataConsumer *plugin_consumer=nullptr)
Loads a Swath run from a single mzML file.
File adapter for Swath files.
Definition: SwathFile.h:67
static Type nameToType(const String &name)
Converts a file type name into a Type.
const std::vector< ReactionMonitoringTransition > & getTransitions() const
returns the transition list
const char * OpenMS_locale
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
Definition: ConfidenceScoring.h:58
Representation of 1D spectrum settings.
Definition: SpectrumSettings.h:63
std::vector< OpenSwath::SwathMap > loadMzXML(String file, String tmp, boost::shared_ptr< ExperimentalSettings > &exp_meta, String readoptions="normal")
Loads a Swath run from a single mzXML file.
Management and storage of parameters / INI files.
Definition: Param.h:73
void clear(bool clear_meta_data)
Clears all data and meta data.
const std::vector< Feature > & getSubordinates() const
immutable access to subordinate features
String & ensureLastChar(char end)
Makes sure the string ends with the character end.
static void checkSwathMap(const OpenMS::PeakMap &swath_map, double &lower, double &upper, double ¢er)
Get the lower / upper offset for this SWATH map and do some sanity checks.
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
int getChargeState() const
Return the peptide or compound charge state.
Definition: TargetedExperimentHelper.h:254
const String & getPeptideRef() const
static void selectSwathTransitions(const OpenMS::TargetedExperiment &targeted_exp, OpenMS::TargetedExperiment &selected_transitions, double min_upper_edge_dist, double lower, double upper)
Select transitions between lower and upper and write them into the new TargetedExperiment.
Target transition.
Definition: ReactionMonitoringTransition.h:70
const String & getLoadedFilePath() const
get the file_name_ which is the absolute path to the file loaded from
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!
Definition: DataFrameWriter.h:45
static String typeToName(Type type)
Returns the name/extension of the type.
Command line progress.
Definition: ProgressLogger.h:72