Loading...
Searching...
No Matches
psmfileappend.h
Go to the documentation of this file.
/**
* \file pappsomspp/processing/cbor/psm/psmfileappend.h
* \date 10/07/2025
* \author Olivier Langella
* \brief append many PSM cbor file into a single one
*/
/*******************************************************************************
* 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 "psmfilereaderbase.h"
#include "pappsomspp/core/processing/cbor/cborstreamwriter.h"
#include <QTemporaryDir>
namespace pappso::cbor::psm
{
/**
* @todo write docs
*/
class PsmFileAppend : public PsmFileReaderBase
{
public:
/**
* Default constructor
*/
PsmFileAppend(pappso::cbor::CborStreamWriter *p_output);
/**
* Destructor
*/
virtual ~PsmFileAppend();
void informationsReady(pappso::UiMonitorInterface &monitor) override;
void parameterMapReady(pappso::UiMonitorInterface &monitor) override;
void fastaFilesReady(pappso::UiMonitorInterface &monitor) override;
void readSample(pappso::UiMonitorInterface &monitor) override;
void close() override;
protected:
void mergeParameterMap();
struct SampleStorage
{
QString fileId;
QString temporaryFile;
};
private:
QTemporaryDir *mpa_temporaryDirectory;
pappso::cbor::CborStreamWriter *mp_output;
bool m_isInformations = false;
QCborMap m_outputParameterMap;
QStringList m_outputTargetFastaFiles;
QStringList m_outputDecoyFastaFiles;
std::vector<SampleStorage> m_sampleStorageList;
};
} // namespace pappso::cbor::psm
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::PsmFileAppend::~PsmFileAppend
virtual ~PsmFileAppend()
Definition psmfileappend.cpp:41
pappso::cbor::psm::PsmFileAppend::m_isInformations
bool m_isInformations
Definition psmfileappend.h:73
pappso::cbor::psm::PsmFileAppend::informationsReady
void informationsReady(pappso::UiMonitorInterface &monitor) override
Definition psmfileappend.cpp:47
pappso::cbor::psm::PsmFileAppend::mergeParameterMap
void mergeParameterMap()
Definition psmfileappend.cpp:117
pappso::cbor::psm::PsmFileAppend::m_outputTargetFastaFiles
QStringList m_outputTargetFastaFiles
Definition psmfileappend.h:76
pappso::cbor::psm::PsmFileAppend::m_outputParameterMap
QCborMap m_outputParameterMap
Definition psmfileappend.h:75
pappso::cbor::psm::PsmFileAppend::readSample
void readSample(pappso::UiMonitorInterface &monitor) override
Definition psmfileappend.cpp:137
pappso::cbor::psm::PsmFileAppend::m_outputDecoyFastaFiles
QStringList m_outputDecoyFastaFiles
Definition psmfileappend.h:77
pappso::cbor::psm::PsmFileAppend::mp_output
pappso::cbor::CborStreamWriter * mp_output
Definition psmfileappend.h:71
pappso::cbor::psm::PsmFileAppend::m_sampleStorageList
std::vector< SampleStorage > m_sampleStorageList
Definition psmfileappend.h:78
pappso::cbor::psm::PsmFileAppend::close
void close() override
convenient function to clean pointer before leaving
Definition psmfileappend.cpp:67
pappso::cbor::psm::PsmFileAppend::PsmFileAppend
PsmFileAppend(pappso::cbor::CborStreamWriter *p_output)
Definition psmfileappend.cpp:31
pappso::cbor::psm::PsmFileAppend::fastaFilesReady
void fastaFilesReady(pappso::UiMonitorInterface &monitor) override
Definition psmfileappend.cpp:129
pappso::cbor::psm::PsmFileAppend::parameterMapReady
void parameterMapReady(pappso::UiMonitorInterface &monitor) override
Definition psmfileappend.cpp:59
pappso::cbor::psm::PsmFileAppend::mpa_temporaryDirectory
QTemporaryDir * mpa_temporaryDirectory
Definition psmfileappend.h:70
pappso::cbor::psm::PsmFileReaderBase::PsmFileReaderBase
PsmFileReaderBase()
Definition psmfilereaderbase.cpp:42
pappso::cbor::psm
Definition cborscanmapbase.h:40
psmfilereaderbase.h
pappso::cbor::psm::PsmFileAppend::SampleStorage
Definition psmfileappend.h:64
pappso::cbor::psm::PsmFileAppend::SampleStorage::temporaryFile
QString temporaryFile
Definition psmfileappend.h:66
pappso::cbor::psm::PsmFileAppend::SampleStorage::fileId
QString fileId
Definition psmfileappend.h:65