libpappsomspp
Library for mass spectrometry
Loading...
Searching...
No Matches
mzidentmlwriter.h
Go to the documentation of this file.
1/**
2 * \file processing/xml/mzidentmlwriter.h
3 * \date 07/02/2024
4 * \author Olivier Langella
5 * \brief MzIdentML writer
6 */
7
8/*******************************************************************************
9 * Copyright (c) 2024 Olivier Langella
10 *<Olivier.Langella@universite-paris-saclay.fr>.
11 *
12 * This file is part of PAPPSOms-tools.
13 *
14 * PAPPSOms-tools 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 * PAPPSOms-tools 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 PAPPSOms-tools. If not, see <http://www.gnu.org/licenses/>.
26 *
27 ******************************************************************************/
28
29#pragma once
30
31#include <QString>
32#include <QXmlStreamWriter>
33#include "../../types.h"
34#include "../../psm/deepprot/deepprotenum.h"
35#include "../../amino_acid/aamodification.h"
36#include "../../protein/protein.h"
37#include "../../exportinmportconfig.h"
38
39namespace pappso
40{
41
42
43/**
44 * @todo write docs
45 */
46class PMSPP_LIB_DECL MzIdentMlWriter : public QXmlStreamWriter
47{
48 public:
49 /**
50 * Default constructor
51 */
53
54 /**
55 * Destructor
56 */
58
59 void writeDBSequence(const QString &id,
60 const QString &db_ref_id,
61 const pappso::Protein & protein,
62 bool is_reverse);
63
64 void writeDBSequence(const QString &id,
65 const QString &db_ref_id,
66 const QString &accession,
67 const QString &description,
68 const QString &sequence,
69 bool is_reverse);
70
71 void writeStartMzIdentMlDocument(const QString &id, const QString &version);
72
73 void writeCvList();
74
75 void writeCvParam(pappso::AaModificationP modification);
76
77 void writeCvParam(const pappso::OboPsiModTerm &term, const QString &value);
78
79 void writeCvParam(const QString &cv_ref,
80 const QString &accession,
81 const QString &name,
82 const QString &value);
83 void writeCvParamUo(const QString &cv_ref,
84 const QString &accession,
85 const QString &name,
86 const QString &value,
87 const QString &unit_cv_ref,
88 const QString &unit_accession,
89 const QString &unit_name);
90
91 void writeCvParamUo(const QString &cv_ref,
92 const QString &accession,
93 const QString &name,
94 const QString &value,
95 pappso::PrecisionUnit precision_unit);
96 void writeUserParam(const QString &name, const QString &value);
97 void writeUserParam(const QString &name, double value);
98
99
100 void writeUserParam(pappso::DeepProtMatchType matchType);
101 void writeUserParam(pappso::DeepProtPeptideCandidateStatus status);
102
103 static const QString toXmlMass(double mass);
104 static const QString toXmlMassDelta(double mass);
105 static const QString toXmlDouble(double value);
106
107 private:
108 // QString m_mzidentmlNamespace = "http://psidev.info/psi/pi/mzIdentML/1.2";
109};
110} // namespace pappso
#define PMSPP_LIB_DECL
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
Definition aa.cpp:39
PrecisionUnit
Definition types.h:76
DeepProtMatchType
definition of different class of PSMs used by DeepProt
DeepProtPeptideCandidateStatus
definition of different status for potential peptide candidates on the same spectrum