Commit 49c90b0a authored by Langella Olivier's avatar Langella Olivier
Browse files

indentation with clang format v6.0

parent b62b91cf
/*******************************************************************************
* 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
******************************************************************************/
* 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 "automaticfilterparameters.h"
AutomaticFilterParameters::AutomaticFilterParameters()
{
}
AutomaticFilterParameters::AutomaticFilterParameters(const AutomaticFilterParameters& other)
AutomaticFilterParameters::AutomaticFilterParameters(
const AutomaticFilterParameters &other)
{
_filter_minimum_peptide_evalue=other._filter_minimum_peptide_evalue;
_filter_minimum_protein_evalue=other._filter_minimum_protein_evalue;
_filter_minimum_peptide_per_match=other._filter_minimum_peptide_per_match;
_filter_is_cross_sample_peptide_number=other._filter_is_cross_sample_peptide_number;
_filter_minimum_peptide_evalue = other._filter_minimum_peptide_evalue;
_filter_minimum_protein_evalue = other._filter_minimum_protein_evalue;
_filter_minimum_peptide_per_match = other._filter_minimum_peptide_per_match;
_filter_is_cross_sample_peptide_number =
other._filter_is_cross_sample_peptide_number;
}
AutomaticFilterParameters::~AutomaticFilterParameters()
{
}
void AutomaticFilterParameters::setFilterPeptideEvalue( pappso::pappso_double evalue) {
_filter_minimum_peptide_evalue = evalue;
void
AutomaticFilterParameters::setFilterPeptideEvalue(pappso::pappso_double evalue)
{
_filter_minimum_peptide_evalue = evalue;
}
void AutomaticFilterParameters::setFilterProteinEvalue( pappso::pappso_double evalue) {
_filter_minimum_protein_evalue = evalue;
void
AutomaticFilterParameters::setFilterProteinEvalue(pappso::pappso_double evalue)
{
_filter_minimum_protein_evalue = evalue;
}
void AutomaticFilterParameters::setFilterMinimumPeptidePerMatch(unsigned int number) {
_filter_minimum_peptide_per_match = number;
void
AutomaticFilterParameters::setFilterMinimumPeptidePerMatch(unsigned int number)
{
_filter_minimum_peptide_per_match = number;
}
void AutomaticFilterParameters::setFilterCrossSamplePeptideNumber(bool cross) {
_filter_is_cross_sample_peptide_number = cross;
void
AutomaticFilterParameters::setFilterCrossSamplePeptideNumber(bool cross)
{
_filter_is_cross_sample_peptide_number = cross;
}
pappso::pappso_double AutomaticFilterParameters::getFilterPeptideEvalue() const {
return (_filter_minimum_peptide_evalue );
pappso::pappso_double
AutomaticFilterParameters::getFilterPeptideEvalue() const
{
return (_filter_minimum_peptide_evalue);
}
pappso::pappso_double AutomaticFilterParameters::getFilterProteinEvalue() const {
return ( _filter_minimum_protein_evalue );
pappso::pappso_double
AutomaticFilterParameters::getFilterProteinEvalue() const
{
return (_filter_minimum_protein_evalue);
}
unsigned int AutomaticFilterParameters::getFilterMinimumPeptidePerMatch()const {
return (_filter_minimum_peptide_per_match );
unsigned int
AutomaticFilterParameters::getFilterMinimumPeptidePerMatch() const
{
return (_filter_minimum_peptide_per_match);
}
bool AutomaticFilterParameters::getFilterCrossSamplePeptideNumber()const {
return _filter_is_cross_sample_peptide_number ;
bool
AutomaticFilterParameters::getFilterCrossSamplePeptideNumber() const
{
return _filter_is_cross_sample_peptide_number;
}
/*******************************************************************************
* 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
******************************************************************************/
* 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 AUTOMATICFILTERPARAMETERS_H
#define AUTOMATICFILTERPARAMETERS_H
......@@ -27,29 +28,28 @@
class AutomaticFilterParameters
{
public:
AutomaticFilterParameters();
AutomaticFilterParameters(const AutomaticFilterParameters& other);
~AutomaticFilterParameters();
public:
AutomaticFilterParameters();
AutomaticFilterParameters(const AutomaticFilterParameters &other);
~AutomaticFilterParameters();
void setFilterPeptideEvalue( pappso::pappso_double evalue);
void setFilterProteinEvalue( pappso::pappso_double evalue);
void setFilterMinimumPeptidePerMatch(unsigned int number);
void setFilterCrossSamplePeptideNumber(bool cross);
void setFilterPeptideEvalue(pappso::pappso_double evalue);
void setFilterProteinEvalue(pappso::pappso_double evalue);
void setFilterMinimumPeptidePerMatch(unsigned int number);
void setFilterCrossSamplePeptideNumber(bool cross);
pappso::pappso_double getFilterPeptideEvalue() const;
pappso::pappso_double getFilterProteinEvalue()const;
unsigned int getFilterMinimumPeptidePerMatch()const;
bool getFilterCrossSamplePeptideNumber()const;
pappso::pappso_double getFilterPeptideEvalue() const;
pappso::pappso_double getFilterProteinEvalue() const;
unsigned int getFilterMinimumPeptidePerMatch() const;
bool getFilterCrossSamplePeptideNumber() const;
private :
pappso::pappso_double _filter_minimum_peptide_evalue=1;
pappso::pappso_double _filter_minimum_protein_evalue=1;
unsigned int _filter_minimum_peptide_per_match=1;
bool _filter_is_cross_sample_peptide_number=false;
private:
pappso::pappso_double _filter_minimum_peptide_evalue = 1;
pappso::pappso_double _filter_minimum_protein_evalue = 1;
unsigned int _filter_minimum_peptide_per_match = 1;
bool _filter_is_cross_sample_peptide_number = false;
};
#endif // AUTOMATICFILTERPARAMETERS_H
/*******************************************************************************
* Copyright (c) 2016 Olivier Langella <Olivier.Langella@moulon.inra.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@moulon.inra.fr> - initial API and implementation
******************************************************************************/
* Copyright (c) 2016 Olivier Langella <Olivier.Langella@moulon.inra.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@moulon.inra.fr> - initial API and
*implementation
******************************************************************************/
#ifndef IDENTIFICATIONDATASOURCE_H
#define IDENTIFICATIONDATASOURCE_H
......@@ -39,106 +40,116 @@ typedef std::shared_ptr<IdentificationDataSource> IdentificationDataSourceSp;
class IdentificationDataSource
{
public:
IdentificationDataSource(const QString resource_name);
IdentificationDataSource(const IdentificationDataSource& other);
~IdentificationDataSource();
bool operator==(const IdentificationDataSource& other) const;
PeptideEvidenceStore & getPeptideEvidenceStore();
const PeptideEvidenceStore & getPeptideEvidenceStore() const;
void setXmlId(const QString xmlid);
const QString & getXmlId() const;
/** @brief URL or filename containing identification data
* */
const QString & getResourceName () const;
/** @brief get biological sample name
* */
const QString getSampleName () const;
void setMsRunSp (MsRunSp ms_run_sp);
MsRunSp getMsRunSp () const;
/** @brief get the spectrum with scan number
* */
virtual pappso::SpectrumSp getSpectrumSp(unsigned int scan_number) const;
/** \brief read source content to store it in project
*/
virtual void parseTo(Project* p_project)=0;
/** \brief set identification engine
*/
virtual void setIdentificationEngine(IdentificationEngine engine);
/** \brief identification engine
*/
virtual IdentificationEngine getIdentificationEngine() const;
/** \brief identification engine name
*/
const QString getIdentificationEngineName() const;
/** \brief identification engine version
*/
virtual const QString& getIdentificationEngineVersion() const;
/** \brief set identification engine version
*/
virtual void setIdentificationEngineVersion(const QString& version);
/** \brief set identification engine parameter value
*/
virtual void setIdentificationEngineParam(IdentificationEngineParam param, const QVariant& value);
/** \brief get specific identification engine parameter value
*/
virtual const QVariant getIdentificationEngineParam(IdentificationEngineParam param) const;
/** \brief set identification engine statistics
* any statistics on this identification run that can be told by the identification engine
*/
virtual void setIdentificationEngineStatistics(IdentificationEngineStatistics param, const QVariant& value);
/** \brief get specific identification engine statistics value
*/
virtual const QVariant getIdentificationEngineStatistics(IdentificationEngineStatistics param) const;
/** \brief add Fastafile used by the identification engine
*/
void addFastaFile (FastaFileSp file);
const std::vector<FastaFileSp> & getFastaFileList() const;
/** \brief get identification engine statistics map
*/
virtual const std::map<IdentificationEngineStatistics, QVariant> & getIdentificationEngineStatisticsMap() const;
/** \brief get identification engine param map
*/
virtual const std::map<IdentificationEngineParam, QVariant> & getIdentificationEngineParamMap() const;
virtual const bool isValid(const PeptideEvidence * p_peptide_evidence, const AutomaticFilterParameters & automatic_filter_parameters) const;
protected :
QString _resource_name;
IdentificationEngine _engine = IdentificationEngine::unknown;
private :
//static std::map<QString, pappso::MsRunIdSp> _map_msrunidsp;
QString _xml_id;
QString _version;
MsRunSp _ms_run_sp = nullptr;
std::map<IdentificationEngineParam, QVariant> _params;
std::map<IdentificationEngineStatistics, QVariant> _param_stats;
std::vector<FastaFileSp> _fastafile_list;
PeptideEvidenceStore _peptide_evidence_store;
public:
IdentificationDataSource(const QString resource_name);
IdentificationDataSource(const IdentificationDataSource &other);
~IdentificationDataSource();
bool operator==(const IdentificationDataSource &other) const;
PeptideEvidenceStore &getPeptideEvidenceStore();
const PeptideEvidenceStore &getPeptideEvidenceStore() const;
void setXmlId(const QString xmlid);
const QString &getXmlId() const;
/** @brief URL or filename containing identification data
* */
const QString &getResourceName() const;
/** @brief get biological sample name
* */
const QString getSampleName() const;
void setMsRunSp(MsRunSp ms_run_sp);
MsRunSp getMsRunSp() const;
/** @brief get the spectrum with scan number
* */
virtual pappso::SpectrumSp getSpectrumSp(unsigned int scan_number) const;
/** \brief read source content to store it in project
*/
virtual void parseTo(Project *p_project) = 0;
/** \brief set identification engine
*/
virtual void setIdentificationEngine(IdentificationEngine engine);
/** \brief identification engine
*/
virtual IdentificationEngine getIdentificationEngine() const;
/** \brief identification engine name
*/
const QString getIdentificationEngineName() const;
/** \brief identification engine version
*/
virtual const QString &getIdentificationEngineVersion() const;
/** \brief set identification engine version
*/
virtual void setIdentificationEngineVersion(const QString &version);
/** \brief set identification engine parameter value
*/
virtual void setIdentificationEngineParam(IdentificationEngineParam param,
const QVariant &value);
/** \brief get specific identification engine parameter value
*/
virtual const QVariant
getIdentificationEngineParam(IdentificationEngineParam param) const;
/** \brief set identification engine statistics
* any statistics on this identification run that can be told by the
* identification engine
*/
virtual void
setIdentificationEngineStatistics(IdentificationEngineStatistics param,
const QVariant &value);
/** \brief get specific identification engine statistics value
*/
virtual const QVariant
getIdentificationEngineStatistics(IdentificationEngineStatistics param) const;
/** \brief add Fastafile used by the identification engine
*/
void addFastaFile(FastaFileSp file);
const std::vector<FastaFileSp> &getFastaFileList() const;
/** \brief get identification engine statistics map
*/
virtual const std::map<IdentificationEngineStatistics, QVariant> &
getIdentificationEngineStatisticsMap() const;
/** \brief get identification engine param map
*/
virtual const std::map<IdentificationEngineParam, QVariant> &
getIdentificationEngineParamMap() const;
virtual const bool
isValid(const PeptideEvidence *p_peptide_evidence,
const AutomaticFilterParameters &automatic_filter_parameters) const;
protected:
QString _resource_name;
IdentificationEngine _engine = IdentificationEngine::unknown;
private:
// static std::map<QString, pappso::MsRunIdSp> _map_msrunidsp;
QString _xml_id;
QString _version;
MsRunSp _ms_run_sp = nullptr;
std::map<IdentificationEngineParam, QVariant> _params;
std::map<IdentificationEngineStatistics, QVariant> _param_stats;
std::vector<FastaFileSp> _fastafile_list;
PeptideEvidenceStore _peptide_evidence_store;
};
#endif // IDENTIFICATIONDATASOURCE_H
......@@ -6,26 +6,27 @@
*/
/*******************************************************************************
* Copyright (c) 2018 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
******************************************************************************/
* Copyright (c) 2018 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 "identificationmascotdatfile.h"
......@@ -33,75 +34,98 @@
#include "../project.h"
#include "../../input/mascot/mascotdatparser.h"
IdentificationMascotDatFile::IdentificationMascotDatFile(const QFileInfo & mascot_dat_file) : IdentificationDataSource(mascot_dat_file.absoluteFilePath()), _mascot_dat_file(mascot_dat_file)
IdentificationMascotDatFile::IdentificationMascotDatFile(
const QFileInfo &mascot_dat_file)
: IdentificationDataSource(mascot_dat_file.absoluteFilePath())
, _mascot_dat_file(mascot_dat_file)
{
_engine = IdentificationEngine::mascot;
_engine = IdentificationEngine::mascot;
}
IdentificationMascotDatFile::IdentificationMascotDatFile(const IdentificationMascotDatFile& other) : IdentificationDataSource(other),_mascot_dat_file (other._mascot_dat_file)
IdentificationMascotDatFile::IdentificationMascotDatFile(
const IdentificationMascotDatFile &other)
: IdentificationDataSource(other), _mascot_dat_file(other._mascot_dat_file)
{
_engine = IdentificationEngine::mascot;
_engine = IdentificationEngine::mascot;
}
IdentificationMascotDatFile::~IdentificationMascotDatFile()
{
}
bool IdentificationMascotDatFile::operator==(const IdentificationMascotDatFile& other) const
bool
IdentificationMascotDatFile::
operator==(const IdentificationMascotDatFile &other) const
{
}
pappso::SpectrumSp IdentificationMascotDatFile::getSpectrumSp(unsigned int scan_number) const {
pappso::SpectrumSp spectrum_sp = IdentificationDataSource::getSpectrumSp(scan_number);
return spectrum_sp;
pappso::SpectrumSp
IdentificationMascotDatFile::getSpectrumSp(unsigned int scan_number) const
{
pappso::SpectrumSp spectrum_sp =
IdentificationDataSource::getSpectrumSp(scan_number);
return spectrum_sp;
}
void IdentificationMascotDatFile::parseTo(Project* p_project) {
qDebug() << "IdentificationMascotDatFile::parseTo begin";
qDebug() << "Read Mascot dat result file '" << _mascot_dat_file.absoluteFilePath() << "'";
MsRunSp msrun_sp = p_project->getMsRunStore().getInstance(QFileInfo(_mascot_dat_file).baseName());
setMsRunSp(msrun_sp);
std::vector<IdentificationGroup *> identification_list = p_project->getIdentificationGroupList();
IdentificationGroup * identification_group_p = nullptr;
if (p_project->getProjectMode() == ProjectMode::combined) {
if (identification_list.size() == 0) {
identification_group_p = p_project->newIdentificationGroup();
void
IdentificationMascotDatFile::parseTo(Project *p_project)
{
qDebug() << "IdentificationMascotDatFile::parseTo begin";
qDebug() << "Read Mascot dat result file '"
<< _mascot_dat_file.absoluteFilePath() << "'";