Loading...
Searching...
No Matches
psmfilescanprocessandcopy.h
Go to the documentation of this file.
/**
* \file pappsomspp/processing/cbor/psm/psmfilescanprocessandcopy.h
* \date 15/07/2025
* \author Olivier Langella
* \brief PSM file reader designed to parallelize scan process and then copy the results in PSM cbor
* output stream
*/
/*******************************************************************************
* 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 <QBuffer>
#include "psmfilescanprocess.h"
#include "pappsomspp/core/processing/cbor/cborstreamwriter.h"
#include "pappsomspp/export-import-config.h"
namespace pappso
{
namespace cbor
{
namespace psm
{
/**
* @brief Basic PSM file reader to process scan (parallelized scan processing) and write a new
* resulting PSM file
*/
class PMSPP_LIB_DECL PsmFileScanProcessAndCopy : public PsmFileScanProcess
{
public:
/**
* Default constructor
*/
PsmFileScanProcessAndCopy(std::size_t buffer_scan_size,
CborStreamWriter *cbor_output_p,
const QString &operation);
/**
* Destructor
*/
virtual ~PsmFileScanProcessAndCopy();
void close() override;
protected:
/**
*/
void delayProteinMapInMemory();
void informationsReady(pappso::UiMonitorInterface &monitor) override;
void logReady(pappso::UiMonitorInterface &monitor) override;
void parameterMapReady(pappso::UiMonitorInterface &monitor) override;
void fastaFilesReady(pappso::UiMonitorInterface &monitor) override;
virtual void proteinMapReady(pappso::UiMonitorInterface &monitor) override;
virtual void processBufferScanDone(pappso::UiMonitorInterface &monitor) override;
void sampleStarted(pappso::UiMonitorInterface &monitor) override;
void sampleFinished(pappso::UiMonitorInterface &monitor) override;
void sampleListStarted(pappso::UiMonitorInterface &monitor) override;
void sampleListFinished(pappso::UiMonitorInterface &monitor) override;
protected:
CborStreamWriter *mp_cborOutput;
CborStreamWriter *mp_copyCborOutput = nullptr;
QString m_operation;
pappso::cbor::psm::PsmProteinMap m_psmNewProteinMap;
QBuffer *mpa_bufferAfterProteinMap = nullptr;
pappso::cbor::CborStreamWriter *mpa_bufferWriterAfterProteinMap = nullptr;
};
} // namespace psm
} // namespace cbor
} // namespace pappso
cborstreamwriter.h
pappso::UiMonitorInterface
Definition uimonitorinterface.h:50
pappso::cbor::CborStreamWriter
overrides QCborStreamWriter base class to provide convenient functions
Definition cborstreamwriter.h:45
pappso::cbor::psm::PsmFileScanProcessAndCopy::delayProteinMapInMemory
void delayProteinMapInMemory()
Definition psmfilescanprocessandcopy.cpp:69
pappso::cbor::psm::PsmFileScanProcessAndCopy::sampleStarted
void sampleStarted(pappso::UiMonitorInterface &monitor) override
Definition psmfilescanprocessandcopy.cpp:201
pappso::cbor::psm::PsmFileScanProcessAndCopy::fastaFilesReady
void fastaFilesReady(pappso::UiMonitorInterface &monitor) override
Definition psmfilescanprocessandcopy.cpp:135
pappso::cbor::psm::PsmFileScanProcessAndCopy::sampleFinished
void sampleFinished(pappso::UiMonitorInterface &monitor) override
Definition psmfilescanprocessandcopy.cpp:219
pappso::cbor::psm::PsmFileScanProcessAndCopy::mp_cborOutput
CborStreamWriter * mp_cborOutput
Definition psmfilescanprocessandcopy.h:87
pappso::cbor::psm::PsmFileScanProcessAndCopy::mp_copyCborOutput
CborStreamWriter * mp_copyCborOutput
Definition psmfilescanprocessandcopy.h:88
pappso::cbor::psm::PsmFileScanProcessAndCopy::PsmFileScanProcessAndCopy
PsmFileScanProcessAndCopy(std::size_t buffer_scan_size, CborStreamWriter *cbor_output_p, const QString &operation)
Definition psmfilescanprocessandcopy.cpp:41
pappso::cbor::psm::PsmFileScanProcessAndCopy::sampleListStarted
void sampleListStarted(pappso::UiMonitorInterface &monitor) override
Definition psmfilescanprocessandcopy.cpp:230
pappso::cbor::psm::PsmFileScanProcessAndCopy::mpa_bufferWriterAfterProteinMap
pappso::cbor::CborStreamWriter * mpa_bufferWriterAfterProteinMap
Definition psmfilescanprocessandcopy.h:94
pappso::cbor::psm::PsmFileScanProcessAndCopy::sampleListFinished
void sampleListFinished(pappso::UiMonitorInterface &monitor) override
Definition psmfilescanprocessandcopy.cpp:240
pappso::cbor::psm::PsmFileScanProcessAndCopy::m_operation
QString m_operation
Definition psmfilescanprocessandcopy.h:89
pappso::cbor::psm::PsmFileScanProcessAndCopy::proteinMapReady
virtual void proteinMapReady(pappso::UiMonitorInterface &monitor) override
Definition psmfilescanprocessandcopy.cpp:153
pappso::cbor::psm::PsmFileScanProcessAndCopy::close
void close() override
convenient function to clean pointer before leaving
Definition psmfilescanprocessandcopy.cpp:79
pappso::cbor::psm::PsmFileScanProcessAndCopy::informationsReady
void informationsReady(pappso::UiMonitorInterface &monitor) override
Definition psmfilescanprocessandcopy.cpp:113
pappso::cbor::psm::PsmFileScanProcessAndCopy::mpa_bufferAfterProteinMap
QBuffer * mpa_bufferAfterProteinMap
Definition psmfilescanprocessandcopy.h:93
pappso::cbor::psm::PsmFileScanProcessAndCopy::processBufferScanDone
virtual void processBufferScanDone(pappso::UiMonitorInterface &monitor) override
Definition psmfilescanprocessandcopy.cpp:169
pappso::cbor::psm::PsmFileScanProcessAndCopy::parameterMapReady
void parameterMapReady(pappso::UiMonitorInterface &monitor) override
Definition psmfilescanprocessandcopy.cpp:128
pappso::cbor::psm::PsmFileScanProcessAndCopy::logReady
void logReady(pappso::UiMonitorInterface &monitor) override
Definition psmfilescanprocessandcopy.cpp:120
pappso::cbor::psm::PsmFileScanProcessAndCopy::m_psmNewProteinMap
pappso::cbor::psm::PsmProteinMap m_psmNewProteinMap
Definition psmfilescanprocessandcopy.h:92
pappso::cbor::psm::PsmFileScanProcess::PsmFileScanProcess
PsmFileScanProcess(std::size_t buffer_scan_size)
Definition psmfilescanprocess.cpp:41
pappso::cbor::psm::PsmProteinMap
store PsmProtein in a map with accession as key
Definition psmproteinmap.h:56
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
psmfilescanprocess.h