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
38namespace pappso
39{
40
41
42/**
43 * @todo write docs
44 */
45class MzIdentMlWriter : public QXmlStreamWriter
46{
47 public:
48 /**
49 * Default constructor
50 */
52
53 /**
54 * Destructor
55 */
57
58 void writeDBSequence(const QString &id,
59 const QString &db_ref_id,
60 const pappso::Protein & protein,
61 bool is_reverse);
62
63 void writeDBSequence(const QString &id,
64 const QString &db_ref_id,
65 const QString &accession,
66 const QString &description,
67 const QString &sequence,
68 bool is_reverse);
69
70 void writeStartMzIdentMlDocument(const QString &id, const QString &version);
71
72 void writeCvList();
73
74 void writeCvParam(pappso::AaModificationP modification);
75
76 void writeCvParam(const pappso::OboPsiModTerm &term, const QString &value);
77
78 void writeCvParam(const QString &cv_ref,
79 const QString &accession,
80 const QString &name,
81 const QString &value);
82 void writeCvParamUo(const QString &cv_ref,
83 const QString &accession,
84 const QString &name,
85 const QString &value,
86 const QString &unit_cv_ref,
87 const QString &unit_accession,
88 const QString &unit_name);
89
90 void writeCvParamUo(const QString &cv_ref,
91 const QString &accession,
92 const QString &name,
93 const QString &value,
94 pappso::PrecisionUnit precision_unit);
95 void writeUserParam(const QString &name, const QString &value);
96 void writeUserParam(const QString &name, double value);
97
98
101
102 static const QString toXmlMass(double mass);
103 static const QString toXmlMassDelta(double mass);
104 static const QString toXmlDouble(double value);
105
106 private:
107 // QString m_mzidentmlNamespace = "http://psidev.info/psi/pi/mzIdentML/1.2";
108};
109} // namespace pappso
static const QString toXmlMassDelta(double mass)
static const QString toXmlDouble(double value)
void writeDBSequence(const QString &id, const QString &db_ref_id, const pappso::Protein &protein, bool is_reverse)
void writeStartMzIdentMlDocument(const QString &id, const QString &version)
void writeCvParamUo(const QString &cv_ref, const QString &accession, const QString &name, const QString &value, const QString &unit_cv_ref, const QString &unit_accession, const QString &unit_name)
void writeCvParam(pappso::AaModificationP modification)
static const QString toXmlMass(double mass)
void writeUserParam(const QString &name, const QString &value)
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