59 static const char* LevelName[SIZE_OF_VALUES];
76 return lowest != OSWHierarchy::Level::SIZE_OF_VALUES;
137 static constexpr
float QVALUE_MISSING = -1;
143 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);
160 return rt_experimental_;
165 return rt_left_width_;
170 return rt_right_width_;
185 return transition_ids_;
189 float rt_experimental_{ 0 };
190 float rt_left_width_{ 0 };
191 float rt_right_width_{ 0 };
192 float rt_delta_{ 0 };
193 float q_value_{ -1 };
211 OSWPeptidePrecursor(
const String& seq,
const short charge,
const bool decoy,
const float precursor_mz, std::vector<OSWPeakGroup>&& features);
239 return precursor_mz_;
251 float precursor_mz_{0};
310 transitions_.emplace(tr.
getID(), tr);
316 transitions_.emplace(
id, std::move(tr));
341 checkTransitions_(protein);
342 proteins_[index] = std::move(protein);
348 return transitions_.size();
354 return transitions_.at(
id);
365 source_file_ = filename;
In-Memory representation of a mass spectrometry run.
Definition: MSExperiment.h:73
Holds all or partial information from an OSW file.
Definition: OSWData.h:305
void setSqlSourceFile(const String &filename)
Definition: OSWData.h:363
void addProtein(OSWProtein &&prot)
std::vector< OSWProtein > proteins_
Definition: OSWData.h:416
std::map< UInt32, OSWTransition > transitions_
Definition: OSWData.h:415
const std::map< UInt32, OSWTransition > & getTransitions() const
get all transitions mapped by their ID (UInt32)
Definition: OSWData.h:358
UInt64 run_id_
the ID of this run from the SQL RUN table
Definition: OSWData.h:418
String source_file_
remember from which sql OSW file this data is loaded (to lazy load more data)
Definition: OSWData.h:417
void clearProteins()
only forget protein data
UInt fromNativeID(int transition_id) const
void setProtein(const Size index, OSWProtein &&protein)
Definition: OSWData.h:339
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:419
void clear()
forget all data
UInt64 getRunID() const
Definition: OSWData.h:378
void checkTransitions_(const OSWProtein &prot) const
void setRunID(const UInt64 run_id)
Definition: OSWData.h:373
const String & getSqlSourceFile() const
Definition: OSWData.h:368
const std::vector< OSWProtein > & getProteins() const
Definition: OSWData.h:328
void addTransition(const OSWTransition &tr)
Adds a transition; do this before adding Proteins.
Definition: OSWData.h:308
Size transitionCount() const
get the total number of transitions (chromatograms)
Definition: OSWData.h:346
void addTransition(OSWTransition &&tr)
Definition: OSWData.h:313
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:352
Definition: OSWData.h:134
float getRTRightWidth() const
RT position in seconds of the right border.
Definition: OSWData.h:168
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:158
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:173
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:183
float getRTLeftWidth() const
RT position in seconds of the left border.
Definition: OSWData.h:163
OSWPeakGroup()=default
just a dummy feature to allow for acceptor output values etc
std::vector< UInt32 > transition_ids_
Definition: OSWData.h:194
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:178
A peptide with a charge state.
Definition: OSWData.h:206
String seq_
Definition: OSWData.h:248
bool isDecoy() const
is this a decoy feature (from a decoy protein)
Definition: OSWData.h:232
OSWPeptidePrecursor & operator=(const OSWPeptidePrecursor &rhs)=default
assignment operator
short getCharge() const
precursor charge
Definition: OSWData.h:227
float getPCMz() const
m/z of this charged peptide
Definition: OSWData.h:237
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:222
OSWPeptidePrecursor(const OSWPeptidePrecursor &rhs)=default
Copy c'tor.
const std::vector< OSWPeakGroup > & getFeatures() const
candidate explanations
Definition: OSWData.h:242
std::vector< OSWPeakGroup > features_
Definition: OSWData.h:252
A Protein is the highest entity and contains one or more peptides which were found/traced.
Definition: OSWData.h:260
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:280
const std::vector< OSWPeptidePrecursor > & getPeptidePrecursors() const
Definition: OSWData.h:285
std::vector< OSWPeptidePrecursor > peptides_
Definition: OSWData.h:293
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:275
OSWProtein()=default
just a dummy feature to allow for acceptor output values etc
String accession_
Definition: OSWData.h:291
Size id_
Definition: OSWData.h:292
A more convenient string class.
Definition: String.h:60
OPENMS_UINT32_TYPE UInt32
Unsigned integer type (32bit)
Definition: Types.h:63
OPENMS_UINT64_TYPE UInt64
Unsigned integer type (64bit)
Definition: Types.h:77
unsigned int UInt
Unsigned integer type.
Definition: Types.h:94
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:127
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47
hierarchy levels of the OSWData tree
Definition: OSWData.h:48
Level
the actual levels
Definition: OSWData.h:51
@ TRANSITION
Definition: OSWData.h:55
@ PEPTIDE
Definition: OSWData.h:53
@ PROTEIN
Definition: OSWData.h:52
@ FEATURE
Definition: OSWData.h:54
high-level meta data of a transition
Definition: OSWData.h:83
const String & getAnnotation() const
e.g. y5/-0.002
Definition: OSWData.h:96
UInt32 id_
ID as used in OSWPeakGroup::transition_ids.
Definition: OSWData.h:123
String annotation_
e.g. y5/-0.002
Definition: OSWData.h:122
bool is_decoy_
is this a decoy transition (from a decoy protein/peptide)
Definition: OSWData.h:126
bool isDecoy() const
is this a decoy transition (from a decoy protein/peptide)
Definition: OSWData.h:116
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:101
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:124
char getType() const
b, y
Definition: OSWData.h:111
char type_
b, y,
Definition: OSWData.h:125
float getProductMZ() const
observed product m/z value
Definition: OSWData.h:106