libpappsomspp
Library for mass spectrometry
|
Go to the documentation of this file.
32 #include "../pappsoexception.h"
46 : m_massSpectrumId(id)
53 : msp_massSpectrum{mass_spectrum_SPtr}
60 : msp_massSpectrum(other.msp_massSpectrum),
61 m_massSpectrumId(other.m_massSpectrumId),
62 m_isEmptyMassSpectrum(other.m_isEmptyMassSpectrum),
63 m_msLevel(other.m_msLevel),
66 m_precursorSpectrumIndex(other.m_precursorSpectrumIndex),
67 m_precursorNativeId(other.m_precursorNativeId),
68 m_precursorMz(other.m_precursorMz),
69 m_precursorCharge(other.m_precursorCharge),
70 m_precursorIntensity(other.m_precursorIntensity),
71 m_paramsMap(other.m_paramsMap)
107 return std::make_shared<QualifiedMassSpectrum>(*
this);
114 return std::make_shared<const QualifiedMassSpectrum>(*
this);
248 if(std::isinf(dt_in_milli_seconds))
251 m_dt = dt_in_milli_seconds;
266 std::size_t precursor_spectrum_index)
325 QString pointer_string =
326 QString(
"msp_massSpectrum.get(): %1 ")
329 text += pointer_string;
332 text += QString(
"msp_massSpectrum is nullptr ");
338 "; m_massSpectrumId : %1 \n"
339 "m_msLevel: %2 ; m_rt (min): %3 ; m_dt (ms): %4 ; prec. spec. "
340 "index: %5 ; prec. mz: %6 ; prec. z: %7 ; prec. int.: %8")
344 .arg(
m_dt, 0,
'f', 5)
367 std::pair<QualifiedMassSpectrumParameter, QVariant>(parameter, value));
369 if(ret.second ==
false)
371 ret.first->second = value;
389 const QualifiedMassSpectrum &
unsigned int m_precursorCharge
Charge of the precursor that was fragmented to yield this mass spectrum.
pappso_double m_dt
Drift time (in milliseconds) at which this mass spectrum was acquired.
void setPrecursorIntensity(pappso_double intensity)
Set the intensity of the precursor ion.
std::shared_ptr< QualifiedMassSpectrum > QualifiedMassSpectrumSPtr
uint getMsLevel() const
Get the mass spectrum level.
double pappso_double
A type definition for doubles.
std::shared_ptr< const MassSpectrum > MassSpectrumCstSPtr
MassSpectrumSPtr getMassSpectrumSPtr() const
Get the MassSpectrumSPtr.
QualifiedMassSpectrum & operator=(const QualifiedMassSpectrum &other)
std::map< QualifiedMassSpectrumParameter, QVariant > m_paramsMap
map containing any parameter value for this spectrum
void setPrecursorMz(pappso_double precursor_mz)
Set the precursor m/z ratio.
tries to keep as much as possible monoisotopes, removing any possible C13 peaks
pappso_double m_rt
Retention time (in seconds) at which this mass spectrum was acquired.
pappso_double m_precursorMz
void setParameterValue(QualifiedMassSpectrumParameter parameter, const QVariant &value)
QualifiedMassSpectrumSPtr makeQualifiedMassSpectrumSPtr() const
pappso_double getPrecursorIntensity() const
Get the intensity of the precursor ion.
QualifiedMassSpectrumCstSPtr makeQualifiedMassSpectrumCstSPtr() const
void setMassSpectrumSPtr(MassSpectrumSPtr massSpectrum)
Set the MassSpectrumSPtr.
MassSpectrumSPtr msp_massSpectrum
Shared pointer to the mass spectrum.
void setMsLevel(uint ms_level)
Set the mass spectrum level.
pappso_double getDtInMilliSeconds() const
Get the drift time in milliseconds.
pappso_double getRtInMinutes() const
Get the retention time in minutes.
void setRtInSeconds(pappso_double rt)
Set the retention time in seconds.
MassSpectrumId m_massSpectrumId
Id of the mass spectrum.
Class representing a fully specified mass spectrum.
static QString pointerToString(const void *const pointer)
void setPrecursorNativeId(const QString &native_id)
Set the scan native id of the precursor ion.
QualifiedMassSpectrumParameter
bool m_isEmptyMassSpectrum
uint getPrecursorCharge() const
Get the precursor charge.
const QString & getPrecursorNativeId() const
void setMassSpectrumId(const MassSpectrumId &iD)
Set the MassSpectrumId.
std::size_t m_precursorSpectrumIndex
Index of the spectrum of the precusor ion that was fragmented to yield.
QualifiedMassSpectrum()
Construct an uninitialized QualifiedMassSpectrum.
std::shared_ptr< const QualifiedMassSpectrum > QualifiedMassSpectrumCstSPtr
QString m_precursorNativeId
Native XML id of the spectrum relative to the mz data native file.
const MassSpectrumId & getMassSpectrumId() const
Get the MassSpectrumId.
void setPrecursorCharge(uint precursor_charge)
Set the precursor charge.
unsigned int m_msLevel
Mass spectrometry level of this mass spectrum.
MassSpectrumCstSPtr getMassSpectrumCstSPtr() const
Get the MassSpectrumCstSPtr.
void setEmptyMassSpectrum(bool is_empty_mass_spectrum)
void setPrecursorSpectrumIndex(std::size_t precursor_scan_num)
Set the scan number of the precursor ion.
void setDtInMilliSeconds(pappso_double rt)
Set the drift time in milliseconds.
const QualifiedMassSpectrum & cloneMassSpectrumSPtr()
clone the mass spectrum contained in Qualified Mass Spectrum
pappso_double m_precursorIntensity
bool isEmptyMassSpectrum() const
~QualifiedMassSpectrum()
Destruct this QualifiedMassSpectrum.
pappso_double getPrecursorMz() const
Get the precursor m/z ratio.
std::size_t getPrecursorSpectrumIndex() const
Get the scan number of the precursor ion.
std::shared_ptr< MassSpectrum > MassSpectrumSPtr
pappso_double getRtInSeconds() const
Get the retention time in seconds.
const QVariant getParameterValue(QualifiedMassSpectrumParameter parameter) const