41 static const char* LevelName[SIZE_OF_VALUES];
65 return lowest != OSWHierarchy::Level::SIZE_OF_VALUES;
86 OSWTransition(
const std::string& annotation,
const UInt32 id,
const float product_mz,
const char type,
const bool is_decoy);
139 static constexpr float QVALUE_MISSING = -1;
145 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);
162 return rt_experimental_;
167 return rt_left_width_;
172 return rt_right_width_;
187 return transition_ids_;
191 float rt_experimental_{ 0 };
192 float rt_left_width_{ 0 };
193 float rt_right_width_{ 0 };
194 float rt_delta_{ 0 };
195 float q_value_{ -1 };
215 OSWPeptidePrecursor(
const std::string& seq,
const short charge,
const bool decoy,
const float precursor_mz, std::vector<OSWPeakGroup>&& features);
243 return precursor_mz_;
255 float precursor_mz_{0};
270 OSWProtein(
const std::string& accession,
const Size id, std::vector<OSWPeptidePrecursor>&& peptides);
320 transitions_.emplace(tr.
getID(), tr);
326 transitions_.emplace(
id, std::move(tr));
351 checkTransitions_(protein);
352 proteins_[index] = std::move(protein);
358 return transitions_.size();
364 return transitions_.at(
id);
375 source_file_ = filename;
In-Memory representation of a mass spectrometry run.
Definition MSExperiment.h:49
Holds all or partial information from an OSW file.
Definition OSWData.h:315
const std::string & getSqlSourceFile() const
Definition OSWData.h:378
void addProtein(OSWProtein &&prot)
void setSqlSourceFile(const std::string &filename)
Definition OSWData.h:373
std::vector< OSWProtein > proteins_
Definition OSWData.h:426
std::map< UInt32, OSWTransition > transitions_
Definition OSWData.h:425
UInt64 run_id_
the ID of this run from the SQL RUN table
Definition OSWData.h:428
void clearProteins()
only forget protein data
UInt fromNativeID(int transition_id) const
const std::vector< OSWProtein > & getProteins() const
Definition OSWData.h:338
void setProtein(const Size index, OSWProtein &&protein)
Definition OSWData.h:349
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:429
void clear()
forget all data
UInt64 getRunID() const
Definition OSWData.h:388
void checkTransitions_(const OSWProtein &prot) const
void setRunID(const UInt64 run_id)
Definition OSWData.h:383
const std::map< UInt32, OSWTransition > & getTransitions() const
get all transitions mapped by their ID (UInt32)
Definition OSWData.h:368
void addTransition(const OSWTransition &tr)
Adds a transition; do this before adding Proteins.
Definition OSWData.h:318
std::string source_file_
remember from which sql OSW file this data is loaded (to lazy load more data)
Definition OSWData.h:427
Size transitionCount() const
get the total number of transitions (chromatograms)
Definition OSWData.h:356
void addTransition(OSWTransition &&tr)
Definition OSWData.h:323
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:362
A peak group (also called feature) is defined on a small RT range (leftWidth to rightWidth) in a grou...
Definition OSWData.h:136
const std::vector< UInt32 > & getTransitionIDs() const
get the transition ids (can be mapped to the chromatogram XICs in sqMass data)
Definition OSWData.h:185
float getRTRightWidth() const
RT position in seconds of the right border.
Definition OSWData.h:170
OSWPeakGroup(const OSWPeakGroup &rhs)=default
Copy c'tor.
float getRTExperimental() const
observed RT apex position in seconds of the feature
Definition OSWData.h:160
OSWPeakGroup & operator=(OSWPeakGroup &&rhs)=default
move assignment
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:175
float getRTLeftWidth() const
RT position in seconds of the left border.
Definition OSWData.h:165
OSWPeakGroup()=default
just a dummy feature to allow for acceptor output values etc
OSWPeakGroup & operator=(const OSWPeakGroup &rhs)=default
copy assignment
std::vector< UInt32 > transition_ids_
Definition OSWData.h:196
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:180
A peptide with a charge state.
Definition OSWData.h:210
OSWPeptidePrecursor & operator=(OSWPeptidePrecursor &&rhs)=default
move assignment operator
bool isDecoy() const
is this a decoy feature (from a decoy protein)
Definition OSWData.h:236
std::string seq_
Definition OSWData.h:252
short getCharge() const
precursor charge
Definition OSWData.h:231
float getPCMz() const
m/z of this charged peptide
Definition OSWData.h:241
OSWPeptidePrecursor(OSWPeptidePrecursor &&rhs)=default
move c'tor
OSWPeptidePrecursor & operator=(const OSWPeptidePrecursor &rhs)=default
assignment operator
OSWPeptidePrecursor()=default
just a dummy feature to allow for acceptor output values etc
const std::string & getSequence() const
the peptide sequence (incl. mods)
Definition OSWData.h:226
OSWPeptidePrecursor(const OSWPeptidePrecursor &rhs)=default
Copy c'tor.
OSWPeptidePrecursor(const std::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
const std::vector< OSWPeakGroup > & getFeatures() const
candidate explanations
Definition OSWData.h:246
std::vector< OSWPeakGroup > features_
Definition OSWData.h:256
A Protein is the highest entity and contains one or more peptides which were found/traced.
Definition OSWData.h:265
OSWProtein(OSWProtein &&rhs)=default
move c'tor
OSWProtein(const OSWProtein &rhs)=default
Copy c'tor.
Size getID() const
Protein ID as recorded by the OSW file (the PROTEIN_ID column in the sqlite schema).
Definition OSWData.h:287
OSWProtein & operator=(const OSWProtein &rhs)=default
assignment operator
OSWProtein(const std::string &accession, const Size id, std::vector< OSWPeptidePrecursor > &&peptides)
custom c'tor which fills all the members with data; all members are read-only
std::vector< OSWPeptidePrecursor > peptides_
Definition OSWData.h:301
OSWProtein & operator=(OSWProtein &&rhs)=default
move assignment operator
OSWProtein()=default
just a dummy feature to allow for acceptor output values etc
std::string accession_
Definition OSWData.h:299
const std::vector< OSWPeptidePrecursor > & getPeptidePrecursors() const
Charged peptide precursors that map to this protein.
Definition OSWData.h:293
const std::string & getAccession() const
Protein accession (UniProt-style identifier supplied at construction).
Definition OSWData.h:281
Size id_
Definition OSWData.h:300
uint32_t UInt32
Unsigned integer type (32bit)
Definition Types.h:33
uint64_t UInt64
Unsigned integer type (64bit)
Definition Types.h:47
unsigned int UInt
Unsigned integer type.
Definition Types.h:64
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition Types.h:97
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19
Hierarchy levels of the OSWData tree.
Definition OSWData.h:30
Level
Tree levels in top-down order.
Definition OSWData.h:33
@ TRANSITION
One fragment-ion transition under a feature (OSWTransition).
Definition OSWData.h:37
@ PEPTIDE
Charged peptide precursor under a protein (OSWPeptidePrecursor).
Definition OSWData.h:35
@ PROTEIN
Top-level protein record (OSWProtein).
Definition OSWData.h:34
@ FEATURE
One candidate peak group (chromatographic feature) under a peptide (OSWPeakGroup).
Definition OSWData.h:36
High-level meta-data of one fragment-ion transition referenced by an OSWPeakGroup.
Definition OSWData.h:81
OSWTransition(const std::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
UInt32 id_
ID as used in OSWPeakGroup::transition_ids.
Definition OSWData.h:121
OSWTransition & operator=(const OSWTransition &rhs)=default
bool is_decoy_
is this a decoy transition (from a decoy protein/peptide)
Definition OSWData.h:124
bool isDecoy() const
is this a decoy transition (from a decoy protein/peptide)
Definition OSWData.h:114
OSWTransition(const OSWTransition &rhs)=default
UInt32 getID() const
ID as used in OSWPeakGroup::transition_ids.
Definition OSWData.h:99
OSWTransition()=default
default c'tor
OSWTransition(OSWTransition &&rhs)=default
float product_mz_
observed product m/z value
Definition OSWData.h:122
OSWTransition & operator=(OSWTransition &&rhs)=default
char getType() const
b, y
Definition OSWData.h:109
char type_
b, y,
Definition OSWData.h:123
float getProductMZ() const
observed product m/z value
Definition OSWData.h:104
const std::string & getAnnotation() const
e.g. y5/-0.002
Definition OSWData.h:94
std::string annotation_
e.g. y5/-0.002
Definition OSWData.h:120