libpappsomspp
Library for mass spectrometry
filterobopsimodtermlabel.cpp
Go to the documentation of this file.
1
2
/*******************************************************************************
3
* Copyright (c) 2015 Olivier Langella <Olivier.Langella@moulon.inra.fr>.
4
*
5
* This file is part of the PAPPSOms++ library.
6
*
7
* PAPPSOms++ is free software: you can redistribute it and/or modify
8
* it under the terms of the GNU General Public License as published by
9
* the Free Software Foundation, either version 3 of the License, or
10
* (at your option) any later version.
11
*
12
* PAPPSOms++ is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
* GNU General Public License for more details.
16
*
17
* You should have received a copy of the GNU General Public License
18
* along with PAPPSOms++. If not, see <http://www.gnu.org/licenses/>.
19
*
20
* Contributors:
21
* Olivier Langella <Olivier.Langella@moulon.inra.fr> - initial API and
22
*implementation
23
******************************************************************************/
24
25
#include <QDebug>
26
#include "
filterobopsimodtermlabel.h
"
27
28
29
namespace
pappso
30
{
31
FilterOboPsiModTermLabel::FilterOboPsiModTermLabel
(
32
OboPsiModHandlerInterface
&sink,
const
QString &label_search)
33
: m_sink(sink)
34
{
35
m_labelMatch
.setPattern(QString(label_search).replace(
"*"
,
"(.*)"
));
36
m_labelMatch
.setCaseSensitivity(Qt::CaseInsensitive);
37
}
38
39
FilterOboPsiModTermLabel::~FilterOboPsiModTermLabel
()
40
{
41
}
42
43
FilterOboPsiModTermLabel::FilterOboPsiModTermLabel
(
44
const
FilterOboPsiModTermLabel
&other)
45
: m_labelMatch(other.m_labelMatch), m_sink(other.m_sink)
46
{
47
}
48
49
void
50
FilterOboPsiModTermLabel::setOboPsiModTerm
(
const
OboPsiModTerm
&term)
51
{
52
// qDebug() << term._psi_mod_label << " " << term._psi_ms_label;
53
if
(
m_labelMatch
.exactMatch(term.
m_psiModLabel
))
54
{
55
m_sink
.
setOboPsiModTerm
(term);
56
}
57
else
if
(
m_labelMatch
.exactMatch(term.
m_psiMsLabel
))
58
{
59
m_sink
.
setOboPsiModTerm
(term);
60
}
61
}
62
}
// namespace pappso
pappso::OboPsiModTerm::m_psiModLabel
QString m_psiModLabel
Definition:
obopsimod.h:50
pappso::OboPsiModTerm
Definition:
obopsimod.h:36
pappso
tries to keep as much as possible monoisotopes, removing any possible C13 peaks
Definition:
aa.cpp:39
pappso::FilterOboPsiModTermLabel::~FilterOboPsiModTermLabel
virtual ~FilterOboPsiModTermLabel()
Definition:
filterobopsimodtermlabel.cpp:39
pappso::FilterOboPsiModTermLabel::m_sink
OboPsiModHandlerInterface & m_sink
Definition:
filterobopsimodtermlabel.h:36
pappso::FilterOboPsiModTermLabel::FilterOboPsiModTermLabel
FilterOboPsiModTermLabel(OboPsiModHandlerInterface &sink, const QString &label_search)
Definition:
filterobopsimodtermlabel.cpp:31
pappso::OboPsiModHandlerInterface::setOboPsiModTerm
virtual void setOboPsiModTerm(const OboPsiModTerm &term)=0
pappso::OboPsiModHandlerInterface
Definition:
obopsimod.h:65
pappso::FilterOboPsiModTermLabel::m_labelMatch
QRegExp m_labelMatch
Definition:
filterobopsimodtermlabel.h:35
filterobopsimodtermlabel.h
pappso::FilterOboPsiModTermLabel::setOboPsiModTerm
void setOboPsiModTerm(const OboPsiModTerm &term) override
Definition:
filterobopsimodtermlabel.cpp:50
pappso::OboPsiModTerm::m_psiMsLabel
QString m_psiMsLabel
Definition:
obopsimod.h:51
pappso::FilterOboPsiModTermLabel
Definition:
filterobopsimodtermlabel.h:33
pappsomspp
obo
filterobopsimodtermlabel.cpp
Generated on Wed Sep 23 2020 13:22:50 for libpappsomspp by
1.8.20