libpappsomspp
Library for mass spectrometry
Toggle main menu visibility
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
30
#include "
../../../../fasta/fastahandlerinterface.h
"
31
#include "
../../../../amino_acid/aamodification.h
"
32
#include "
sagefilereader.h
"
33
#include "
../psmproteinmap.h
"
34
35
36
namespace
pappso::cbor::psm
37
{
38
/**
39
* @todo write docs
40
*/
41
class
SageReader
42
{
43
public
:
44
/**
45
* Default constructor
46
*/
47
SageReader
(
pappso::UiMonitorInterface
*p_monitor,
48
pappso::cbor::CborStreamWriter
*p_output,
49
const
SageFileReader
&sage_file_reader,
50
const
QString &sage_json_file);
51
52
void
read
();
53
/**
54
* Destructor
55
*/
56
virtual
~SageReader
();
57
58
59
struct
SageModification
60
{
61
pappso::AaModificationP
modification
;
62
QChar
residue
;
63
QString
strModification
;
64
};
65
66
std::vector<SageModification>
getStaticModificationList
()
const
;
67
std::vector<SageModification>
getVariableModificationList
()
const
;
68
QString
getDecoyTag
()
const
;
69
70
const
SageFileReader
&
getSageFileReader
()
const
;
71
72
pappso::cbor::CborStreamWriter
&
getCborStreamWriter
()
const
;
73
74
const
QString &
getmJsonAbsoluteFilePath
()
const
;
75
76
const
QString &
getMzmlPath
(
const
QString &file_msrun)
const
;
77
78
private
:
79
void
readTsvFile
();
80
void
extractMzmlPathList
(
const
QJsonDocument &json_doc);
81
QString
getTsvFilePath
(
const
QJsonDocument &json_doc);
82
QString
getFastaFilePath
(
const
QJsonDocument &json_doc);
83
QString
convertToLocalFileOrDie
(
const
QString &file_str)
const
;
84
85
86
class
FastaSeq
:
public
pappso::FastaHandlerInterface
87
{
88
public
:
89
FastaSeq
(
SageReader
*self);
90
void
setSequence
(
const
QString &description_in,
const
QString &sequence_in)
override
;
91
92
private
:
93
SageReader
*
mp_self
;
94
QString
m_decoyTag
;
95
};
96
97
private
:
98
const
SageFileReader
&
m_sageFileReader
;
99
pappso::UiMonitorInterface
*
mp_monitor
;
100
pappso::cbor::CborStreamWriter
*
mp_cborWriter
;
101
PsmProteinMap
m_psmProteinMap
;
102
QString
m_jsonAbsoluteFilePath
;
103
QStringList
m_mzmlPathList
;
104
};
105
}
// namespace pappso::cbor::psm
aamodification.h
pappso::FastaHandlerInterface
Definition
fastahandlerinterface.h:32
pappso::UiMonitorInterface
Definition
uimonitorinterface.h:50
pappso::cbor::CborStreamWriter
overrides QCborStreamWriter base class to provide convenient functions
Definition
cborstreamwriter.h:46
pappso::cbor::psm::PsmProteinMap
store PsmProtein in a map with accession as key
Definition
psmproteinmap.h:56
pappso::cbor::psm::SageFileReader
Definition
sagefilereader.h:48
pappso::cbor::psm::SageReader::FastaSeq::mp_self
SageReader * mp_self
Definition
sagereader.h:93
pappso::cbor::psm::SageReader::FastaSeq::setSequence
void setSequence(const QString &description_in, const QString &sequence_in) override
Definition
sagereader.cpp:80
pappso::cbor::psm::SageReader::FastaSeq::m_decoyTag
QString m_decoyTag
Definition
sagereader.h:94
pappso::cbor::psm::SageReader::FastaSeq::FastaSeq
FastaSeq(SageReader *self)
Definition
sagereader.cpp:73
pappso::cbor::psm::SageReader::m_psmProteinMap
PsmProteinMap m_psmProteinMap
Definition
sagereader.h:101
pappso::cbor::psm::SageReader::getMzmlPath
const QString & getMzmlPath(const QString &file_msrun) const
Definition
sagereader.cpp:190
pappso::cbor::psm::SageReader::SageReader
SageReader(pappso::UiMonitorInterface *p_monitor, pappso::cbor::CborStreamWriter *p_output, const SageFileReader &sage_file_reader, const QString &sage_json_file)
Definition
sagereader.cpp:45
pappso::cbor::psm::SageReader::getStaticModificationList
std::vector< SageModification > getStaticModificationList() const
Definition
sagereader.cpp:279
pappso::cbor::psm::SageReader::readTsvFile
void readTsvFile()
Definition
sagereader.cpp:120
pappso::cbor::psm::SageReader::m_mzmlPathList
QStringList m_mzmlPathList
Definition
sagereader.h:103
pappso::cbor::psm::SageReader::mp_cborWriter
pappso::cbor::CborStreamWriter * mp_cborWriter
Definition
sagereader.h:100
pappso::cbor::psm::SageReader::getmJsonAbsoluteFilePath
const QString & getmJsonAbsoluteFilePath() const
Definition
sagereader.cpp:61
pappso::cbor::psm::SageReader::extractMzmlPathList
void extractMzmlPathList(const QJsonDocument &json_doc)
Definition
sagereader.cpp:172
pappso::cbor::psm::SageReader::~SageReader
virtual ~SageReader()
Definition
sagereader.cpp:56
pappso::cbor::psm::SageReader::getCborStreamWriter
pappso::cbor::CborStreamWriter & getCborStreamWriter() const
Definition
sagereader.cpp:113
pappso::cbor::psm::SageReader::m_jsonAbsoluteFilePath
QString m_jsonAbsoluteFilePath
Definition
sagereader.h:102
pappso::cbor::psm::SageReader::m_sageFileReader
const SageFileReader & m_sageFileReader
Definition
sagereader.h:98
pappso::cbor::psm::SageReader::getVariableModificationList
std::vector< SageModification > getVariableModificationList() const
Definition
sagereader.cpp:321
pappso::cbor::psm::SageReader::getFastaFilePath
QString getFastaFilePath(const QJsonDocument &json_doc)
Definition
sagereader.cpp:232
pappso::cbor::psm::SageReader::getDecoyTag
QString getDecoyTag() const
Definition
sagereader.cpp:364
pappso::cbor::psm::SageReader::getSageFileReader
const SageFileReader & getSageFileReader() const
Definition
sagereader.cpp:382
pappso::cbor::psm::SageReader::getTsvFilePath
QString getTsvFilePath(const QJsonDocument &json_doc)
Definition
sagereader.cpp:203
pappso::cbor::psm::SageReader::mp_monitor
pappso::UiMonitorInterface * mp_monitor
Definition
sagereader.h:99
pappso::cbor::psm::SageReader::read
void read()
Definition
sagereader.cpp:68
pappso::cbor::psm::SageReader::convertToLocalFileOrDie
QString convertToLocalFileOrDie(const QString &file_str) const
Definition
sagereader.cpp:252
fastahandlerinterface.h
pappso::cbor::psm
Definition
cborscanmapbase.h:40
pappso::AaModificationP
const AaModification * AaModificationP
Definition
aamodification.h:52
psmproteinmap.h
sagefilereader.h
pappso::cbor::psm::SageReader::SageModification
Definition
sagereader.h:60
pappso::cbor::psm::SageReader::SageModification::residue
QChar residue
Definition
sagereader.h:62
pappso::cbor::psm::SageReader::SageModification::strModification
QString strModification
Definition
sagereader.h:63
pappso::cbor::psm::SageReader::SageModification::modification
pappso::AaModificationP modification
Definition
sagereader.h:61
pappsomspp
core
processing
cbor
psm
sage
sagereader.h
Generated on
for libpappsomspp by
1.17.0