libpappsomspp
Library for mass spectrometry
Loading...
Searching...
No Matches
sagereader.h
Go to the documentation of this file.
1/**
2 * \file input/sage/sagereader.h
3 * \date 21/08/2024
4 * \author Olivier Langella
5 * \brief read data files from Sage output
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 "sagefilereader.h"
34#include "../psmproteinmap.h"
35
36
37namespace pappso::cbor::psm
38{
39/**
40 * @todo write docs
41 */
43{
44 public:
45 /**
46 * Default constructor
47 */
50 const SageFileReader &sage_file_reader,
51 const QString &sage_json_file);
52
53 void read();
54 /**
55 * Destructor
56 */
57 virtual ~SageReader();
58
59
81
82 std::vector<SageModification> getStaticModificationList() const;
83 std::vector<SageModification> getVariableModificationList() const;
84 QString getDecoyTag() const;
85
86 const SageFileReader &getSageFileReader() const;
87
89
90 const QString &getmJsonAbsoluteFilePath() const;
91
92 const QString &getMzmlPath(const QString &file_msrun) const;
93
94 private:
95 void readTsvFile();
96 void extractMzmlPathList(const QJsonDocument &json_doc);
97 QString getTsvFilePath(const QJsonDocument &json_doc);
98 QString getFastaFilePath(const QJsonDocument &json_doc);
99 QString convertToLocalFileOrDie(const QString &file_str) const;
100
101
103 {
104 public:
105 FastaSeq(SageReader *self);
106 void setSequence(const QString &description_in, const QString &sequence_in) override;
107
108 private:
110 QString m_decoyTag;
111 };
112
113 private:
119 QStringList m_mzmlPathList;
120};
121} // namespace pappso::cbor::psm
overrides QCborStreamWriter base class to provide convenient functions
store PsmProtein in a map with accession as key
void setSequence(const QString &description_in, const QString &sequence_in) override
const QString & getMzmlPath(const QString &file_msrun) const
SageReader(pappso::UiMonitorInterface *p_monitor, pappso::cbor::CborStreamWriter *p_output, const SageFileReader &sage_file_reader, const QString &sage_json_file)
std::vector< SageModification > getStaticModificationList() const
pappso::cbor::CborStreamWriter * mp_cborWriter
Definition sagereader.h:116
const QString & getmJsonAbsoluteFilePath() const
void extractMzmlPathList(const QJsonDocument &json_doc)
pappso::cbor::CborStreamWriter & getCborStreamWriter() const
const SageFileReader & m_sageFileReader
Definition sagereader.h:114
std::vector< SageModification > getVariableModificationList() const
QString getFastaFilePath(const QJsonDocument &json_doc)
const SageFileReader & getSageFileReader() const
QString getTsvFilePath(const QJsonDocument &json_doc)
pappso::UiMonitorInterface * mp_monitor
Definition sagereader.h:115
QString convertToLocalFileOrDie(const QString &file_str) const
const AaModification * AaModificationP
SageModification(const SageModification &other)
Definition sagereader.h:69