Skip to content
Snippets Groups Projects
Commit 8ac534fc authored by Olivier Langella's avatar Olivier Langella
Browse files

new fasta file object and identification engine parameters

parent 58e8469d
No related branches found
No related tags found
No related merge requests found
......@@ -61,6 +61,7 @@ SET(CPP_FILES
core/proteinmatch.cpp
core/proteinxtp.cpp
core/sequencedatabase.cpp
files/fastafile.cpp
files/xpipfile.cpp
grouping/groupingexperiment.cpp
grouping/groupinggroup.cpp
......
......@@ -72,8 +72,15 @@ const QString& IdentificationDataSource::getIdentificationEngineVersion() const
void IdentificationDataSource::setIdentificationEngineVersion(const QString& version) {
_version = version;
}
void IdentificationDataSource::setIdentificationEngineParam(IdentificationEngineParam param, const QString& value) {
_params.insert(std::pair<IdentificationEngineParam, QString>(param, value));
}
pappso::SpectrumSp IdentificationDataSource::getSpectrumSp(unsigned int scan_number) const {
pappso::SpectrumSp spectrum_sp = SpectrumStore::getSpectrumSpFromMsRunSp(_ms_run_sp, scan_number);
return spectrum_sp;
}
void IdentificationDataSource::addFastaFile (FastaFile file) {
_fastafile_list.push_back(file);
}
......@@ -27,6 +27,7 @@
#include <pappsomspp/spectrum/spectrum.h>
#include <memory>
#include "../msrun.h"
#include "../../files/fastafile.h"
class Project;
......@@ -65,6 +66,14 @@ public:
/** \brief set identification engine version
*/
virtual void setIdentificationEngineVersion(const QString& version);
/** \brief set identification engine parameter value
*/
virtual void setIdentificationEngineParam(IdentificationEngineParam param, const QString& value);
/** \brief add Fastafile used by the identification engine
*/
void addFastaFile (FastaFile file);
protected :
QString _resource_name;
......@@ -73,6 +82,8 @@ private :
//static std::map<QString, pappso::MsRunIdSp> _map_msrunidsp;
QString _version;
MsRunSp _ms_run_sp = nullptr;
std::map<IdentificationEngineParam, QString> _params;
std::vector<FastaFile> _fastafile_list;
};
#endif // IDENTIFICATIONDATASOURCE_H
/*******************************************************************************
* 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 "fastafile.h"
FastaFile::FastaFile(const QString & fasta_source) : _fasta_source(fasta_source)
{
}
FastaFile::FastaFile(const QUrl & fasta_source) : _fasta_source(fasta_source)
{
}
FastaFile::FastaFile(const QFileInfo & fasta_source): _fasta_source(fasta_source.absoluteFilePath())
{
}
FastaFile::FastaFile(const FastaFile & other) : _fasta_source(other._fasta_source)
{
}
FastaFile::~FastaFile()
{
}
/*******************************************************************************
* 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
******************************************************************************/
#ifndef FASTAFILE_H
#define FASTAFILE_H
#include <QUrl>
#include <QFileInfo>
class FastaFile
{
public:
FastaFile(const QString & fasta_source);
FastaFile(const QUrl & fasta_source);
FastaFile(const QFileInfo & fasta_source);
FastaFile(const FastaFile & other);
~FastaFile();
private :
const QUrl _fasta_source;
};
#endif // FASTAFILE_H
......@@ -34,6 +34,7 @@
#include <cmath>
#include "../utils/peptidestore.h"
#include "../utils/proteinstore.h"
#include "../files/fastafile.h"
XtandemSaxHandler::XtandemSaxHandler(Project * p_project, IdentificationGroup * p_identification_group,
IdentificationDataSource * p_identification_data_source):_p_project(p_project)
......@@ -334,8 +335,11 @@ bool XtandemSaxHandler::endElement_note() {
else {
//<group label="input parameters" type="parameters">
//<note type="input" label="list path, default parameters">/gorgone/pappso/tmp/temp_condor_job8533994640337729751189420695540169/QExactive_analysis_FDR_nosemi.xml</note>
if (_current_note_label == "list path, default parameters") {
_p_identification_data_source->setIdentificationEngineParam(IdentificationEngineParam::tandem_param,_current_text);
}
/*
* <note type="input" label="list path, default parameters">/gorgone/pappso/tmp/temp_condor_job8533994640337729751189420695540169/QExactive_analysis_FDR_nosemi.xml</note>
<note type="input" label="list path, taxonomy information">/gorgone/pappso/tmp/temp_condor_job8533994640337729751189420695540169/database.xml</note>
<note type="input" label="output, histogram column width">30</note>
<note type="input" label="output, histograms">yes</note>
......@@ -441,23 +445,28 @@ bool XtandemSaxHandler::endElement_note() {
*/
//<group label="performance parameters" type="parameters">
//<note label="list path, sequence source #1">/gorgone/pappso/formation/TD/Database/Genome_Z_mays_5a.fasta</note>
//<note label="list path, sequence source #2">/gorgone/pappso/formation/TD/Database/contaminants_standarts.fasta</note>
if (_current_note_label.startsWith("list path, sequence source")) {
_p_identification_data_source->addFastaFile(FastaFile(_current_text));
}
/*
<note label="list path, sequence source #1">/gorgone/pappso/formation/TD/Database/Genome_Z_mays_5a.fasta</note>
<note label="list path, sequence source #2">/gorgone/pappso/formation/TD/Database/contaminants_standarts.fasta</note>
<note label="list path, sequence source description #1">no description</note>
<note label="list path, sequence source description #2">no description</note>
<note label="modelling, duplicate peptide ids">6019</note>
<note label="modelling, duplicate proteins">19735</note>
<note label="modelling, estimated false positives">18</note>
<note label="modelling, reversed sequence false positives">20</note>
<note label="modelling, spectrum noise suppression ratio">0.00</note>
<note label="modelling, total peptides used">96618641</note>
<note label="modelling, total proteins used">273656</note>
<note label="modelling, total spectra assigned">7464</note>
<note label="modelling, total spectra used">12199</note>
<note label="modelling, total unique assigned">6260</note>
<note label="process, start time">2013:12:20:16:47:19</note>
*/
<note label="list path, sequence source description #1">no description</note>
<note label="list path, sequence source description #2">no description</note>
<note label="modelling, duplicate peptide ids">6019</note>
<note label="modelling, duplicate proteins">19735</note>
<note label="modelling, estimated false positives">18</note>
<note label="modelling, reversed sequence false positives">20</note>
<note label="modelling, spectrum noise suppression ratio">0.00</note>
<note label="modelling, total peptides used">96618641</note>
<note label="modelling, total proteins used">273656</note>
<note label="modelling, total spectra assigned">7464</note>
<note label="modelling, total spectra used">12199</note>
<note label="modelling, total unique assigned">6260</note>
<note label="process, start time">2013:12:20:16:47:19</note>
*/
//<note label="process, version">X! Tandem Sledgehammer (2013.09.01.1)</note>
if (_current_note_label == "process, version") {
QRegExp rx("\\((.*)\\)");
......
......@@ -37,6 +37,13 @@ enum class IdentificationEngine {
peptider ///< peptider
};
/** \def IdentificationEngineParam identification engine parameters
*
*/
enum class IdentificationEngineParam {
tandem_param ///< X!Tandem xml parameters file
};
/** \def GroupingType list of available grouping algoritms
*
*/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment