33 static const char* LevelName[SIZE_OF_VALUES];
50 return lowest != OSWHierarchy::Level::SIZE_OF_VALUES;
111 static constexpr
float QVALUE_MISSING = -1;
117 OSWPeakGroup(
const float rt_experimental,
const float rt_left_width,
const float rt_right_width,
const float rt_delta, std::vector<UInt32>&& transition_ids,
const float q_value = -1);
134 return rt_experimental_;
139 return rt_left_width_;
144 return rt_right_width_;
159 return transition_ids_;
163 float rt_experimental_{ 0 };
164 float rt_left_width_{ 0 };
165 float rt_right_width_{ 0 };
166 float rt_delta_{ 0 };
167 float q_value_{ -1 };
185 OSWPeptidePrecursor(
const String& seq,
const short charge,
const bool decoy,
const float precursor_mz, std::vector<OSWPeakGroup>&& features);
213 return precursor_mz_;
225 float precursor_mz_{0};
284 transitions_.emplace(tr.
getID(), tr);
290 transitions_.emplace(
id, std::move(tr));
315 checkTransitions_(protein);
316 proteins_[index] = std::move(protein);
322 return transitions_.size();
328 return transitions_.at(
id);
339 source_file_ = filename;
In-Memory representation of a mass spectrometry run.
Definition: MSExperiment.h:46
Holds all or partial information from an OSW file.
Definition: OSWData.h:279
void setSqlSourceFile(const String &filename)
Definition: OSWData.h:337
void addProtein(OSWProtein &&prot)
std::vector< OSWProtein > proteins_
Definition: OSWData.h:390
std::map< UInt32, OSWTransition > transitions_
Definition: OSWData.h:389
const std::map< UInt32, OSWTransition > & getTransitions() const
get all transitions mapped by their ID (UInt32)
Definition: OSWData.h:332
UInt64 run_id_
the ID of this run from the SQL RUN table
Definition: OSWData.h:392
String source_file_
remember from which sql OSW file this data is loaded (to lazy load more data)
Definition: OSWData.h:391
void clearProteins()
only forget protein data
UInt fromNativeID(int transition_id) const
void setProtein(const Size index, OSWProtein &&protein)
Definition: OSWData.h:313
void buildNativeIDResolver(const MSExperiment &chrom_traces)
Create an internal mapping from the nativeIDs of all chromatograms (extracted by OpenSwathWorkflow (e...
std::map< UInt32, UInt32 > transID_to_index_
map a Transition.ID (==native_id) to a chromatogram index in the sqMass experiment which contains the...
Definition: OSWData.h:393
void clear()
forget all data
UInt64 getRunID() const
Definition: OSWData.h:352
void checkTransitions_(const OSWProtein &prot) const
void setRunID(const UInt64 run_id)
Definition: OSWData.h:347
const String & getSqlSourceFile() const
Definition: OSWData.h:342
const std::vector< OSWProtein > & getProteins() const
Definition: OSWData.h:302
void addTransition(const OSWTransition &tr)
Adds a transition; do this before adding Proteins.
Definition: OSWData.h:282
Size transitionCount() const
get the total number of transitions (chromatograms)
Definition: OSWData.h:320
void addTransition(OSWTransition &&tr)
Definition: OSWData.h:287
const OSWTransition & getTransition(const UInt32 id) const
obtain a certain transition meta information with id (this matches the ID of a chromatogram in an sqM...
Definition: OSWData.h:326
Definition: OSWData.h:108
float getRTRightWidth() const
RT position in seconds of the right border.
Definition: OSWData.h:142
OSWPeakGroup(const OSWPeakGroup &rhs)=default
Copy c'tor.
OSWPeakGroup & operator=(const OSWPeakGroup &rhs)=default
copy assignment
float getRTExperimental() const
observed RT apex position in seconds of the feature
Definition: OSWData.h:132
OSWPeakGroup(const float rt_experimental, const float rt_left_width, const float rt_right_width, const float rt_delta, std::vector< UInt32 > &&transition_ids, const float q_value=-1)
custom c'tor which fills all the members with data; all members are read-only
float getRTDelta() const
RT difference in seconds to the expected RT.
Definition: OSWData.h:147
OSWPeakGroup & operator=(OSWPeakGroup &&rhs)=default
move assignment
const std::vector< UInt32 > & getTransitionIDs() const
get the transition ids (can be mapped to the chromatogram XICs in sqMass data)
Definition: OSWData.h:157
float getRTLeftWidth() const
RT position in seconds of the left border.
Definition: OSWData.h:137
OSWPeakGroup()=default
just a dummy feature to allow for acceptor output values etc
std::vector< UInt32 > transition_ids_
Definition: OSWData.h:168
OSWPeakGroup(OSWPeakGroup &&rhs)=default
move c'tor
float getQValue() const
this might return QVALUE_MISSING if q-value is not annotated in the OSW file
Definition: OSWData.h:152
A peptide with a charge state.
Definition: OSWData.h:180
String seq_
Definition: OSWData.h:222
bool isDecoy() const
is this a decoy feature (from a decoy protein)
Definition: OSWData.h:206
OSWPeptidePrecursor & operator=(const OSWPeptidePrecursor &rhs)=default
assignment operator
short getCharge() const
precursor charge
Definition: OSWData.h:201
float getPCMz() const
m/z of this charged peptide
Definition: OSWData.h:211
OSWPeptidePrecursor(const String &seq, const short charge, const bool decoy, const float precursor_mz, std::vector< OSWPeakGroup > &&features)
custom c'tor which fills all the members with data; all members are read-only
OSWPeptidePrecursor(OSWPeptidePrecursor &&rhs)=default
move c'tor
OSWPeptidePrecursor & operator=(OSWPeptidePrecursor &&rhs)=default
move assignment operator
OSWPeptidePrecursor()=default
just a dummy feature to allow for acceptor output values etc
const String & getSequence() const
the peptide sequence (incl. mods)
Definition: OSWData.h:196
OSWPeptidePrecursor(const OSWPeptidePrecursor &rhs)=default
Copy c'tor.
const std::vector< OSWPeakGroup > & getFeatures() const
candidate explanations
Definition: OSWData.h:216
std::vector< OSWPeakGroup > features_
Definition: OSWData.h:226
A Protein is the highest entity and contains one or more peptides which were found/traced.
Definition: OSWData.h:234
OSWProtein & operator=(OSWProtein &&rhs)=default
move assignment operator
OSWProtein & operator=(const OSWProtein &rhs)=default
assignment operator
OSWProtein(OSWProtein &&rhs)=default
move c'tor
OSWProtein(const OSWProtein &rhs)=default
Copy c'tor.
Size getID() const
Definition: OSWData.h:254
const std::vector< OSWPeptidePrecursor > & getPeptidePrecursors() const
Definition: OSWData.h:259
std::vector< OSWPeptidePrecursor > peptides_
Definition: OSWData.h:267
OSWProtein(const String &accession, const Size id, std::vector< OSWPeptidePrecursor > &&peptides)
custom c'tor which fills all the members with data; all members are read-only
const String & getAccession() const
Definition: OSWData.h:249
OSWProtein()=default
just a dummy feature to allow for acceptor output values etc
String accession_
Definition: OSWData.h:265
Size id_
Definition: OSWData.h:266
A more convenient string class.
Definition: String.h:34
OPENMS_UINT32_TYPE UInt32
Unsigned integer type (32bit)
Definition: Types.h:37
OPENMS_UINT64_TYPE UInt64
Unsigned integer type (64bit)
Definition: Types.h:51
unsigned int UInt
Unsigned integer type.
Definition: Types.h:68
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:101
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:22
hierarchy levels of the OSWData tree
Definition: OSWData.h:22
Level
the actual levels
Definition: OSWData.h:25
@ TRANSITION
Definition: OSWData.h:29
@ PEPTIDE
Definition: OSWData.h:27
@ PROTEIN
Definition: OSWData.h:26
@ FEATURE
Definition: OSWData.h:28
high-level meta data of a transition
Definition: OSWData.h:57
const String & getAnnotation() const
e.g. y5/-0.002
Definition: OSWData.h:70
UInt32 id_
ID as used in OSWPeakGroup::transition_ids.
Definition: OSWData.h:97
String annotation_
e.g. y5/-0.002
Definition: OSWData.h:96
bool is_decoy_
is this a decoy transition (from a decoy protein/peptide)
Definition: OSWData.h:100
bool isDecoy() const
is this a decoy transition (from a decoy protein/peptide)
Definition: OSWData.h:90
OSWTransition(const OSWTransition &rhs)=default
OSWTransition & operator=(OSWTransition &&rhs)=default
OSWTransition & operator=(const OSWTransition &rhs)=default
UInt32 getID() const
ID as used in OSWPeakGroup::transition_ids.
Definition: OSWData.h:75
OSWTransition()=default
default c'tor
OSWTransition(OSWTransition &&rhs)=default
OSWTransition(const String &annotation, const UInt32 id, const float product_mz, const char type, const bool is_decoy)
custom c'tor which fills all the members with data; all members are read-only
float product_mz_
observed product m/z value
Definition: OSWData.h:98
char getType() const
b, y
Definition: OSWData.h:85
char type_
b, y,
Definition: OSWData.h:99
float getProductMZ() const
observed product m/z value
Definition: OSWData.h:80