tandemparameters.cpp 2.76 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/**
 * \file /core/tandem_run/tandemparameters.cpp
 * \date 19/9/2017
 * \author Olivier Langella
 * \brief handles X!Tandem parameters
 */

/*******************************************************************************
* Copyright (c) 2017 Olivier Langella <olivier.langella@u-psud.fr>.
*
* This file is part of XTPcpp.
*
*     XTPcpp is free software: you can redistribute it and/or modify
*     it under the terms of the GNU General Public License as published by
*     the Free Software Foundation, either version 3 of the License, or
*     (at your option) any later version.
*
*     XTPcpp is distributed in the hope that it will be useful,
*     but WITHOUT ANY WARRANTY; without even the implied warranty of
*     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
*     GNU General Public License for more details.
*
*     You should have received a copy of the GNU General Public License
*     along with XTPcpp.  If not, see <http://www.gnu.org/licenses/>.
*
* Contributors:
*     Olivier Langella <olivier.langella@u-psud.fr> - initial API and implementation
******************************************************************************/

#include "tandemparameters.h"
31
#include <QDebug>
32
33
34
35
36
37
38

TandemParameters::TandemParameters() {
}
TandemParameters::~TandemParameters() {
}

TandemParameters::TandemParameters(const TandemParameters & other) {
39
    qDebug() << "TandemParameters::TandemParameters copy begin";
Olivier Langella's avatar
Olivier Langella committed
40
    //_map_label_value = other._map_label_value;
41
    _method_name = other._method_name;
Olivier Langella's avatar
Olivier Langella committed
42
43
44

    QMap<QString, QString>::const_iterator i = other._map_label_value.constBegin();
    while (i != other._map_label_value.constEnd()) {
45
        qDebug() << "TandemParameters::TandemParameters copy " << i.key() << " " << i.value();
Olivier Langella's avatar
Olivier Langella committed
46
47
48
        _map_label_value.insert(i.key(), i.value());
        i++; // added
    }
49
    qDebug() << "TandemParameters::TandemParameters copy end";
50
}
51
52
53
54
55
56
57
58
59
60
61
62
63
64
const QString TandemParameters::getLabelCategory(const QString & value) const {
    return value.split(", ").at(0);
}

void TandemParameters::setParamLabelValue(const QString & label, const QString & value) {
    //list path
    //<note type="input" label="list path, default parameters">/gorgone/pappso/tmp/temp_condor_job24872841484824316495370334631825647/QExactive_analysis_FDR_nosemi.xml</note>
    //<note type="input" label="list path, taxonomy information">/gorgone/pappso/tmp/temp_condor_job24872841484824316495370334631825647/database.xml</note>
    if (getLabelCategory(label) == "list path") {
        return;
    }
    if (label == "spectrum, path") {
        return;
    }
65
66
67
68
69
70
71
72
73

    _map_label_value.insert(label, value);
}
void TandemParameters::setMethodName(const QString & method) {
    _method_name = method;
}
const QMap<QString, QString> & TandemParameters::getMapLabelValue() const {
    return _map_label_value;
}