libpappsomspp
Library for mass spectrometry
Loading...
Searching...
No Matches
sagefilereader.h
Go to the documentation of this file.
1/**
2 * \file input/sage/sagefilereader.h
3 * \date 11/10/2024
4 * \author Olivier Langella
5 * \brief read data files from Sage output containin multiple samples
6 */
7
8/*******************************************************************************
9 * Copyright (c) 2024 Olivier Langella
10 *<Olivier.Langella@universite-paris-saclay.fr>.
11 *
12 * This file is part of i2MassChroQ.
13 *
14 * i2MassChroQ is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License as published by
16 * the Free Software Foundation, either version 3 of the License, or
17 * (at your option) any later version.
18 *
19 * i2MassChroQ is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
23 *
24 * You should have received a copy of the GNU General Public License
25 * along with i2MassChroQ. If not, see <http://www.gnu.org/licenses/>.
26 *
27 ******************************************************************************/
28
29#pragma once
33#include <QJsonDocument>
35#include <QFileInfo>
36
37namespace pappso
38{
39namespace cbor
40{
41namespace psm
42{
43
44/**
45 * @todo write docs
46 */
48{
49 public:
50 /** @brief main function to convert Sage results to CBOR output
51 *
52 * given the Sage JSON result file, this class reads the TSV output and convert the Sage PSMs to
53 * the PSMcbor format
54 * @param p_monitor pointer to monitor read progress
55 * @param p_output cbor output pointer
56 * @param sage_json_file Sage JSON result file
57 */
60 const QFileInfo &sage_json_file);
61
62 /**
63 * Destructor
64 */
65 virtual ~SageFileReader();
66
67 const QJsonDocument &getJsonDocument() const;
68 QString getMsRunSpWithFileName(const QString &msrun_filename) const;
69
70 private:
71 void readJson();
72
73 private:
74 const QFileInfo m_sageJsonFile;
75 QJsonDocument m_jsonData;
76
77 std::map<QString, QString> m_mapFilePath2MsRunSp;
80 QString m_decoyTag;
81 bool m_generateDecoy = false;
82 QStringList m_targetFastaFile;
83};
84
85} // namespace psm
86} // namespace cbor
87} // namespace pappso
overrides QCborStreamWriter base class to provide convenient functions
SageFileReader(pappso::UiMonitorInterface *p_monitor, pappso::cbor::CborStreamWriter *p_output, const QFileInfo &sage_json_file)
main function to convert Sage results to CBOR output
std::map< QString, QString > m_mapFilePath2MsRunSp
pappso::cbor::CborStreamWriter * mp_cborWriter
QString getMsRunSpWithFileName(const QString &msrun_filename) const
const QJsonDocument & getJsonDocument() const
#define PMSPP_LIB_DECL
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
Definition aa.cpp:39