Loading...
Searching...
No Matches
precursor.h
Go to the documentation of this file.
/**
* \file pappsomspp/core/processing/cbor/mzcbor/precursor.h
* \date 24/11/2025
* \author Olivier Langella
* \brief PSI precursor object for mzML/mzCBOR
*/
/*******************************************************************************
* Copyright (c) 2025 Olivier Langella <Olivier.Langella@universite-paris-saclay.fr>.
*
* This file is part of PAPPSOms-tools.
*
* PAPPSOms-tools is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PAPPSOms-tools is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with PAPPSOms-tools. If not, see <http://www.gnu.org/licenses/>.
*
******************************************************************************/
#pragma once
#include <QString>
#include "pappsomspp/core/processing/cbor/cborstreamreader.h"
#include "pappsomspp/core/processing/cbor/mzcbor/cvparammap.h"
namespace pappso
{
namespace cbor
{
namespace mzcbor
{
struct PMSPP_LIB_DECL IsolationWindow
{
void fromCbor(CborStreamReader &reader);
/** @brief write the structure to a JSON object
* @result QJsonObject
*/
QJsonObject toJsonObject() const;
/** @brief get isolation window target m/z given cvParam informations
*
*/
double getTargetMz() const;
/** @brief compute isolation window lower m/z given cvParam informations
*
*/
double getLowerMz() const;
/** @brief compute isolation window upper m/z given cvParam informations
*
*/
double getUpperMz() const;
CvParamMap cvParamMap;
};
struct PMSPP_LIB_DECL SelectedIon
{
void fromCbor(CborStreamReader &reader);
int getChargeState() const;
double getIntensity(bool *isok) const;
double getMz() const;
CvParamMap cvParamMap;
};
/**
* @todo write docs
*/
struct PMSPP_LIB_DECL Precursor
{
void fromCbor(CborStreamReader &reader);
/** @brief write the structure to a JSON object
* @result QJsonObject
*/
QJsonObject toJsonObject() const;
QString spectrumRef;
IsolationWindow isolationWindow;
CvParamMap selectedIonListCvParamMap;
std::vector<SelectedIon> selectedIonList;
};
} // namespace mzcbor
} // namespace cbor
} // namespace pappso
cborstreamreader.h
pappso::cbor::CborStreamReader
simple override of the raw QCborStreamReader This adds convenient functions to put CBOR data into C++...
Definition cborstreamreader.h:46
cvparammap.h
cvParam map
PMSPP_LIB_DECL
#define PMSPP_LIB_DECL
Definition export-import-config.h:14
pappso::cbor::mzcbor
Definition binarydataarray.h:41
pappso::cbor
Definition cborstreamreader.cpp:35
pappso
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
Definition aa.cpp:39
pappso::cbor::mzcbor::CvParamMap
Definition cvparammap.h:46
pappso::cbor::mzcbor::IsolationWindow
Definition precursor.h:42
pappso::cbor::mzcbor::IsolationWindow::getUpperMz
double getUpperMz() const
compute isolation window upper m/z given cvParam informations
Definition precursor.cpp:117
pappso::cbor::mzcbor::IsolationWindow::getLowerMz
double getLowerMz() const
compute isolation window lower m/z given cvParam informations
Definition precursor.cpp:84
pappso::cbor::mzcbor::IsolationWindow::getTargetMz
double getTargetMz() const
get isolation window target m/z given cvParam informations
Definition precursor.cpp:70
pappso::cbor::mzcbor::IsolationWindow::toJsonObject
QJsonObject toJsonObject() const
write the structure to a JSON object
Definition precursor.cpp:100
pappso::cbor::mzcbor::IsolationWindow::cvParamMap
CvParamMap cvParamMap
Definition precursor.h:66
pappso::cbor::mzcbor::IsolationWindow::fromCbor
void fromCbor(CborStreamReader &reader)
Definition precursor.cpp:34
pappso::cbor::mzcbor::Precursor
Definition precursor.h:83
pappso::cbor::mzcbor::Precursor::isolationWindow
IsolationWindow isolationWindow
Definition precursor.h:93
pappso::cbor::mzcbor::Precursor::spectrumRef
QString spectrumRef
Definition precursor.h:91
pappso::cbor::mzcbor::Precursor::toJsonObject
QJsonObject toJsonObject() const
write the structure to a JSON object
Definition precursor.cpp:107
pappso::cbor::mzcbor::Precursor::selectedIonList
std::vector< SelectedIon > selectedIonList
Definition precursor.h:97
pappso::cbor::mzcbor::Precursor::selectedIonListCvParamMap
CvParamMap selectedIonListCvParamMap
Definition precursor.h:95
pappso::cbor::mzcbor::Precursor::fromCbor
void fromCbor(CborStreamReader &reader)
Definition precursor.cpp:229
pappso::cbor::mzcbor::SelectedIon
Definition precursor.h:70
pappso::cbor::mzcbor::SelectedIon::getMz
double getMz() const
Definition precursor.cpp:212
pappso::cbor::mzcbor::SelectedIon::getChargeState
int getChargeState() const
Definition precursor.cpp:171
pappso::cbor::mzcbor::SelectedIon::cvParamMap
CvParamMap cvParamMap
Definition precursor.h:77
pappso::cbor::mzcbor::SelectedIon::fromCbor
void fromCbor(CborStreamReader &reader)
Definition precursor.cpp:134
pappso::cbor::mzcbor::SelectedIon::getIntensity
double getIntensity(bool *isok) const
Definition precursor.cpp:187