Loading...
Searching...
No Matches
psmcborutils.h
Go to the documentation of this file.
/**
* \file pappsomspp/processing/cbor/psm/psmcborutils.h
* \date 16/09/2025
* \author Olivier Langella
* \brief PSM CBOR utilities
*/
/*******************************************************************************
* 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 <QCborMap>
#include "pappsomspp/core/massspectrum/qualifiedmassspectrum.h"
#include "pappsomspp/export-import-config.h"
namespace pappso
{
namespace cbor
{
namespace psm
{
/**
* @brief utilities to help managing data in PSM CBOR data file
*/
class PMSPP_LIB_DECL PsmCborUtils
{
public:
struct PsmProteinRef
{
QString accession;
std::vector<std::size_t> positions;
};
static void
prepareCborScanWithSpectrum(QCborMap &cbor_scan,
const pappso::QualifiedMassSpectrum &ms2_qualified_mass_spectrum);
static void prepareCborScanWithSpectrumAndPeakList(
QCborMap &cbor_scan, const pappso::QualifiedMassSpectrum &ms2_qualified_mass_spectrum);
static std::vector<PsmProteinRef> getPsmProteinRefList(const QCborMap &cbor_psm);
static void setPsmProteinRefList(QCborMap &cbor_psm,
const std::vector<PsmProteinRef> &protein_ref_list);
static void mergePsmProteinRefList(QCborMap &cbor_psm_destination,
const QCborMap &cbor_psm_source);
};
} // namespace psm
} // namespace cbor
} // namespace pappso
pappso::QualifiedMassSpectrum
Class representing a fully specified mass spectrum.
Definition qualifiedmassspectrum.h:99
pappso::cbor::psm::PsmCborUtils
utilities to help managing data in PSM CBOR data file
Definition psmcborutils.h:45
pappso::cbor::psm::PsmCborUtils::prepareCborScanWithSpectrum
static void prepareCborScanWithSpectrum(QCborMap &cbor_scan, const pappso::QualifiedMassSpectrum &ms2_qualified_mass_spectrum)
Definition psmcborutils.cpp:40
pappso::cbor::psm::PsmCborUtils::prepareCborScanWithSpectrumAndPeakList
static void prepareCborScanWithSpectrumAndPeakList(QCborMap &cbor_scan, const pappso::QualifiedMassSpectrum &ms2_qualified_mass_spectrum)
Definition psmcborutils.cpp:76
pappso::cbor::psm::PsmCborUtils::setPsmProteinRefList
static void setPsmProteinRefList(QCborMap &cbor_psm, const std::vector< PsmProteinRef > &protein_ref_list)
Definition psmcborutils.cpp:126
pappso::cbor::psm::PsmCborUtils::mergePsmProteinRefList
static void mergePsmProteinRefList(QCborMap &cbor_psm_destination, const QCborMap &cbor_psm_source)
Definition psmcborutils.cpp:150
pappso::cbor::psm::PsmCborUtils::getPsmProteinRefList
static std::vector< PsmProteinRef > getPsmProteinRefList(const QCborMap &cbor_psm)
Definition psmcborutils.cpp:101
export-import-config.h
PMSPP_LIB_DECL
#define PMSPP_LIB_DECL
Definition export-import-config.h:14
pappso::cbor::psm
Definition cborscanmapbase.h:40
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
qualifiedmassspectrum.h
pappso::cbor::psm::PsmCborUtils::PsmProteinRef
Definition psmcborutils.h:48
pappso::cbor::psm::PsmCborUtils::PsmProteinRef::accession
QString accession
Definition psmcborutils.h:49
pappso::cbor::psm::PsmCborUtils::PsmProteinRef::positions
std::vector< std::size_t > positions
Definition psmcborutils.h:50