diff --git a/src/core/identification_sources/identificationmascotdatfile.cpp b/src/core/identification_sources/identificationmascotdatfile.cpp index aacb8ea517eb62c0c760931366bca8dc865abf2a..2115e67551f49c958ac6527cb2ed56c4fcd0d4fe 100644 --- a/src/core/identification_sources/identificationmascotdatfile.cpp +++ b/src/core/identification_sources/identificationmascotdatfile.cpp @@ -36,8 +36,8 @@ IdentificationMascotDatFile::IdentificationMascotDatFile( const QFileInfo &mascot_dat_file) - : IdentificationDataSource(mascot_dat_file.absoluteFilePath()), - _mascot_dat_file(mascot_dat_file) + : IdentificationDataSource(mascot_dat_file.absoluteFilePath()) + , _mascot_dat_file(mascot_dat_file) { _engine = IdentificationEngine::mascot; } diff --git a/src/core/identification_sources/identificationpepxmlfile.cpp b/src/core/identification_sources/identificationpepxmlfile.cpp index 563aea5cb05a6df53e6909cacbc5c7d4705801cc..636cca993f32f539cfad1cc7217d4f68c02e8253 100644 --- a/src/core/identification_sources/identificationpepxmlfile.cpp +++ b/src/core/identification_sources/identificationpepxmlfile.cpp @@ -33,8 +33,8 @@ IdentificationPepXmlFile::IdentificationPepXmlFile( const QFileInfo &mascot_dat_file) - : IdentificationDataSource(mascot_dat_file.absoluteFilePath()), - _pep_xml_file(mascot_dat_file) + : IdentificationDataSource(mascot_dat_file.absoluteFilePath()) + , _pep_xml_file(mascot_dat_file) { _engine = IdentificationEngine::unknown; } diff --git a/src/core/identification_sources/identificationpwizfile.cpp b/src/core/identification_sources/identificationpwizfile.cpp index e86cdda76bd5d2c1b70849595340cba181bc4c14..809e1f758220cc3571619becd4b2649dea7c4e74 100644 --- a/src/core/identification_sources/identificationpwizfile.cpp +++ b/src/core/identification_sources/identificationpwizfile.cpp @@ -34,8 +34,8 @@ #include <pappsomspp/pappsoexception.h> IdentificationPwizFile::IdentificationPwizFile(const QFileInfo &ident_file) - : IdentificationDataSource(ident_file.absoluteFilePath()), - _ident_file(ident_file) + : IdentificationDataSource(ident_file.absoluteFilePath()) + , _ident_file(ident_file) { //_engine = IdentificationEngine::XTandem; _engine = IdentificationEngine::peptider; diff --git a/src/core/identification_sources/identificationxtandemfile.cpp b/src/core/identification_sources/identificationxtandemfile.cpp index adc0ce5564be8ee613c3c94cab38f3f085a668d9..33d45f996146214defce0e050e4c7b2995098cc8 100644 --- a/src/core/identification_sources/identificationxtandemfile.cpp +++ b/src/core/identification_sources/identificationxtandemfile.cpp @@ -28,8 +28,8 @@ IdentificationXtandemFile::IdentificationXtandemFile( const QFileInfo &xtandem_file) - : IdentificationDataSource(xtandem_file.absoluteFilePath()), - _xtandem_file(xtandem_file) + : IdentificationDataSource(xtandem_file.absoluteFilePath()) + , _xtandem_file(xtandem_file) { _engine = IdentificationEngine::XTandem; } diff --git a/src/core/identificationgroup.cpp b/src/core/identificationgroup.cpp index e668b13ef473d230e538ce5598dbd468390d2bd2..853af05959f50367ca10f2f8fab835d840200ee2 100644 --- a/src/core/identificationgroup.cpp +++ b/src/core/identificationgroup.cpp @@ -130,8 +130,7 @@ unsigned int IdentificationGroup::countDecoyProteinMatch(ValidationState state) const { return std::count_if( - _protein_match_list.begin(), - _protein_match_list.end(), + _protein_match_list.begin(), _protein_match_list.end(), [state](const ProteinMatch *p_protein_match) { if((p_protein_match->getProteinXtpSp().get()->isDecoy()) && (p_protein_match->getValidationState() >= state)) @@ -209,8 +208,7 @@ IdentificationGroup::countDecoyPeptideMatch(ValidationState state) const unsigned int IdentificationGroup::countProteinMatch(ValidationState state) const { - return std::count_if(_protein_match_list.begin(), - _protein_match_list.end(), + return std::count_if(_protein_match_list.begin(), _protein_match_list.end(), [state](const ProteinMatch *p_protein_match) { if(p_protein_match->getValidationState() >= state) { @@ -303,8 +301,8 @@ IdentificationGroup::addIdentificationDataSourceP( IdentificationDataSource *p_identification_source) { addMsRunSp(p_identification_source->getMsRunSp()); - auto it = std::find( - _id_source_list.begin(), _id_source_list.end(), p_identification_source); + auto it = std::find(_id_source_list.begin(), _id_source_list.end(), + p_identification_source); if(it == _id_source_list.end()) { _id_source_list.push_back(p_identification_source); @@ -354,8 +352,7 @@ IdentificationGroup::countSubGroup() const void IdentificationGroup::collectMhDelta( - std::vector<pappso::pappso_double> &delta_list, - pappso::PrecisionUnit unit, + std::vector<pappso::pappso_double> &delta_list, pappso::PrecisionUnit unit, ValidationState state) const { std::set<const PeptideEvidence *> peptide_evidence_list; @@ -478,9 +475,7 @@ IdentificationGroup::getProteinFdr(ValidationState state) const void IdentificationGroup::getSameXicPeptideEvidenceList( std::vector<const PeptideEvidence *> &peptide_evidence_list, - const MsRun *p_msrun, - const PeptideXtp *p_peptide, - unsigned int charge) const + const MsRun *p_msrun, const PeptideXtp *p_peptide, unsigned int charge) const { if(!contains(p_msrun)) return; @@ -489,8 +484,8 @@ IdentificationGroup::getSameXicPeptideEvidenceList( if(p_msrun == p_identification_source->getMsRunSp().get()) { p_identification_source->getPeptideEvidenceStore() - .getSameXicPeptideEvidenceList( - peptide_evidence_list, p_msrun, p_peptide, charge); + .getSameXicPeptideEvidenceList(peptide_evidence_list, p_msrun, + p_peptide, charge); } } } diff --git a/src/core/identificationgroup.h b/src/core/identificationgroup.h index f723d8b7f901b4861a1f0626b5245fb3b2a0cf8f..398f85bc5ec38df3a1efb42526359fdf92811580 100644 --- a/src/core/identificationgroup.h +++ b/src/core/identificationgroup.h @@ -160,8 +160,7 @@ class IdentificationGroup * each peptide evidence is only counted once */ void collectMhDelta(std::vector<pappso::pappso_double> &delta_list, - pappso::PrecisionUnit unit, - ValidationState state) const; + pappso::PrecisionUnit unit, ValidationState state) const; /** @brief look for a peptide in the same XIC @@ -172,8 +171,7 @@ class IdentificationGroup */ void getSameXicPeptideEvidenceList( std::vector<const PeptideEvidence *> &peptide_evidence_list, - const MsRun *p_msrun, - const PeptideXtp *p_peptide, + const MsRun *p_msrun, const PeptideXtp *p_peptide, unsigned int charge) const; private: diff --git a/src/core/labeling/label.cpp b/src/core/labeling/label.cpp index 85b8963994897acd639f436aee47f2801da6e676..39743bc7c8b5c33d21ec33ab8dd6dbf4dd55b534 100644 --- a/src/core/labeling/label.cpp +++ b/src/core/labeling/label.cpp @@ -85,8 +85,7 @@ Label::containsAaModificationP( { for(LabelModification label_modification : _modification_list) { - if(std::find(modification_set.begin(), - modification_set.end(), + if(std::find(modification_set.begin(), modification_set.end(), label_modification.modification) != modification_set.end()) { return true; diff --git a/src/core/peptidextp.cpp b/src/core/peptidextp.cpp index 7330913b0883b79f2245ff4c6beed5bd328a3d1a..1d5db480d153b1ad9300b63a1a2d06d3607444ad 100644 --- a/src/core/peptidextp.cpp +++ b/src/core/peptidextp.cpp @@ -121,8 +121,8 @@ PeptideXtp::applyLabelingMethod(LabelingMethodSp labeling_method_sp) { std::list<pappso::AaModificationP> aa_modif_list = amino_acid.getModificationList(); - modification_set.insert( - modification_set.begin(), aa_modif_list.begin(), aa_modif_list.end()); + modification_set.insert(modification_set.begin(), aa_modif_list.begin(), + aa_modif_list.end()); } modification_set.unique(); diff --git a/src/core/project.cpp b/src/core/project.cpp index fb5ee702aa1b0901d5e33451f124a56b3811663c..effd7a3af2d0ea19870b51d08fbbfbc0ffee3cad 100644 --- a/src/core/project.cpp +++ b/src/core/project.cpp @@ -281,13 +281,11 @@ Project::hasPtmExperiment() const void Project::getSameXicPeptideEvidenceList( std::vector<const PeptideEvidence *> &peptide_evidence_list, - const MsRun *p_msrun, - const PeptideXtp *p_peptide, - unsigned int charge) const + const MsRun *p_msrun, const PeptideXtp *p_peptide, unsigned int charge) const { for(const IdentificationGroup *p_ident_group : _identification_goup_list) { - p_ident_group->getSameXicPeptideEvidenceList( - peptide_evidence_list, p_msrun, p_peptide, charge); + p_ident_group->getSameXicPeptideEvidenceList(peptide_evidence_list, + p_msrun, p_peptide, charge); } } diff --git a/src/core/project.h b/src/core/project.h index 6db5c633b6a566665d53018d2f0e2526dd1730b7..3fbbdd7ae6dadb78b96b14a3408423b6662f9515 100644 --- a/src/core/project.h +++ b/src/core/project.h @@ -98,8 +98,7 @@ class Project */ void getSameXicPeptideEvidenceList( std::vector<const PeptideEvidence *> &peptide_evidence_list, - const MsRun *p_msrun, - const PeptideXtp *p_peptide, + const MsRun *p_msrun, const PeptideXtp *p_peptide, unsigned int charge) const; private: diff --git a/src/core/proteinmatch.cpp b/src/core/proteinmatch.cpp index 700dedd321de85960ea1f91b585aa68343a54d89..42ff60b176f8c29fb1d0516b1a83251fcda0a7e7 100644 --- a/src/core/proteinmatch.cpp +++ b/src/core/proteinmatch.cpp @@ -282,8 +282,7 @@ ProteinMatch::getPeptideMatchList(ValidationState state, } unsigned int -ProteinMatch::countSampleScan(ValidationState state, - const MsRun *p_msrun_id, +ProteinMatch::countSampleScan(ValidationState state, const MsRun *p_msrun_id, const Label *p_label) const { std::vector<std::size_t> count_sample_scan; @@ -330,8 +329,7 @@ unsigned int ProteinMatch::countPeptideMatch(ValidationState state) const { return std::count_if( - _peptide_match_list.begin(), - _peptide_match_list.end(), + _peptide_match_list.begin(), _peptide_match_list.end(), [state](const PeptideMatch &peptide_match) { if(peptide_match.getPeptideEvidence()->getValidationState() >= state) { @@ -345,8 +343,7 @@ ProteinMatch::countPeptideMatch(ValidationState state) const } size_t -ProteinMatch::countSequenceLi(ValidationState state, - const MsRun *p_msrun_id, +ProteinMatch::countSequenceLi(ValidationState state, const MsRun *p_msrun_id, const Label *p_label) const { // qDebug() << __FILE__ << " " << __FUNCTION__ << " " << __LINE__; @@ -561,8 +558,7 @@ ProteinMatch::getLogEvalue(const MsRun *sp_msrun_id) const } pappso::pappso_double ProteinMatch::getNsaf(pappso::pappso_double proto_nsaf_sum, - const MsRun *p_msrun_id, - const Label *p_label) const + const MsRun *p_msrun_id, const Label *p_label) const { if(proto_nsaf_sum == 0) { @@ -585,8 +581,8 @@ ProteinMatch::getProtoNsaf(const MsRun *sp_msrun_id, const Label *p_label) const QObject::tr("protein has no amino acid sequence")); } pappso::pappso_double proto_nsaf = - (pappso::pappso_double)countSampleScan( - ValidationState::validAndChecked, sp_msrun_id, p_label) / + (pappso::pappso_double)countSampleScan(ValidationState::validAndChecked, + sp_msrun_id, p_label) / (pappso::pappso_double)_protein_sp.get()->size(); return proto_nsaf; } diff --git a/src/core/proteinxtp.cpp b/src/core/proteinxtp.cpp index c46f92ebba40063be3b1e8c4eb009cc35e6f4334..ce76f6abc8aa5a05c1c6ff95cef72b56745bf373 100644 --- a/src/core/proteinxtp.cpp +++ b/src/core/proteinxtp.cpp @@ -185,13 +185,9 @@ class DigestionHandler : public pappso::EnzymeProductInterface public: void setPeptide(std::int8_t sequence_database_id, - const pappso::ProteinSp &protein_sp, - bool is_decoy, - const QString &peptide, - unsigned int start, - bool is_nter, - unsigned int missed_cleavage_number, - bool semi_enzyme) override + const pappso::ProteinSp &protein_sp, bool is_decoy, + const QString &peptide, unsigned int start, bool is_nter, + unsigned int missed_cleavage_number, bool semi_enzyme) override { _peptide_list.append(peptide); }; diff --git a/src/core/tandem_run/tandembatchprocess.h b/src/core/tandem_run/tandembatchprocess.h index dbd7ca8f0cd7daeb408eda4879dae9c77ba5ae1b..0c1029745885e06a449f13565567f6beb1f04769 100644 --- a/src/core/tandem_run/tandembatchprocess.h +++ b/src/core/tandem_run/tandembatchprocess.h @@ -35,8 +35,7 @@ class TandemBatchProcess { public: - TandemBatchProcess(MainWindow *p_main_window, - WorkMonitorInterface *p_monitor, + TandemBatchProcess(MainWindow *p_main_window, WorkMonitorInterface *p_monitor, const TandemRunBatch &tandem_run_batch); virtual ~TandemBatchProcess(); diff --git a/src/core/tandem_run/tandemcondorprocess.cpp b/src/core/tandem_run/tandemcondorprocess.cpp index f05d317dbac15f1ed33f33824d314f5c05331c27..3b5639f99dd8751a3ed8d5cdeb8e595f86dadb9f 100644 --- a/src/core/tandem_run/tandemcondorprocess.cpp +++ b/src/core/tandem_run/tandemcondorprocess.cpp @@ -634,9 +634,8 @@ TandemCondorProcess::setCondorJobStatus(std::int8_t count_status[10]) { QString status_message = - QString( - "%1 unexpanded jobs\n%2 idle jobs\n%3 running jobs\n%4 removed " - "jobs\n%5 completed jobs\n%6 held jobs\n%7 submission errors") + QString("%1 unexpanded jobs\n%2 idle jobs\n%3 running jobs\n%4 removed " + "jobs\n%5 completed jobs\n%6 held jobs\n%7 submission errors") .arg(count_status[0]) .arg(count_status[1]) .arg(count_status[2]) diff --git a/src/grouping/groupinggroup.cpp b/src/grouping/groupinggroup.cpp index cfcf224ee59c3d41676855090b3e470296d71863..f86ef82f9760c374ed06e7641064a5e44f0a273a 100644 --- a/src/grouping/groupinggroup.cpp +++ b/src/grouping/groupinggroup.cpp @@ -275,8 +275,7 @@ unsigned int GroupingGroup::countProteinInSubgroup(unsigned int subgroup_number) const { return std::count_if( - _protein_match_list.begin(), - _protein_match_list.end(), + _protein_match_list.begin(), _protein_match_list.end(), [subgroup_number](const ProteinMatch *p_protein_match) { if(p_protein_match->getGrpProteinSp().get()->getSubGroupNumber() == subgroup_number) diff --git a/src/grouping/groupingpeptidemass.cpp b/src/grouping/groupingpeptidemass.cpp index d2d75064d66e2756be7f952cc6f0f39e2f4ed691..4e8e373f268855aa82cf2f3ef404773ba455e65c 100644 --- a/src/grouping/groupingpeptidemass.cpp +++ b/src/grouping/groupingpeptidemass.cpp @@ -113,8 +113,7 @@ GroupingPeptideMass::setGrpPeptide(pappso::GrpProteinSp proteinSp, { return _p_grp_experiment->setGrpPeptide( - proteinSp, - p_peptide_evidence->getPeptideXtpSp().get()->getSequence(), + proteinSp, p_peptide_evidence->getPeptideXtpSp().get()->getSequence(), p_peptide_evidence->getPeptideXtpSp().get()->getGroupingMass()); } diff --git a/src/grouping/ptm/ptmgroupingexperiment.cpp b/src/grouping/ptm/ptmgroupingexperiment.cpp index dc25f640cb9feda6321d4284696fdee553de2c2b..903b26226f25877255e61e8dca6a0689fc306817 100644 --- a/src/grouping/ptm/ptmgroupingexperiment.cpp +++ b/src/grouping/ptm/ptmgroupingexperiment.cpp @@ -99,8 +99,7 @@ PtmGroupingExperiment::getPtmIslandList() const void PtmGroupingExperiment::numbering() { - std::sort(_ptm_island_group_list.begin(), - _ptm_island_group_list.end(), + std::sort(_ptm_island_group_list.begin(), _ptm_island_group_list.end(), [](const PtmIslandGroupSp a, const PtmIslandGroupSp b) { return *(a.get()) < *(b.get()); }); @@ -193,8 +192,7 @@ PtmGroupingExperiment::mergePeptideMatchPtmIslandList( for(PtmIslandSp ptm_island_sp : ptm_island_list) { // http://en.cppreference.com/w/cpp/algorithm/all_any_none_of - if(std::none_of(new_ptm_island_list.begin(), - new_ptm_island_list.end(), + if(std::none_of(new_ptm_island_list.begin(), new_ptm_island_list.end(), [ptm_island_sp](PtmIslandSp element) { return element.get()->merge(ptm_island_sp); })) diff --git a/src/grouping/ptm/ptmisland.cpp b/src/grouping/ptm/ptmisland.cpp index 17cc60d32efac94a1ef1b27d41b9af1a2ab2ca92..98c15f4a205e5caceccdb4c6a74da173cfb071b3 100644 --- a/src/grouping/ptm/ptmisland.cpp +++ b/src/grouping/ptm/ptmisland.cpp @@ -152,8 +152,7 @@ bool PtmIsland::containsPeptideMatch(const PeptideMatch &peptide_match) const { - return std::any_of(_peptide_match_list.begin(), - _peptide_match_list.end(), + return std::any_of(_peptide_match_list.begin(), _peptide_match_list.end(), [peptide_match](const PeptideMatch &element) { return (peptide_match == element); }); @@ -200,8 +199,7 @@ PtmIsland::getProteinStartPosition() const bool PtmIsland::merge(PtmIslandSp ptm_island_sp) { - if(std::none_of(_peptide_match_list.begin(), - _peptide_match_list.end(), + if(std::none_of(_peptide_match_list.begin(), _peptide_match_list.end(), [ptm_island_sp](const PeptideMatch &element) { return ptm_island_sp.get()->containsPeptideMatch(element); })) @@ -215,8 +213,7 @@ PtmIsland::merge(PtmIslandSp ptm_island_sp) _peptide_match_list.begin(), ptm_island_sp.get()->_peptide_match_list.begin(), ptm_island_sp.get()->_peptide_match_list.end()); - std::sort(_peptide_match_list.begin(), - _peptide_match_list.end(), + std::sort(_peptide_match_list.begin(), _peptide_match_list.end(), [](const PeptideMatch &a, const PeptideMatch &b) { return (a.operator<(b)); }); @@ -234,16 +231,14 @@ PtmIsland::merge(PtmIslandSp ptm_island_sp) std::vector<PeptideMatch>::const_iterator it_result = - std::max_element(_peptide_match_list.begin(), - _peptide_match_list.end(), + std::max_element(_peptide_match_list.begin(), _peptide_match_list.end(), [](const PeptideMatch &a, const PeptideMatch &b) { return (a.getStop() < b.getStop()); }); _protein_stop = it_result->getStop(); it_result = - std::min_element(_peptide_match_list.begin(), - _peptide_match_list.end(), + std::min_element(_peptide_match_list.begin(), _peptide_match_list.end(), [](const PeptideMatch &a, const PeptideMatch &b) { return a.getStart() < b.getStart(); }); diff --git a/src/grouping/ptm/ptmislandgroup.cpp b/src/grouping/ptm/ptmislandgroup.cpp index ca793c67f86b0039aeb8590bfe9a9ba161ba60cf..0f3a2b3843cc90cc434e0dba4634b5a567ba7e09 100644 --- a/src/grouping/ptm/ptmislandgroup.cpp +++ b/src/grouping/ptm/ptmislandgroup.cpp @@ -80,8 +80,7 @@ PtmIslandGroup::setGroupNumber(unsigned int number) { ptm_island_subgroup.get()->setPtmIslandGroup(this); } - std::sort(_ptm_island_subgroup_list.begin(), - _ptm_island_subgroup_list.end(), + std::sort(_ptm_island_subgroup_list.begin(), _ptm_island_subgroup_list.end(), [](const PtmIslandSubgroupSp &a, const PtmIslandSubgroupSp &b) { return (a.get()->getFirstPtmIsland()->getProteinStartPosition() < b.get()->getFirstPtmIsland()->getProteinStartPosition()); @@ -117,8 +116,7 @@ unsigned int PtmIslandGroup::maxCountSampleScan() const { std::vector<PtmIslandSubgroupSp>::const_iterator it_result = std::max_element( - _ptm_island_subgroup_list.begin(), - _ptm_island_subgroup_list.end(), + _ptm_island_subgroup_list.begin(), _ptm_island_subgroup_list.end(), [](const PtmIslandSubgroupSp &a, const PtmIslandSubgroupSp &b) { return (a.get()->countSampleScan() < b.get()->countSampleScan()); }); diff --git a/src/grouping/ptm/ptmislandsubgroup.cpp b/src/grouping/ptm/ptmislandsubgroup.cpp index 7a5c334e4be5dd377bf2eb7d13bce429056f434a..d43c016a88b6ab81de3aa763192dfd0517f50d6f 100644 --- a/src/grouping/ptm/ptmislandsubgroup.cpp +++ b/src/grouping/ptm/ptmislandsubgroup.cpp @@ -73,8 +73,7 @@ PtmIslandSubgroup::setSubgroupNumber(unsigned int number) ptm_island.get()->setPtmIslandSubgroup(this); } std::sort( - _ptm_island_list.begin(), - _ptm_island_list.end(), + _ptm_island_list.begin(), _ptm_island_list.end(), [](const PtmIslandSp &a, const PtmIslandSp &b) { return ( a.get()->getProteinMatch()->getProteinXtpSp().get()->getAccession() < @@ -93,8 +92,7 @@ PtmIslandSubgroup::setPtmIslandGroup(PtmIslandGroup *p_ptm_island_group) { _ptm_island_group_p = p_ptm_island_group; std::sort( - _ptm_island_list.begin(), - _ptm_island_list.end(), + _ptm_island_list.begin(), _ptm_island_list.end(), [](const PtmIslandSp &a, const PtmIslandSp &b) { return ( a.get()->getProteinMatch()->getProteinXtpSp().get()->getAccession() < diff --git a/src/grouping/ptm/ptmsamplescan.cpp b/src/grouping/ptm/ptmsamplescan.cpp index 3837399f20a4b9d18ae10a00ac93fb26d4850d1b..623eb6d9d4560d27fa637695c9394ef8f0afef56 100644 --- a/src/grouping/ptm/ptmsamplescan.cpp +++ b/src/grouping/ptm/ptmsamplescan.cpp @@ -95,8 +95,7 @@ PtmSampleScan::add(const PeptideMatch &peptide_match) // qDebug() << __FILE__ << " " << __FUNCTION__<< " " << __LINE__ ; // sort list - std::sort(_peptide_match_list.begin(), - _peptide_match_list.end(), + std::sort(_peptide_match_list.begin(), _peptide_match_list.end(), [](const PeptideMatch &first, const PeptideMatch &second) { return (first.getPeptideEvidence()->getEvalue() < second.getPeptideEvidence()->getEvalue()); diff --git a/src/gui/about_dialog/aboutdialog.h b/src/gui/about_dialog/aboutdialog.h index 260a0435210534fadee1a3c392c51097502d4e8f..fe2b90f2b675fff928daa1702965bd0c42070983 100644 --- a/src/gui/about_dialog/aboutdialog.h +++ b/src/gui/about_dialog/aboutdialog.h @@ -30,7 +30,7 @@ namespace Ui { -class AboutDialog; + class AboutDialog; } class AboutDialog : public QDialog diff --git a/src/gui/choose_modification_dialog/choosemodificationdialog.cpp b/src/gui/choose_modification_dialog/choosemodificationdialog.cpp index 1a9fd625658a77ae0815b30e09b009d82cca5551..e1d4d90a849d19cb5039226081ce5dc28849a556 100644 --- a/src/gui/choose_modification_dialog/choosemodificationdialog.cpp +++ b/src/gui/choose_modification_dialog/choosemodificationdialog.cpp @@ -48,25 +48,17 @@ ChooseModificationDialog::ChooseModificationDialog(QWidget *parent) #if QT_VERSION >= 0x050000 // Qt5 code - connect(ui->modification_listview, - &QListView::clicked, - this, + connect(ui->modification_listview, &QListView::clicked, this, &ChooseModificationDialog::ItemClicked); - connect(ui->modification_listview, - &QListView::doubleClicked, - this, + connect(ui->modification_listview, &QListView::doubleClicked, this, &ChooseModificationDialog::ItemDoubleClicked); #else // Qt4 code - connect(ui->modification_listview, - SIGNAL(clicked(const QModelIndex)), - this, + connect(ui->modification_listview, SIGNAL(clicked(const QModelIndex)), this, SLOT(ItemClicked(QModelIndex))); - connect(ui->modification_listview, - SIGNAL(doubleClicked(const QModelIndex)), - this, - SLOT(ItemDoubleClicked(QModelIndex))); + connect(ui->modification_listview, SIGNAL(doubleClicked(const QModelIndex)), + this, SLOT(ItemDoubleClicked(QModelIndex))); #endif } diff --git a/src/gui/choose_modification_dialog/choosemodificationdialog.h b/src/gui/choose_modification_dialog/choosemodificationdialog.h index c641196ff83e978e3505103e76dd3d348cee0270..2b5e42b25bdc0ebc58793b5687d833be06717148 100644 --- a/src/gui/choose_modification_dialog/choosemodificationdialog.h +++ b/src/gui/choose_modification_dialog/choosemodificationdialog.h @@ -33,7 +33,7 @@ namespace Ui { -class ChooseModificationDialog; + class ChooseModificationDialog; } class ChooseModificationDialog : public QDialog diff --git a/src/gui/edit_label_methods/editlabelmethods.cpp b/src/gui/edit_label_methods/editlabelmethods.cpp index b965d07c958cf477553ce14705111c690cda80a8..738841833d8f7b7c7494483a8d518feb7d11eaed 100644 --- a/src/gui/edit_label_methods/editlabelmethods.cpp +++ b/src/gui/edit_label_methods/editlabelmethods.cpp @@ -40,15 +40,11 @@ EditLabelMethods::EditLabelMethods(ProjectWindow *parent) #if QT_VERSION >= 0x050000 // Qt5 code - connect(ui->method_list_view, - &QListView::clicked, - this, + connect(ui->method_list_view, &QListView::clicked, this, &EditLabelMethods::ItemClicked); #else - connect(ui->method_list_view, - SIGNAL(clicked(const QModelIndex)), - this, + connect(ui->method_list_view, SIGNAL(clicked(const QModelIndex)), this, SLOT(ItemClicked(QModelIndex))); @@ -74,15 +70,15 @@ EditLabelMethods::setProjectSp(ProjectSp project_sp) if(!xml_doc.open(QIODevice::ReadOnly)) { // error - QMessageBox::warning( - this, tr("error"), tr("error opening catalog_label resource file")); + QMessageBox::warning(this, tr("error"), + tr("error opening catalog_label resource file")); return; } if(!dom->setContent(&xml_doc)) { xml_doc.close(); - QMessageBox::warning( - this, tr("error"), tr("error setting catalog_label xml content")); + QMessageBox::warning(this, tr("error"), + tr("error setting catalog_label xml content")); return; } diff --git a/src/gui/edit_label_methods/editlabelmethods.h b/src/gui/edit_label_methods/editlabelmethods.h index 4bfb8a5f05ec7af1c0e62e1b8ef551175b5057e9..5b05b7b325c514f396a79c1603452bc418be570d 100644 --- a/src/gui/edit_label_methods/editlabelmethods.h +++ b/src/gui/edit_label_methods/editlabelmethods.h @@ -35,7 +35,7 @@ class ProjectWindow; namespace Ui { -class EditLabelMethodView; + class EditLabelMethodView; } class EditLabelMethods : public QDialog diff --git a/src/gui/edit_modifications/editmodifications.cpp b/src/gui/edit_modifications/editmodifications.cpp index f5064ff99670bfe2f0e5049faa5bd68787ec25fd..a71a751f48c6d3b83fecaf78d1c2555cd7cdd0cc 100644 --- a/src/gui/edit_modifications/editmodifications.cpp +++ b/src/gui/edit_modifications/editmodifications.cpp @@ -42,33 +42,21 @@ EditModifications::EditModifications(ProjectWindow *parent) #if QT_VERSION >= 0x050000 // Qt5 code - connect(ui->modification_list_view, - &QListView::clicked, - this, + connect(ui->modification_list_view, &QListView::clicked, this, &EditModifications::ItemClicked); - connect(ui->modification_list_view, - &QListView::doubleClicked, - this, + connect(ui->modification_list_view, &QListView::doubleClicked, this, &EditModifications::ItemDoubleClicked); - connect(_p_browse_modification_dialog, - &ChooseModificationDialog::accepted, - this, - &EditModifications::doAcceptedBrowseDialog); + connect(_p_browse_modification_dialog, &ChooseModificationDialog::accepted, + this, &EditModifications::doAcceptedBrowseDialog); #else - connect(ui->modification_list_view, - SIGNAL(clicked(const QModelIndex)), - this, + connect(ui->modification_list_view, SIGNAL(clicked(const QModelIndex)), this, SLOT(ItemClicked(QModelIndex))); - connect(ui->modification_list_view, - SIGNAL(doubleClicked(const QModelIndex)), - this, - SLOT(ItemDoubleClicked(QModelIndex))); - - connect(_p_browse_modification_dialog, - SIGNAL(accepted()), - this, + connect(ui->modification_list_view, SIGNAL(doubleClicked(const QModelIndex)), + this, SLOT(ItemDoubleClicked(QModelIndex))); + + connect(_p_browse_modification_dialog, SIGNAL(accepted()), this, SLOT(doAcceptedBrowseDialog())); #endif diff --git a/src/gui/edit_modifications/editmodifications.h b/src/gui/edit_modifications/editmodifications.h index 3758ea3f244aec5bdcf3cc2fcfa4030c27d58213..36f0b1416084fd06e2dccb8ff6e9f6bf422ae184 100644 --- a/src/gui/edit_modifications/editmodifications.h +++ b/src/gui/edit_modifications/editmodifications.h @@ -36,7 +36,7 @@ class ProjectWindow; // http://doc.qt.io/qt-4.8/qt-itemviews-chart-mainwindow-cpp.html namespace Ui { -class EditModificationView; + class EditModificationView; } class EditModifications : public QMainWindow diff --git a/src/gui/edit_tandem_preset_dialog/edittandempresetdialog.cpp b/src/gui/edit_tandem_preset_dialog/edittandempresetdialog.cpp index 2ef02ef4168830d12459528e940d578686eceeaa..598e3a75e03ff1c4e45a102b80b2e05921915988 100644 --- a/src/gui/edit_tandem_preset_dialog/edittandempresetdialog.cpp +++ b/src/gui/edit_tandem_preset_dialog/edittandempresetdialog.cpp @@ -140,8 +140,7 @@ EditTandemPresetDialog::doSelectDir() catch(pappso::PappsoException &error) { QMessageBox::warning( - this, - tr("Error :"), + this, tr("Error :"), tr("Error choosing preset directory : %1").arg(error.qwhat())); } } @@ -188,8 +187,7 @@ EditTandemPresetDialog::doLoad() else { QMessageBox::warning( - this, - tr("Error :"), + this, tr("Error :"), tr("%1 is not an X!Tandem parameter file") .arg(p_tandem_preset_file->getAbsoluteFilePath())); } @@ -1292,8 +1290,7 @@ EditTandemPresetDialog::done(int r) if(!_p_tandem_preset_file->exists()) { QMessageBox::warning( - this, - tr("Save parameters"), + this, tr("Save parameters"), tr("Parameters file does not exists.\nPlease save it before " "pressing ok or cancel edition")); return; @@ -1308,8 +1305,7 @@ EditTandemPresetDialog::done(int r) else { QMessageBox::warning( - this, - tr("Save parameters"), + this, tr("Save parameters"), tr("Parameters modified but not saved.\nPlease save it before " "pressing ok or cancel edition")); return; diff --git a/src/gui/edit_tandem_preset_dialog/edittandempresetdialog.h b/src/gui/edit_tandem_preset_dialog/edittandempresetdialog.h index 871142793c070ea30e867e5fafd12d33e1710d0e..fffcef16775658a557d0f997f20e5605de315601 100644 --- a/src/gui/edit_tandem_preset_dialog/edittandempresetdialog.h +++ b/src/gui/edit_tandem_preset_dialog/edittandempresetdialog.h @@ -36,7 +36,7 @@ namespace Ui { -class EditTandemPresetView; + class EditTandemPresetView; } class EditTandemPresetDialog : public QDialog diff --git a/src/gui/export/export_masschroq_dialog/exportmasschroqdialog.h b/src/gui/export/export_masschroq_dialog/exportmasschroqdialog.h index d79c0fe93db59e37ced2cfdf9d29ca570c2f2db1..fe8c70493c8eb672cc70adfe32057573c35c2ca2 100644 --- a/src/gui/export/export_masschroq_dialog/exportmasschroqdialog.h +++ b/src/gui/export/export_masschroq_dialog/exportmasschroqdialog.h @@ -36,7 +36,7 @@ namespace Ui { -class ExportMasschroqDialog; + class ExportMasschroqDialog; } class ExportMasschroqDialog : public QDialog diff --git a/src/gui/export/export_spreadsheet_dialog/exportspreadsheetdialog.h b/src/gui/export/export_spreadsheet_dialog/exportspreadsheetdialog.h index d13ee34e2dbda892c624a806bc461d54232404a0..a7302007a2a71c5b6e7912b32ce45df2ae10ebda 100644 --- a/src/gui/export/export_spreadsheet_dialog/exportspreadsheetdialog.h +++ b/src/gui/export/export_spreadsheet_dialog/exportspreadsheetdialog.h @@ -39,7 +39,7 @@ namespace Ui { -class ExportSpreadsheetDialog; + class ExportSpreadsheetDialog; } class ExportSpreadsheetDialog : public QDialog diff --git a/src/gui/load_results_dialog/loadresultsdialog.cpp b/src/gui/load_results_dialog/loadresultsdialog.cpp index 8e9d1f8fe5aa9b045bcf5241472db9b07de3d358..058e0d4429690c33caec2c8c50b9098ce565136a 100644 --- a/src/gui/load_results_dialog/loadresultsdialog.cpp +++ b/src/gui/load_results_dialog/loadresultsdialog.cpp @@ -104,9 +104,7 @@ LoadResultsDialog::chooseFiles() settings.value("path/identificationfiles", "").toString(); QStringList filenames = QFileDialog::getOpenFileNames( - this, - tr("identification files"), - default_location, + this, tr("identification files"), default_location, tr( "X!Tandem, Mascot DAT, pepXML or mzIdentML files (*.xml *.mzid *.dat " "*.pepxml *.pepXML);;all files (*)")); diff --git a/src/gui/load_results_dialog/loadresultsdialog.h b/src/gui/load_results_dialog/loadresultsdialog.h index 6ba44e428100e6f2623bc8daef725dda77b79e40..613e058c2f3d273e1a51cb210692da82f4b2660e 100644 --- a/src/gui/load_results_dialog/loadresultsdialog.h +++ b/src/gui/load_results_dialog/loadresultsdialog.h @@ -33,7 +33,7 @@ namespace Ui { -class LoadResultsDialog; + class LoadResultsDialog; } diff --git a/src/gui/mainwindow.cpp b/src/gui/mainwindow.cpp index e05fd6a2ae2a8a3f3acd46b58629c45ed226524b..adef989239291b214d67ec9c63cc3f4b05285b08 100644 --- a/src/gui/mainwindow.cpp +++ b/src/gui/mainwindow.cpp @@ -73,36 +73,22 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::Main) #if QT_VERSION >= 0x050000 // Qt5 code - connect(_p_tandem_run_dialog, - &TandemRunDialog::accepted, - this, + connect(_p_tandem_run_dialog, &TandemRunDialog::accepted, this, &MainWindow::doAcceptedTandemRunDialog); - connect(_p_load_results_dialog, - &LoadResultsDialog::accepted, - this, + connect(_p_load_results_dialog, &LoadResultsDialog::accepted, this, &MainWindow::doAcceptedLoadResultDialog); - connect(_p_export_spreadsheet_dialog, - &ExportSpreadsheetDialog::accepted, - this, - &MainWindow::doAcceptedExportSpreadsheetDialog); - connect(&m_onlineVersion, - &HttpVersion::httpVersionReady, - this, + connect(_p_export_spreadsheet_dialog, &ExportSpreadsheetDialog::accepted, + this, &MainWindow::doAcceptedExportSpreadsheetDialog); + connect(&m_onlineVersion, &HttpVersion::httpVersionReady, this, &MainWindow::doCheckNewVersion); #else // Qt4 code - connect(_p_tandem_run_dialog, - SIGNAL(accepted()), - this, + connect(_p_tandem_run_dialog, SIGNAL(accepted()), this, SLOT(doAcceptedTandemRunDialog())); - connect(_p_load_results_dialog, - SIGNAL(accepted()), - this, + connect(_p_load_results_dialog, SIGNAL(accepted()), this, SLOT(doAcceptedLoadResultDialog())); - connect(_p_export_spreadsheet_dialog, - SIGNAL(accepted()), - this, + connect(_p_export_spreadsheet_dialog, SIGNAL(accepted()), this, SLOT(doAcceptedExportSpreadsheetDialog())); #endif @@ -210,8 +196,7 @@ MainWindow::doAcceptedExportSpreadsheetDialog() if(format == "ods") { filename = QFileDialog::getSaveFileName( - this, - tr("Save ODS file"), + this, tr("Save ODS file"), QString("%1/untitled.ods").arg(default_location), tr("Open Document Spreadsheet (*.ods)")); @@ -392,11 +377,9 @@ MainWindow::selectXpipFile() QSettings settings; QString default_location = settings.value("path/xpipfile", "").toString(); - QString filename = - QFileDialog::getOpenFileName(this, - tr("Open XPIP File"), - default_location, - tr("xpip files (*.xpip);;all files (*)")); + QString filename = QFileDialog::getOpenFileName( + this, tr("Open XPIP File"), default_location, + tr("xpip files (*.xpip);;all files (*)")); if(filename.isEmpty()) { @@ -428,10 +411,8 @@ MainWindow::doActionSaveProject() QString filename = QFileDialog::getSaveFileName( - this, - tr("Save XPIP file"), - QString("%1/untitled.xpip").arg(default_location), - tr("XPIP (*.xpip)")); + this, tr("Save XPIP file"), + QString("%1/untitled.xpip").arg(default_location), tr("XPIP (*.xpip)")); if(filename.isEmpty()) { @@ -479,10 +460,8 @@ MainWindow::doActionSpectralCountingMcq() QString default_location = settings.value("path/scmcqfile", "").toString(); QString filename = QFileDialog::getSaveFileName( - this, - tr("Save spectral count TSV file"), - QString("%1/untitled.tsv").arg(default_location), - tr("TSV (*.tsv)")); + this, tr("Save spectral count TSV file"), + QString("%1/untitled.tsv").arg(default_location), tr("TSV (*.tsv)")); if(filename.isEmpty()) { @@ -504,10 +483,8 @@ MainWindow::doActionFasta() QString default_location = settings.value("path/fastafile", "").toString(); QString filename = QFileDialog::getSaveFileName( - this, - tr("Save FASTA file"), - QString("%1/untitled.fasta").arg(default_location), - tr("FASTA (*.fasta)")); + this, tr("Save FASTA file"), + QString("%1/untitled.fasta").arg(default_location), tr("FASTA (*.fasta)")); if(filename.isEmpty()) { @@ -529,10 +506,8 @@ MainWindow::doActionFastaOneBySubgroup() QString default_location = settings.value("path/fastafile", "").toString(); QString filename = QFileDialog::getSaveFileName( - this, - tr("Save FASTA file"), - QString("%1/untitled.fasta").arg(default_location), - tr("FASTA (*.fasta)")); + this, tr("Save FASTA file"), + QString("%1/untitled.fasta").arg(default_location), tr("FASTA (*.fasta)")); if(filename.isEmpty()) { @@ -543,8 +518,8 @@ MainWindow::doActionFastaOneBySubgroup() showWaitingMessage( tr("Writing %1 FASTA file").arg(QFileInfo(filename).fileName())); - emit operateWritingFastaFile( - filename, _project_sp, ExportFastaType::oneBySubgroup); + emit operateWritingFastaFile(filename, _project_sp, + ExportFastaType::oneBySubgroup); } void @@ -554,10 +529,8 @@ MainWindow::doActionFastaOneByGroup() QString default_location = settings.value("path/fastafile", "").toString(); QString filename = QFileDialog::getSaveFileName( - this, - tr("Save FASTA file"), - QString("%1/untitled.fasta").arg(default_location), - tr("FASTA (*.fasta)")); + this, tr("Save FASTA file"), + QString("%1/untitled.fasta").arg(default_location), tr("FASTA (*.fasta)")); if(filename.isEmpty()) { @@ -568,8 +541,8 @@ MainWindow::doActionFastaOneByGroup() showWaitingMessage( tr("Writing %1 FASTA file").arg(QFileInfo(filename).fileName())); - emit operateWritingFastaFile( - filename, _project_sp, ExportFastaType::oneByGroup); + emit operateWritingFastaFile(filename, _project_sp, + ExportFastaType::oneByGroup); } void @@ -583,10 +556,8 @@ MainWindow::doActionMassChroQ() if(_p_export_masschroq_dialog == nullptr) { _p_export_masschroq_dialog = new ExportMasschroqDialog(this); - connect(_p_export_masschroq_dialog, - &ExportMasschroqDialog::accepted, - this, - &MainWindow::doAcceptedExportMasschroqDialog); + connect(_p_export_masschroq_dialog, &ExportMasschroqDialog::accepted, + this, &MainWindow::doAcceptedExportMasschroqDialog); } MasschroqFileParameters params; @@ -622,8 +593,7 @@ MainWindow::doAcceptedExportMasschroqDialog() QString default_location = settings.value("path/mcqfile", "").toString(); QString filename = QFileDialog::getSaveFileName( - this, - tr("Save MassChroqML file"), + this, tr("Save MassChroqML file"), QString("%1/untitled.masschroqml").arg(default_location), tr("MassChroqML (*.masschroqml)")); @@ -660,8 +630,7 @@ MainWindow::doActionMassChroqPRM() settings.value("path/mcqprmfile", "").toString(); QString filename = QFileDialog::getSaveFileName( - this, - tr("Save MassChroqPRM file"), + this, tr("Save MassChroqPRM file"), QString("%1/untitled.masschroqprm").arg(default_location), tr("MassChroqPRM (*.masschroqprm)")); @@ -698,8 +667,7 @@ MainWindow::doActionProticDb() settings.value("path/proticfile", "").toString(); QString filename = QFileDialog::getSaveFileName( - this, - tr("Save PROTICdbML file"), + this, tr("Save PROTICdbML file"), QString("%1/untitled.proticdbml").arg(default_location), tr("PROTICdbML (*.proticdbml)")); @@ -747,8 +715,7 @@ MainWindow::doCheckNewVersion() hideWaitingMessage(); int ret = QMessageBox::warning( - this, - tr("new version available"), + this, tr("new version available"), tr("A new %1 version is available %2\nCheck our web site \n" "http://pappso.inra.fr/bioinfo/xtandempipeline\n to download it") .arg(SOFTWARE_NAME) diff --git a/src/gui/mainwindow.h b/src/gui/mainwindow.h index e55123a45d07d047243f5f2b81dc05af784399a7..1371ab2f9ca4ccc76bf14c490104a3bd1b7315f8 100644 --- a/src/gui/mainwindow.h +++ b/src/gui/mainwindow.h @@ -46,7 +46,7 @@ namespace Ui { -class Main; + class Main; } class MainWindow : public QMainWindow @@ -106,17 +106,15 @@ class MainWindow : public QMainWindow AutomaticFilterParameters param, QStringList file_list); void operateWritingXpipFile(QString filename, ProjectSp project_sp); - void - operateWritingOdsFile(QString filename, QString format, ProjectSp project_sp); - void operateWritingMassChroqFile(QString filename, - ProjectSp project_sp, + void operateWritingOdsFile(QString filename, QString format, + ProjectSp project_sp); + void operateWritingMassChroqFile(QString filename, ProjectSp project_sp, MasschroqFileParameters params); void operateWritingMassChroqPrmFile(QString filename, ProjectSp project_sp); void operateWritingProticFile(QString filename, ProjectSp project_sp); void operateWritingMcqrSpectralCountFile(QString filename, ProjectSp project_sp); - void operateWritingFastaFile(QString filename, - ProjectSp project_sp, + void operateWritingFastaFile(QString filename, ProjectSp project_sp, ExportFastaType type); void operateGrouping(ProjectSp project_sp); void operateRunningXtandem(TandemRunBatch tandem_run_batch); diff --git a/src/gui/peptide_detail_view/peptidewindow.cpp b/src/gui/peptide_detail_view/peptidewindow.cpp index 4172be076aa686267835ed0f82e90ef26596eee3..e39f2d675b84a8157294005b158a9d190c41049c 100644 --- a/src/gui/peptide_detail_view/peptidewindow.cpp +++ b/src/gui/peptide_detail_view/peptidewindow.cpp @@ -113,18 +113,12 @@ PeptideWindow::PeptideWindow(ProjectWindow *parent) #if QT_VERSION >= 0x050000 // Qt5 code - connect(_p_project_window, - &ProjectWindow::identificationGroupGrouped, - this, + connect(_p_project_window, &ProjectWindow::identificationGroupGrouped, this, &PeptideWindow::doIdentificationGroupGrouped); - connect(this, - &PeptideWindow::loadSpectrumSp, - worker, + connect(this, &PeptideWindow::loadSpectrumSp, worker, &SpectrumSpLoaderThread::doLoadSpectrumSp); - connect(worker, - &SpectrumSpLoaderThread::spectrumSpReady, - this, + connect(worker, &SpectrumSpLoaderThread::spectrumSpReady, this, &PeptideWindow::doSpectrumSpReady); /* @@ -146,20 +140,15 @@ PeptideWindow::PeptideWindow(ProjectWindow *parent) #else // Qt4 code connect(_p_project_window, - SIGNAL(identificationGroupGrouped(IdentificationGroup *)), - this, + SIGNAL(identificationGroupGrouped(IdentificationGroup *)), this, SLOT(doIdentificationGroupGrouped(IdentificationGroup *))); - connect(this, - SIGNAL(loadSpectrumSp(PeptideMatch *)), - worker, + connect(this, SIGNAL(loadSpectrumSp(PeptideMatch *)), worker, SLOT(doLoadSpectrumSp(PeptideMatch *))); - connect(worker, - SIGNAL(spectrumSpReady(pappso::SpectrumSp, QString, QString)), - this, - SLOT(doSpectrumSpReady(pappso::SpectrumSp, QString, QString))); - connect( - _p_spectrum_overlay, SIGNAL(mzChanged(double)), this, SLOT(setMz(double))); + connect(worker, SIGNAL(spectrumSpReady(pappso::SpectrumSp, QString, QString)), + this, SLOT(doSpectrumSpReady(pappso::SpectrumSp, QString, QString))); + connect(_p_spectrum_overlay, SIGNAL(mzChanged(double)), this, + SLOT(setMz(double))); // connect(_protein_table_model_p, SIGNAL(layoutChanged()), this, // SLOT(updateStatusBar())); #endif @@ -257,8 +246,7 @@ PeptideWindow::updateDisplay() ui->mz_label->setText( QString::number(_p_peptide_evidence->getPeptideXtpSp().get()->getMz( _p_peptide_evidence->getCharge()), - 'f', - 4)); + 'f', 4)); ui->expmz_label->setText( QString::number(_p_peptide_evidence->getExperimentalMz(), 'f', 4)); ui->delta_label->setText( @@ -270,14 +258,13 @@ PeptideWindow::updateDisplay() } catch(pappso::PappsoException exception_pappso) { - QMessageBox::warning(this, - tr("Unable to display peptide details :"), + QMessageBox::warning(this, tr("Unable to display peptide details :"), exception_pappso.qwhat()); } catch(std::exception exception_std) { - QMessageBox::warning( - this, tr("Unable to display peptide details :"), exception_std.what()); + QMessageBox::warning(this, tr("Unable to display peptide details :"), + exception_std.what()); } } @@ -288,11 +275,9 @@ PeptideWindow::chooseDefaultMzDataDir() QSettings settings; QString default_location = settings.value("path/mzdatadir", "").toString(); - QString filename = - QFileDialog::getExistingDirectory(this, - tr("Choose default mz data directory"), - default_location, - QFileDialog::ShowDirsOnly); + QString filename = QFileDialog::getExistingDirectory( + this, tr("Choose default mz data directory"), default_location, + QFileDialog::ShowDirsOnly); if(filename.isEmpty()) { @@ -339,8 +324,7 @@ PeptideWindow::openInXicViewer() void PeptideWindow::doSpectrumSpReady(pappso::MassSpectrumCstSPtr spectrum_sp, - QString error, - QString fatal_error) + QString error, QString fatal_error) { qDebug() << "PeptideWindow::doSpectrumSpReady begin error=" << error << " fatal_error=" << fatal_error; @@ -379,8 +363,7 @@ PeptideWindow::doSpectrumSpReady(pappso::MassSpectrumCstSPtr spectrum_sp, // fatal_error QMessageBox::warning( - this, - tr("Oops! an error occurred in XTPCPP. Dont Panic :"), + this, tr("Oops! an error occurred in XTPCPP. Dont Panic :"), fatal_error); ui->statusbar->showMessage(tr("ERROR reading spectrum")); QSettings settings; @@ -469,11 +452,9 @@ PeptideWindow::doSaveSvg() .arg(_p_peptide_evidence->getScan()); } - QString filename = - QFileDialog::getSaveFileName(this, - tr("Save SVG file"), - proposed_filename, - tr("Scalable Vector Graphic (*.svg)")); + QString filename = QFileDialog::getSaveFileName( + this, tr("Save SVG file"), proposed_filename, + tr("Scalable Vector Graphic (*.svg)")); if(filename.isEmpty()) { @@ -484,10 +465,8 @@ PeptideWindow::doSaveSvg() ui->spectrum_widget->toSvgFile( - filename, - tr("%1 SVG spectrum generator").arg(SOFTWARE_NAME), - tr("This is an annotated SVG spectrum"), - QSize(1200, 500)); + filename, tr("%1 SVG spectrum generator").arg(SOFTWARE_NAME), + tr("This is an annotated SVG spectrum"), QSize(1200, 500)); // emit operateXpipFile(filename); } catch(pappso::PappsoException &error) diff --git a/src/gui/peptide_detail_view/peptidewindow.h b/src/gui/peptide_detail_view/peptidewindow.h index f5629040a752435ef419ba97fe748be01299cb90..dd02efa5ee7769acbf66a80c42574e5845c29103 100644 --- a/src/gui/peptide_detail_view/peptidewindow.h +++ b/src/gui/peptide_detail_view/peptidewindow.h @@ -37,7 +37,7 @@ class ProjectWindow; namespace Ui { -class PeptideDetailView; + class PeptideDetailView; } @@ -49,8 +49,7 @@ class SpectrumSpLoaderThread : public QObject void doLoadSpectrumSp(PeptideEvidence *p_peptide_evidence); signals: - void spectrumSpReady(pappso::MassSpectrumCstSPtr spectrum_sp, - QString error, + void spectrumSpReady(pappso::MassSpectrumCstSPtr spectrum_sp, QString error, QString fatal_error); protected: @@ -78,8 +77,7 @@ class PeptideWindow : public QMainWindow void loadSpectrumSp(PeptideEvidence *p_peptide_evidence); protected slots: - void doSpectrumSpReady(pappso::MassSpectrumCstSPtr spectrum_sp, - QString error, + void doSpectrumSpReady(pappso::MassSpectrumCstSPtr spectrum_sp, QString error, QString fatal_error); void doMsmsPrecisionChanged(pappso::PrecisionPtr); void doSaveSvg(); diff --git a/src/gui/peptide_list_view/peptidelistwindow.cpp b/src/gui/peptide_list_view/peptidelistwindow.cpp index f3cd586a0cd114589733f2b0575b58b216500896..533afa4a0925949a48bb0450421cf06ef6c31a62 100644 --- a/src/gui/peptide_list_view/peptidelistwindow.cpp +++ b/src/gui/peptide_list_view/peptidelistwindow.cpp @@ -47,9 +47,7 @@ PeptideListQactionColumn::PeptideListQactionColumn(PeptideListWindow *parent, #if QT_VERSION >= 0x050000 // Qt5 code - connect(this, - &PeptideListQactionColumn::toggled, - this, + connect(this, &PeptideListQactionColumn::toggled, this, &PeptideListQactionColumn::doToggled); #else // Qt4 code @@ -121,47 +119,30 @@ PeptideListWindow::PeptideListWindow(ProjectWindow *parent) #if QT_VERSION >= 0x050000 // Qt5 code - connect(_project_window, - &ProjectWindow::identificationGroupGrouped, - this, + connect(_project_window, &ProjectWindow::identificationGroupGrouped, this, &PeptideListWindow::doIdentificationGroupGrouped); - connect(this, - &PeptideListWindow::peptideDataChanged, - _peptide_table_model_p, + connect(this, &PeptideListWindow::peptideDataChanged, _peptide_table_model_p, &PeptideTableModel::onPeptideDataChanged); - connect(ui->tableView, - &QTableView::clicked, - _p_proxy_model, + connect(ui->tableView, &QTableView::clicked, _p_proxy_model, &PeptideTableProxyModel::onTableClicked); - connect(_peptide_table_model_p, - &PeptideTableModel::layoutChanged, - this, + connect(_peptide_table_model_p, &PeptideTableModel::layoutChanged, this, &PeptideListWindow::updateStatusBar); - connect(ui->centralwidget, - &QWidget::customContextMenuRequested, - this, + connect(ui->centralwidget, &QWidget::customContextMenuRequested, this, &PeptideListWindow::showContextMenu); #else // Qt4 code connect(_project_window, - SIGNAL(identificationGroupGrouped(IdentificationGroup *)), - this, + SIGNAL(identificationGroupGrouped(IdentificationGroup *)), this, SLOT(doIdentificationGroupGrouped(IdentificationGroup *))); - connect(this, - SIGNAL(peptideDataChanged()), - _peptide_table_model_p, + connect(this, SIGNAL(peptideDataChanged()), _peptide_table_model_p, SLOT(onPeptideDataChanged())); - connect(ui->tableView, - SIGNAL(clicked(const QModelIndex &)), - _p_proxy_model, + connect(ui->tableView, SIGNAL(clicked(const QModelIndex &)), _p_proxy_model, SLOT(onTableClicked(const QModelIndex &))); - connect(_peptide_table_model_p, - SIGNAL(layoutChanged()), - this, + connect(_peptide_table_model_p, SIGNAL(layoutChanged()), this, SLOT(updateStatusBar())); /* diff --git a/src/gui/peptide_list_view/peptidelistwindow.h b/src/gui/peptide_list_view/peptidelistwindow.h index ffea46d7a7e6418eb7c5a2a059171f6f8f5365fa..3aecc924345bfec4835131df1c3699bc8b8041c7 100644 --- a/src/gui/peptide_list_view/peptidelistwindow.h +++ b/src/gui/peptide_list_view/peptidelistwindow.h @@ -36,7 +36,7 @@ class ProjectWindow; // http://doc.qt.io/qt-4.8/qt-itemviews-chart-mainwindow-cpp.html namespace Ui { -class PeptideView; + class PeptideView; } diff --git a/src/gui/peptide_list_view/peptidetablemodel.cpp b/src/gui/peptide_list_view/peptidetablemodel.cpp index efe5c63f6cea2e3a0d61bef8cd983edf3e4993e0..b8ed59b4a8e15fa27f029f7f44259040a31baf43 100644 --- a/src/gui/peptide_list_view/peptidetablemodel.cpp +++ b/src/gui/peptide_list_view/peptidetablemodel.cpp @@ -152,8 +152,7 @@ PeptideTableModel::columnCount(const QModelIndex &parent) const return 40; } QVariant -PeptideTableModel::headerData(int section, - Qt::Orientation orientation, +PeptideTableModel::headerData(int section, Qt::Orientation orientation, int role) const { if(orientation == Qt::Horizontal) diff --git a/src/gui/peptide_list_view/peptidetablemodel.h b/src/gui/peptide_list_view/peptidetablemodel.h index eeee8485fe104c2d4daf8384c8ba50c3c9a3a5cc..82addadd8757bfac6d28c98547af3114c3eef8ee 100644 --- a/src/gui/peptide_list_view/peptidetablemodel.h +++ b/src/gui/peptide_list_view/peptidetablemodel.h @@ -88,8 +88,8 @@ class PeptideTableModel : public QAbstractTableModel PeptideTableModel(PeptideListWindow *parent); int rowCount(const QModelIndex &parent = QModelIndex()) const override; int columnCount(const QModelIndex &parent = QModelIndex()) const override; - QVariant - headerData(int section, Qt::Orientation orientation, int role) const override; + QVariant headerData(int section, Qt::Orientation orientation, + int role) const override; QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override; diff --git a/src/gui/peptide_list_view/peptidetableproxymodel.cpp b/src/gui/peptide_list_view/peptidetableproxymodel.cpp index 3c0ec4d7c5a3069fb5a0c1da80346c775e37748f..3993cd41216919b5d97d242828271b8d9e6a68f6 100644 --- a/src/gui/peptide_list_view/peptidetableproxymodel.cpp +++ b/src/gui/peptide_list_view/peptidetableproxymodel.cpp @@ -317,8 +317,7 @@ PeptideTableProxyModel::lessThan(const QModelIndex &left, QVariant -PeptideTableProxyModel::headerData(int section, - Qt::Orientation orientation, +PeptideTableProxyModel::headerData(int section, Qt::Orientation orientation, int role) const { int col = mapToSource(index(0, section)).column(); diff --git a/src/gui/peptide_list_view/peptidetableproxymodel.h b/src/gui/peptide_list_view/peptidetableproxymodel.h index 123ce4b4f71c0cd4ea9c98bb9ff6a14153bad3f6..569bc20165262113be3f1f742115c9b48e215375 100644 --- a/src/gui/peptide_list_view/peptidetableproxymodel.h +++ b/src/gui/peptide_list_view/peptidetableproxymodel.h @@ -47,8 +47,8 @@ class PeptideTableProxyModel : public QSortFilterProxyModel bool filterAcceptsColumn(int source_column, const QModelIndex &source_parent) const override; - QVariant - headerData(int section, Qt::Orientation orientation, int role) const override; + QVariant headerData(int section, Qt::Orientation orientation, + int role) const override; QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override; bool lessThan(const QModelIndex &left, diff --git a/src/gui/project_view/identification_group_widget/identificationgroupwidget.cpp b/src/gui/project_view/identification_group_widget/identificationgroupwidget.cpp index d95594793e536d60d89d6ba96f9ae1dc88578a6d..bea55aeb5e5e1773a59c884ebe21fb6933fdac95 100644 --- a/src/gui/project_view/identification_group_widget/identificationgroupwidget.cpp +++ b/src/gui/project_view/identification_group_widget/identificationgroupwidget.cpp @@ -52,16 +52,13 @@ IdentificationGroupWidget::setIdentificationGroup( _p_project_window = parent; #if QT_VERSION >= 0x050000 // Qt5 code - connect(_p_project_window, - &ProjectWindow::identificationGroupGrouped, - this, + connect(_p_project_window, &ProjectWindow::identificationGroupGrouped, this, &IdentificationGroupWidget::doIdentificationGroupGrouped); #else // Qt4 code connect(_p_project_window, - SIGNAL(identificationGroupGrouped(IdentificationGroup *)), - this, + SIGNAL(identificationGroupGrouped(IdentificationGroup *)), this, SLOT(doIdentificationGroupGrouped(IdentificationGroup *))); #endif } diff --git a/src/gui/project_view/identification_group_widget/identificationgroupwidget.h b/src/gui/project_view/identification_group_widget/identificationgroupwidget.h index 0e34d4b4d4be6d6f033da400ae08aa60dfca592a..94d03b4be10e66674a09776ee399a786e35ef7af 100644 --- a/src/gui/project_view/identification_group_widget/identificationgroupwidget.h +++ b/src/gui/project_view/identification_group_widget/identificationgroupwidget.h @@ -29,7 +29,7 @@ namespace Ui { -class IdentificationGroupWidget; + class IdentificationGroupWidget; } diff --git a/src/gui/project_view/projectwindow.cpp b/src/gui/project_view/projectwindow.cpp index b4422aa6cc8c6a1902451cefa157fea50b0c4859..a0f8424471c70a95ac2ac315e0125a714e2d4330 100644 --- a/src/gui/project_view/projectwindow.cpp +++ b/src/gui/project_view/projectwindow.cpp @@ -84,21 +84,14 @@ ProjectWindow::ProjectWindow(MainWindow *parent) #if QT_VERSION >= 0x050000 // Qt5 code connect(ui->filter_parameter_widget, - &AutomaticFilterWidget::automaticFilterParametersChanged, - this, + &AutomaticFilterWidget::automaticFilterParametersChanged, this, &ProjectWindow::doAutomaticFilterParametersChanged); - connect(ui->contaminant_widget, - &ContaminantWidget::changed, - this, + connect(ui->contaminant_widget, &ContaminantWidget::changed, this, &ProjectWindow::doContaminantSelectionChanged); - connect(ui->decoy_widget, - &DecoyWidget::changed, - this, + connect(ui->decoy_widget, &DecoyWidget::changed, this, &ProjectWindow::doDecoySelectionChanged); - connect(_p_edit_label_methods, - &EditLabelMethods::accepted, - this, + connect(_p_edit_label_methods, &EditLabelMethods::accepted, this, &ProjectWindow::doAcceptedLabelingMethod); #else @@ -110,9 +103,7 @@ ProjectWindow::ProjectWindow(MainWindow *parent) this, SLOT(doAutomaticFilterParametersChanged(AutomaticFilterParameters))); - connect(_p_edit_label_methods, - SIGNAL(accepted()), - this, + connect(_p_edit_label_methods, SIGNAL(accepted()), this, SLOT(doAcceptedLabelingMethod())); // connect(this, SIGNAL(operateGrouping(ProjectSp)), @@ -221,13 +212,13 @@ ProjectWindow::refreshPtmGroup(IdentificationGroup *p_ident_group) } catch(pappso::PappsoException exception_pappso) { - QMessageBox::warning( - this, tr("Unable to display project :"), exception_pappso.qwhat()); + QMessageBox::warning(this, tr("Unable to display project :"), + exception_pappso.qwhat()); } catch(std::exception exception_std) { - QMessageBox::warning( - this, tr("Unable to display project :"), exception_std.what()); + QMessageBox::warning(this, tr("Unable to display project :"), + exception_std.what()); } } qDebug() << "ProjectWindow::refreshPtmGroup end"; @@ -249,13 +240,13 @@ ProjectWindow::refreshGroup(IdentificationGroup *p_ident_group) } catch(pappso::PappsoException exception_pappso) { - QMessageBox::warning( - this, tr("Unable to display project :"), exception_pappso.qwhat()); + QMessageBox::warning(this, tr("Unable to display project :"), + exception_pappso.qwhat()); } catch(std::exception exception_std) { - QMessageBox::warning( - this, tr("Unable to display project :"), exception_std.what()); + QMessageBox::warning(this, tr("Unable to display project :"), + exception_std.what()); } } qDebug() << "ProjectWindow::refreshGroup end"; @@ -295,13 +286,13 @@ ProjectWindow::computeFdr() } catch(pappso::PappsoException exception_pappso) { - QMessageBox::warning( - this, tr("Unable to compute FDR :"), exception_pappso.qwhat()); + QMessageBox::warning(this, tr("Unable to compute FDR :"), + exception_pappso.qwhat()); } catch(std::exception exception_std) { - QMessageBox::warning( - this, tr("Unable to compute FDR :"), exception_std.what()); + QMessageBox::warning(this, tr("Unable to compute FDR :"), + exception_std.what()); } qDebug() << "ProjectWindow::computeFdr end"; } @@ -386,8 +377,7 @@ ProjectWindow::computeMassPrecision() ui->mass_precision_mean_label->setText("0"); ui->mass_precision_median_label->setText("0"); ui->mass_precision_sd_label->setText("0"); - QMessageBox::warning(this, - tr("Unable to compute mass precision :"), + QMessageBox::warning(this, tr("Unable to compute mass precision :"), exception_pappso.qwhat()); } catch(std::exception exception_std) @@ -395,8 +385,8 @@ ProjectWindow::computeMassPrecision() ui->mass_precision_mean_label->setText("0"); ui->mass_precision_median_label->setText("0"); ui->mass_precision_sd_label->setText("0"); - QMessageBox::warning( - this, tr("Unable to compute mass precision :"), exception_std.what()); + QMessageBox::warning(this, tr("Unable to compute mass precision :"), + exception_std.what()); } qDebug() << "ProjectWindow::computeMassPrecision end"; } @@ -912,14 +902,14 @@ ProjectWindow::doApplyDecoy() catch(pappso::PappsoException exception_pappso) { hideWaitingMessage(); - QMessageBox::warning( - this, tr("Error filtering results :"), exception_pappso.qwhat()); + QMessageBox::warning(this, tr("Error filtering results :"), + exception_pappso.qwhat()); } catch(std::exception exception_std) { hideWaitingMessage(); - QMessageBox::warning( - this, tr("Error filtering results :"), exception_std.what()); + QMessageBox::warning(this, tr("Error filtering results :"), + exception_std.what()); } } @@ -946,13 +936,13 @@ ProjectWindow::doApplyFilter() catch(pappso::PappsoException exception_pappso) { hideWaitingMessage(); - QMessageBox::warning( - this, tr("Error filtering results :"), exception_pappso.qwhat()); + QMessageBox::warning(this, tr("Error filtering results :"), + exception_pappso.qwhat()); } catch(std::exception exception_std) { hideWaitingMessage(); - QMessageBox::warning( - this, tr("Error filtering results :"), exception_std.what()); + QMessageBox::warning(this, tr("Error filtering results :"), + exception_std.what()); } } diff --git a/src/gui/project_view/projectwindow.h b/src/gui/project_view/projectwindow.h index 836e4d3da83ab4c494a8bb491bcb564b0082af9b..c625843da2b451d42e7a31a8860bafdf240190db 100644 --- a/src/gui/project_view/projectwindow.h +++ b/src/gui/project_view/projectwindow.h @@ -42,7 +42,7 @@ class MainWindow; // http://doc.qt.io/qt-4.8/qt-itemviews-chart-mainwindow-cpp.html namespace Ui { -class ProjectView; + class ProjectView; } class ProjectWindow : public QMainWindow diff --git a/src/gui/protein_list_view/proteinlistwindow.cpp b/src/gui/protein_list_view/proteinlistwindow.cpp index 4a05e8cfc67ee48de0a6447eca2af04bc744e7b2..73648355426d11880bc79d9f6c6fcf09d939c753 100644 --- a/src/gui/protein_list_view/proteinlistwindow.cpp +++ b/src/gui/protein_list_view/proteinlistwindow.cpp @@ -47,9 +47,7 @@ ProteinListQactionColumn::ProteinListQactionColumn(ProteinListWindow *parent, #if QT_VERSION >= 0x050000 // Qt5 code - connect(this, - &ProteinListQactionColumn::toggled, - this, + connect(this, &ProteinListQactionColumn::toggled, this, &ProteinListQactionColumn::doToggled); #else // Qt4 code @@ -118,41 +116,26 @@ ProteinListWindow::ProteinListWindow(ProjectWindow *parent) #if QT_VERSION >= 0x050000 // Qt5 code - connect(_project_window, - &ProjectWindow::identificationGroupGrouped, - this, + connect(_project_window, &ProjectWindow::identificationGroupGrouped, this, &ProteinListWindow::doIdentificationGroupGrouped); - connect(this, - &ProteinListWindow::proteinDataChanged, - _protein_table_model_p, + connect(this, &ProteinListWindow::proteinDataChanged, _protein_table_model_p, &ProteinTableModel::onProteinDataChanged); - connect(ui->tableView, - &QTableView::clicked, - _p_proxy_model, + connect(ui->tableView, &QTableView::clicked, _p_proxy_model, &ProteinTableProxyModel::onTableClicked); - connect(ui->centralwidget, - &QWidget::customContextMenuRequested, - this, + connect(ui->centralwidget, &QWidget::customContextMenuRequested, this, &ProteinListWindow::showContextMenu); - connect(_protein_table_model_p, - &ProteinTableModel::layoutChanged, - this, + connect(_protein_table_model_p, &ProteinTableModel::layoutChanged, this, &ProteinListWindow::updateStatusBar); #else // Qt4 code connect(_project_window, - SIGNAL(identificationGroupGrouped(IdentificationGroup *)), - this, + SIGNAL(identificationGroupGrouped(IdentificationGroup *)), this, SLOT(doIdentificationGroupGrouped(IdentificationGroup *))); - connect(this, - SIGNAL(proteinDataChanged()), - _protein_table_model_p, + connect(this, SIGNAL(proteinDataChanged()), _protein_table_model_p, SLOT(onProteinDataChanged())); - connect(ui->tableView, - SIGNAL(clicked(const QModelIndex &)), - _p_proxy_model, + connect(ui->tableView, SIGNAL(clicked(const QModelIndex &)), _p_proxy_model, SLOT(onTableClicked(const QModelIndex &))); // connect(ui->tableView, SIGNAL(doubleClicked(const QModelIndex &)), // _p_proxy_model, SLOT(onTableDoubleClicked(const QModelIndex &))); @@ -162,15 +145,11 @@ ProteinListWindow::ProteinListWindow(ProjectWindow *parent) // connect( this, SIGNAL( focusReceived(bool) ),this, // SLOT(doFocusReceived(bool)) ); - connect(ui->centralwidget, - SIGNAL(customContextMenuRequested(const QPoint &)), - this, - SLOT(showContextMenu(const QPoint &))); + connect(ui->centralwidget, SIGNAL(customContextMenuRequested(const QPoint &)), + this, SLOT(showContextMenu(const QPoint &))); // connect(_p_proxy_model, SIGNAL(layoutChanged()), // this, SLOT(doProxyLayoutChanged())); - connect(_protein_table_model_p, - SIGNAL(layoutChanged()), - this, + connect(_protein_table_model_p, SIGNAL(layoutChanged()), this, SLOT(updateStatusBar())); #endif } diff --git a/src/gui/protein_list_view/proteinlistwindow.h b/src/gui/protein_list_view/proteinlistwindow.h index b7ed2a105c1966a192fe0b388c2e740d691ad87d..a1015a9a3cb4dae50f4d6ba401aacd6fc6ad002b 100644 --- a/src/gui/protein_list_view/proteinlistwindow.h +++ b/src/gui/protein_list_view/proteinlistwindow.h @@ -37,7 +37,7 @@ class ProjectWindow; // http://doc.qt.io/qt-4.8/qt-itemviews-chart-mainwindow-cpp.html namespace Ui { -class ProteinView; + class ProteinView; } class ProteinListWindow; diff --git a/src/gui/protein_list_view/proteintablemodel.cpp b/src/gui/protein_list_view/proteintablemodel.cpp index cbe0d4ec5f2a45efc88689b8402ea446fc9c957c..490f40bb9af62e4406a2325e0be34d837bfa13f1 100644 --- a/src/gui/protein_list_view/proteintablemodel.cpp +++ b/src/gui/protein_list_view/proteintablemodel.cpp @@ -209,8 +209,7 @@ ProteinTableModel::getDescription(std::int8_t column) return ""; } QVariant -ProteinTableModel::headerData(int section, - Qt::Orientation orientation, +ProteinTableModel::headerData(int section, Qt::Orientation orientation, int role) const { if(_p_identification_group == nullptr) diff --git a/src/gui/protein_list_view/proteintablemodel.h b/src/gui/protein_list_view/proteintablemodel.h index 86734bcf813dc4a1fda284133f18ae3b4022908a..6cdaa1ce25844a2f4998f71d9d9dcc886edb3b90 100644 --- a/src/gui/protein_list_view/proteintablemodel.h +++ b/src/gui/protein_list_view/proteintablemodel.h @@ -62,8 +62,8 @@ class ProteinTableModel : public QAbstractTableModel rowCount(const QModelIndex &parent = QModelIndex()) const override; virtual int columnCount(const QModelIndex &parent = QModelIndex()) const override; - virtual QVariant - headerData(int section, Qt::Orientation orientation, int role) const override; + virtual QVariant headerData(int section, Qt::Orientation orientation, + int role) const override; virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override; diff --git a/src/gui/protein_list_view/proteintableproxymodel.cpp b/src/gui/protein_list_view/proteintableproxymodel.cpp index 336061c75e591b40f9e15cfb9d996e6cd18486c8..2db9e8aefd9c6201009b2deed12f2e57c81e2fe2 100644 --- a/src/gui/protein_list_view/proteintableproxymodel.cpp +++ b/src/gui/protein_list_view/proteintableproxymodel.cpp @@ -378,8 +378,7 @@ ProteinTableProxyModel::data(const QModelIndex &index, int role) const } QVariant -ProteinTableProxyModel::headerData(int section, - Qt::Orientation orientation, +ProteinTableProxyModel::headerData(int section, Qt::Orientation orientation, int role) const { int col = mapToSource(index(0, section)).column(); diff --git a/src/gui/protein_list_view/proteintableproxymodel.h b/src/gui/protein_list_view/proteintableproxymodel.h index d4f6877009bef5cb49ad67d901df975fa9b38be2..adefbcb080a05dd1168a1d9e1232a685c7adb328 100644 --- a/src/gui/protein_list_view/proteintableproxymodel.h +++ b/src/gui/protein_list_view/proteintableproxymodel.h @@ -48,8 +48,8 @@ class ProteinTableProxyModel : public QSortFilterProxyModel bool filterAcceptsColumn(int source_column, const QModelIndex &source_parent) const override; - QVariant - headerData(int section, Qt::Orientation orientation, int role) const override; + QVariant headerData(int section, Qt::Orientation orientation, + int role) const override; QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override; bool lessThan(const QModelIndex &left, diff --git a/src/gui/protein_view/proteinwindow.cpp b/src/gui/protein_view/proteinwindow.cpp index 9b17a774131f682d834fc69f17021a984c3ae7ee..397c5aea1d13b5147743012ce162e161b06a970a 100644 --- a/src/gui/protein_view/proteinwindow.cpp +++ b/src/gui/protein_view/proteinwindow.cpp @@ -39,8 +39,8 @@ DbXrefButton::DbXrefButton(QWidget *parent, DbXref dbxref) : QPushButton(parent) _dbxref = dbxref; #if QT_VERSION >= 0x050000 // Qt5 code - QObject::connect( - this, &DbXrefButton::clicked, this, &DbXrefButton::clickedSlot); + QObject::connect(this, &DbXrefButton::clicked, this, + &DbXrefButton::clickedSlot); #else // Qt4 code QObject::connect(this, SIGNAL(clicked()), this, SLOT(clickedSlot())); @@ -67,23 +67,16 @@ ProteinWindow::ProteinWindow(ProjectWindow *parent) #if QT_VERSION >= 0x050000 // Qt5 code - connect(_p_project_window, - &ProjectWindow::identificationGroupGrouped, - this, + connect(_p_project_window, &ProjectWindow::identificationGroupGrouped, this, &ProteinWindow::doIdentificationGroupGrouped); - connect(_p_project_window, - &ProjectWindow::peptideEvidenceSelected, - this, + connect(_p_project_window, &ProjectWindow::peptideEvidenceSelected, this, &ProteinWindow::doPeptideEvidenceSelected); #else // Qt4 code connect(_p_project_window, - SIGNAL(identificationGroupGrouped(IdentificationGroup *)), - this, + SIGNAL(identificationGroupGrouped(IdentificationGroup *)), this, SLOT(doIdentificationGroupGrouped(IdentificationGroup *))); - connect(_p_project_window, - SIGNAL(peptideMatchSelected(PeptideMatch *)), - this, + connect(_p_project_window, SIGNAL(peptideMatchSelected(PeptideMatch *)), this, SLOT(doPeptideMatchSelected(PeptideMatch *))); // connect(_protein_table_model_p, SIGNAL(layoutChanged()), this, @@ -150,10 +143,9 @@ ProteinWindow::updateDisplay() _p_protein_match->getProteinXtpSp().get()->getDbxrefList()) { QString accession = ui->accession_label->text().replace( - dbxref.accession, - QString("<span style=\"color:%2;\">%1</span>") - .arg(dbxref.accession) - .arg("blue")); + dbxref.accession, QString("<span style=\"color:%2;\">%1</span>") + .arg(dbxref.accession) + .arg("blue")); ui->accession_label->setText(accession); qDebug() << "ProteinWindow::updateDisplay " << accession; @@ -179,14 +171,13 @@ ProteinWindow::updateDisplay() } catch(pappso::PappsoException exception_pappso) { - QMessageBox::warning(this, - tr("Unable to display protein details :"), + QMessageBox::warning(this, tr("Unable to display protein details :"), exception_pappso.qwhat()); } catch(std::exception exception_std) { - QMessageBox::warning( - this, tr("Unable to display protein details :"), exception_std.what()); + QMessageBox::warning(this, tr("Unable to display protein details :"), + exception_std.what()); } } diff --git a/src/gui/protein_view/proteinwindow.h b/src/gui/protein_view/proteinwindow.h index 1e2885b4f4142fda6da638c1adaa54abb5130677..8bb6fcf33d8d49ce293db8ed755a560169e8409b 100644 --- a/src/gui/protein_view/proteinwindow.h +++ b/src/gui/protein_view/proteinwindow.h @@ -46,7 +46,7 @@ class ProjectWindow; namespace Ui { -class ProteinDetailView; + class ProteinDetailView; } class ProteinWindow : public QMainWindow diff --git a/src/gui/ptm_island_list_view/ptmislandlistwindow.cpp b/src/gui/ptm_island_list_view/ptmislandlistwindow.cpp index 880533bae6ba0fb865d6f9704aa69cc4d68110cf..5114d8f0d6450f6ebcad0c3d370d3c34f0e6af36 100644 --- a/src/gui/ptm_island_list_view/ptmislandlistwindow.cpp +++ b/src/gui/ptm_island_list_view/ptmislandlistwindow.cpp @@ -63,46 +63,30 @@ PtmIslandListWindow::PtmIslandListWindow(ProjectWindow *parent) #if QT_VERSION >= 0x050000 // Qt5 code - connect(this, - &PtmIslandListWindow::ptmIslandDataChanged, - _ptm_table_model_p, + connect(this, &PtmIslandListWindow::ptmIslandDataChanged, _ptm_table_model_p, &PtmIslandTableModel::onPtmIslandDataChanged); - connect(_project_window, - &ProjectWindow::identificationPtmGroupGrouped, - this, + connect(_project_window, &ProjectWindow::identificationPtmGroupGrouped, this, &PtmIslandListWindow::doIdentificationPtmGroupGrouped); - connect(_project_window, - &ProjectWindow::identificationGroupGrouped, - this, + connect(_project_window, &ProjectWindow::identificationGroupGrouped, this, &PtmIslandListWindow::doIdentificationGroupGrouped); - connect(ui->ptm_island_tableview, - &QTableView::clicked, - _ptm_proxy_model_p, + connect(ui->ptm_island_tableview, &QTableView::clicked, _ptm_proxy_model_p, &PtmIslandProxyModel::onTableClicked); - connect(_ptm_table_model_p, - &PtmIslandTableModel::layoutChanged, - this, + connect(_ptm_table_model_p, &PtmIslandTableModel::layoutChanged, this, &PtmIslandListWindow::updateStatusBar); #else // Qt4 code - connect(this, - SIGNAL(ptmIslandDataChanged()), - _ptm_table_model_p, + connect(this, SIGNAL(ptmIslandDataChanged()), _ptm_table_model_p, SLOT(onPtmIslandDataChanged())); connect(_project_window, - SIGNAL(identificationPtmGroupGrouped(IdentificationGroup *)), - this, + SIGNAL(identificationPtmGroupGrouped(IdentificationGroup *)), this, SLOT(doIdentificationPtmGroupGrouped(IdentificationGroup *))); connect(_project_window, - SIGNAL(identificationGroupGrouped(IdentificationGroup *)), - this, + SIGNAL(identificationGroupGrouped(IdentificationGroup *)), this, SLOT(doIdentificationGroupGrouped(IdentificationGroup *))); - connect(ui->ptm_island_tableview, - SIGNAL(clicked(const QModelIndex &)), - _ptm_proxy_model_p, - SLOT(onTableClicked(const QModelIndex &))); + connect(ui->ptm_island_tableview, SIGNAL(clicked(const QModelIndex &)), + _ptm_proxy_model_p, SLOT(onTableClicked(const QModelIndex &))); #endif } diff --git a/src/gui/ptm_island_list_view/ptmislandlistwindow.h b/src/gui/ptm_island_list_view/ptmislandlistwindow.h index e5f49d377f648a53de01181f83308767ad0203ca..70cb8e16864ed226b8bd6f18e014e76351cec23c 100644 --- a/src/gui/ptm_island_list_view/ptmislandlistwindow.h +++ b/src/gui/ptm_island_list_view/ptmislandlistwindow.h @@ -42,7 +42,7 @@ class PtmPeptideListWindow; // http://doc.qt.io/qt-4.8/qt-itemviews-chart-mainwindow-cpp.html namespace Ui { -class PtmIslandListWindow; + class PtmIslandListWindow; } class PtmIslandListWindow : public QMainWindow diff --git a/src/gui/ptm_island_list_view/ptmislandtablemodel.cpp b/src/gui/ptm_island_list_view/ptmislandtablemodel.cpp index 9057339b4609e74b2b55246ac43768cc8861bda7..d039db1fe402edff4d6d9ff8fcea4b678fba7991 100644 --- a/src/gui/ptm_island_list_view/ptmislandtablemodel.cpp +++ b/src/gui/ptm_island_list_view/ptmislandtablemodel.cpp @@ -178,8 +178,7 @@ PtmIslandTableModel::columnCount(const QModelIndex &parent) const return 0; } QVariant -PtmIslandTableModel::headerData(int section, - Qt::Orientation orientation, +PtmIslandTableModel::headerData(int section, Qt::Orientation orientation, int role) const { if(getPtmGroupingExperiment() == nullptr) diff --git a/src/gui/ptm_island_list_view/ptmislandtablemodel.h b/src/gui/ptm_island_list_view/ptmislandtablemodel.h index da20d0d4ad2383fea2d4f1c4d4af2f325e897c21..2cee9bc6260f1f14c7bd0a7ab96649de8104208e 100644 --- a/src/gui/ptm_island_list_view/ptmislandtablemodel.h +++ b/src/gui/ptm_island_list_view/ptmislandtablemodel.h @@ -70,8 +70,8 @@ class PtmIslandTableModel : public QAbstractTableModel rowCount(const QModelIndex &parent = QModelIndex()) const override; virtual int columnCount(const QModelIndex &parent = QModelIndex()) const override; - virtual QVariant - headerData(int section, Qt::Orientation orientation, int role) const override; + virtual QVariant headerData(int section, Qt::Orientation orientation, + int role) const override; virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override; diff --git a/src/gui/ptm_peptide_list_view/ptmpeptidelistwindow.cpp b/src/gui/ptm_peptide_list_view/ptmpeptidelistwindow.cpp index da29d92673639291b23af9779cd22c823dd58d18..5fb53774e830b6371d6d0ae1b92aac3e810e5d8a 100644 --- a/src/gui/ptm_peptide_list_view/ptmpeptidelistwindow.cpp +++ b/src/gui/ptm_peptide_list_view/ptmpeptidelistwindow.cpp @@ -62,12 +62,9 @@ PtmPeptideListWindow::PtmPeptideListWindow(PtmIslandListWindow *parent) #if QT_VERSION >= 0x050000 // Qt5 code - connect(ui->ptm_peptide_tableview, - &QTableView::clicked, - _ptm_proxy_model_p, + connect(ui->ptm_peptide_tableview, &QTableView::clicked, _ptm_proxy_model_p, &PtmPeptideTableProxyModel::onTableClicked); - connect(this, - &PtmPeptideListWindow::requestPeptideDetailView, + connect(this, &PtmPeptideListWindow::requestPeptideDetailView, _p_ptm_island_list_window->getProjectWindowP(), &ProjectWindow::doViewPeptideDetail); #else @@ -80,12 +77,9 @@ PtmPeptideListWindow::PtmPeptideListWindow(PtmIslandListWindow *parent) // this,SLOT(doIdentificationPtmGroupGrouped(IdentificationGroup *))); connect // (_project_window, SIGNAL(identificationGroupGrouped(IdentificationGroup // *)), this,SLOT(doIdentificationGroupGrouped(IdentificationGroup *))); - connect(ui->ptm_peptide_tableview, - SIGNAL(clicked(const QModelIndex &)), - _ptm_proxy_model_p, - SLOT(onTableClicked(const QModelIndex &))); - connect(this, - SIGNAL(requestPeptideDetailView(PeptideMatch *)), + connect(ui->ptm_peptide_tableview, SIGNAL(clicked(const QModelIndex &)), + _ptm_proxy_model_p, SLOT(onTableClicked(const QModelIndex &))); + connect(this, SIGNAL(requestPeptideDetailView(PeptideMatch *)), _p_ptm_island_list_window->getProjectWindowP(), SLOT(doViewPeptideDetail(PeptideMatch *))); diff --git a/src/gui/ptm_peptide_list_view/ptmpeptidelistwindow.h b/src/gui/ptm_peptide_list_view/ptmpeptidelistwindow.h index b4bcc15c85df99bace9e68394e114e486390abe4..d49489ef74f2197e0e22c0dca384ecd5e8b6046c 100644 --- a/src/gui/ptm_peptide_list_view/ptmpeptidelistwindow.h +++ b/src/gui/ptm_peptide_list_view/ptmpeptidelistwindow.h @@ -40,7 +40,7 @@ class PtmIslandListWindow; namespace Ui { -class PtmPeptideListWindow; + class PtmPeptideListWindow; } diff --git a/src/gui/ptm_peptide_list_view/ptmpeptidetablemodel.cpp b/src/gui/ptm_peptide_list_view/ptmpeptidetablemodel.cpp index 2f9fbd0e2d790f053f130040c61a4f1783a48086..ca333c6a2eb8909b7351cb914800d21ba344f689 100644 --- a/src/gui/ptm_peptide_list_view/ptmpeptidetablemodel.cpp +++ b/src/gui/ptm_peptide_list_view/ptmpeptidetablemodel.cpp @@ -188,8 +188,7 @@ PtmPeptideTableModel::columnCount(const QModelIndex &parent) const return 15; } QVariant -PtmPeptideTableModel::headerData(int section, - Qt::Orientation orientation, +PtmPeptideTableModel::headerData(int section, Qt::Orientation orientation, int role) const { if(orientation == Qt::Horizontal) diff --git a/src/gui/ptm_peptide_list_view/ptmpeptidetablemodel.h b/src/gui/ptm_peptide_list_view/ptmpeptidetablemodel.h index 59ae2434804153b5a49fa749f55a2109ace9bee6..76c02ce65b2f5ac008d2fe0dbb74427e876171c1 100644 --- a/src/gui/ptm_peptide_list_view/ptmpeptidetablemodel.h +++ b/src/gui/ptm_peptide_list_view/ptmpeptidetablemodel.h @@ -71,8 +71,8 @@ class PtmPeptideTableModel : public QAbstractTableModel rowCount(const QModelIndex &parent = QModelIndex()) const override; virtual int columnCount(const QModelIndex &parent = QModelIndex()) const override; - virtual QVariant - headerData(int section, Qt::Orientation orientation, int role) const override; + virtual QVariant headerData(int section, Qt::Orientation orientation, + int role) const override; virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override; static const QString getTitle(PtmPeptideListColumn column); diff --git a/src/gui/ptm_peptide_list_view/ptmpeptidetableproxymodel.cpp b/src/gui/ptm_peptide_list_view/ptmpeptidetableproxymodel.cpp index e370564136dc0eccf7208453cdff35adb2401e18..4a15cc5482239dab46574bb158344a958be9bf97 100644 --- a/src/gui/ptm_peptide_list_view/ptmpeptidetableproxymodel.cpp +++ b/src/gui/ptm_peptide_list_view/ptmpeptidetableproxymodel.cpp @@ -35,8 +35,7 @@ PtmPeptideMenuQicon::PtmPeptideMenuQicon( const PtmGroupingExperiment *p_ptm_grouping_experiment, - const PtmSampleScan *p_ptm_sample, - const PeptideMatch *p_peptide_match) + const PtmSampleScan *p_ptm_sample, const PeptideMatch *p_peptide_match) : QIcon(), _peptide_match(*p_peptide_match) { _p_ptm_sample_scan = p_ptm_sample; @@ -46,10 +45,8 @@ PtmPeptideMenuQicon::~PtmPeptideMenuQicon() { } void -PtmPeptideMenuQicon::paint(QPainter *painter, - const QRect &rect, - Qt::Alignment alignment, - Mode mode, +PtmPeptideMenuQicon::paint(QPainter *painter, const QRect &rect, + Qt::Alignment alignment, Mode mode, State state) const { @@ -72,15 +69,14 @@ PtmPeptideMenuQicon::paint(QPainter *painter, PtmPeptideMenuQaction::PtmPeptideMenuQaction( PtmPeptideTableProxyModel *parent, const PtmGroupingExperiment *p_ptm_grouping_experiment, - const PtmSampleScan *p_ptm_sample, - PeptideMatch *p_peptide_match) + const PtmSampleScan *p_ptm_sample, PeptideMatch *p_peptide_match) : QAction(parent) { _p_ptm_peptide_table_proxy_model = parent; _peptide_match = *p_peptide_match; - this->setIcon(PtmPeptideMenuQicon( - p_ptm_grouping_experiment, p_ptm_sample, p_peptide_match)); + this->setIcon(PtmPeptideMenuQicon(p_ptm_grouping_experiment, p_ptm_sample, + p_peptide_match)); // this->setText(p_peptide_match->getPeptideXtpSp().get()->getSequence()); QStringList position_list; @@ -101,9 +97,7 @@ PtmPeptideMenuQaction::PtmPeptideMenuQaction( #if QT_VERSION >= 0x050000 // Qt5 code - connect(this, - &PtmPeptideMenuQaction::triggered, - this, + connect(this, &PtmPeptideMenuQaction::triggered, this, &PtmPeptideMenuQaction::doTriggered); #else // Qt4 code @@ -193,10 +187,8 @@ PtmPeptideTableProxyModel::showContextMenu(const QModelIndex &index) for(auto p_peptide_match : sp_ptm_sample_scan.get()->getPeptideMatchList()) { p_action = new PtmPeptideMenuQaction( - this, - _p_ptm_table_model->getPtmGroupingExperiment(), - sp_ptm_sample_scan.get(), - &p_peptide_match); + this, _p_ptm_table_model->getPtmGroupingExperiment(), + sp_ptm_sample_scan.get(), &p_peptide_match); _p_context_menu->addAction(p_action); } diff --git a/src/gui/ptm_peptide_list_view/ptmpeptidetableproxymodel.h b/src/gui/ptm_peptide_list_view/ptmpeptidetableproxymodel.h index fc1211eccfbb6a56297d0c021d1035a2e711e8b8..3b458883bfd391828b05e20202daed9b4270f104 100644 --- a/src/gui/ptm_peptide_list_view/ptmpeptidetableproxymodel.h +++ b/src/gui/ptm_peptide_list_view/ptmpeptidetableproxymodel.h @@ -46,15 +46,12 @@ class PtmPeptideMenuQicon : public QIcon public: explicit PtmPeptideMenuQicon( const PtmGroupingExperiment *p_ptm_grouping_experiment, - const PtmSampleScan *p_ptm_sample, - const PeptideMatch *p_peptide_match); + const PtmSampleScan *p_ptm_sample, const PeptideMatch *p_peptide_match); ~PtmPeptideMenuQicon(); - void paint(QPainter *painter, - const QRect &rect, - Qt::Alignment alignment = Qt::AlignCenter, - Mode mode = Normal, - State state = Off) const; + void paint(QPainter *painter, const QRect &rect, + Qt::Alignment alignment = Qt::AlignCenter, Mode mode = Normal, + State state = Off) const; private: const PtmSampleScan *_p_ptm_sample_scan; @@ -69,8 +66,7 @@ class PtmPeptideMenuQaction : public QAction explicit PtmPeptideMenuQaction( PtmPeptideTableProxyModel *parent, const PtmGroupingExperiment *p_ptm_grouping_experiment, - const PtmSampleScan *p_ptm_sample, - PeptideMatch *p_peptide_match); + const PtmSampleScan *p_ptm_sample, PeptideMatch *p_peptide_match); ~PtmPeptideMenuQaction(); public slots: diff --git a/src/gui/ptm_peptide_list_view/ptmsequencedelegate.h b/src/gui/ptm_peptide_list_view/ptmsequencedelegate.h index fef38bde8479a3fe0861ad335932e9ca63d6806e..e9b786bcc63c4700a6db961e0def62f88408155d 100644 --- a/src/gui/ptm_peptide_list_view/ptmsequencedelegate.h +++ b/src/gui/ptm_peptide_list_view/ptmsequencedelegate.h @@ -41,8 +41,7 @@ class PtmSequenceDelegate : public QStyledItemDelegate PtmSequenceDelegate(PtmIslandListWindow *p_ptm_island_list_window, QWidget *parent = 0); - void paint(QPainter *painter, - const QStyleOptionViewItem &option, + void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override; // QSize sizeHint(const QStyleOptionViewItem &option, // const QModelIndex &index) const override; diff --git a/src/gui/tandem_run_dialog/tandemrundialog.cpp b/src/gui/tandem_run_dialog/tandemrundialog.cpp index 596819d180573beb21a3dbb208eab02c6c96742e..679de92a2959dad3f50130b2488170a2cc58fef9 100644 --- a/src/gui/tandem_run_dialog/tandemrundialog.cpp +++ b/src/gui/tandem_run_dialog/tandemrundialog.cpp @@ -243,13 +243,9 @@ TandemRunDialog::editPresets() #if QT_VERSION >= 0x050000 // Qt5 code - connect(_p_preset_dialog, - &EditTandemPresetDialog::accepted, - this, + connect(_p_preset_dialog, &EditTandemPresetDialog::accepted, this, &TandemRunDialog::acceptPresetEdit); - connect(_p_preset_dialog, - &EditTandemPresetDialog::rejected, - this, + connect(_p_preset_dialog, &EditTandemPresetDialog::rejected, this, &TandemRunDialog::rejectPresetEdit); #else // Qt4 code @@ -316,9 +312,7 @@ TandemRunDialog::selectFastaFiles() settings.value("path/tandemrun_fastafiles_directory", "").toString(); QStringList filenames = QFileDialog::getOpenFileNames( - this, - tr("FASTA files"), - default_fasta_location, + this, tr("FASTA files"), default_fasta_location, tr("FASTA files (*.fasta);;all files (*)")); if(filenames.size() > 0) @@ -349,8 +343,7 @@ TandemRunDialog::selectXtandemExe() QString filename = - QFileDialog::getOpenFileName(this, - tr("select X!Tandem executable"), + QFileDialog::getOpenFileName(this, tr("select X!Tandem executable"), QDir(tandem_bin_path).absolutePath(), tr("all files (*);;exe files (*.exe)")); fillTandemBinPath(filename, true); @@ -373,9 +366,7 @@ TandemRunDialog::selectMzFiles() settings.value("path/tandemrun_mzfiles_directory", "").toString(); QStringList filenames = QFileDialog::getOpenFileNames( - this, - tr("select peak list files"), - default_mz_location, + this, tr("select peak list files"), default_mz_location, tr("any mz files (*.mzXML *.mzxml *.mzML *.mzml *.mgf);;mzXML (*.mzXML " "*.mzxml);;mzML (*.mzML *.mzml);;MGF (*.mgf);;all files (*)")); @@ -518,8 +509,7 @@ TandemRunDialog::fillTandemBinPath(const QString &tandem_bin_path_in, else { QMessageBox::warning( - this, - tr("Wrong X!Tandem exe file"), + this, tr("Wrong X!Tandem exe file"), tr("%1 is not executable.").arg(tandem_bin_path)); } } @@ -540,8 +530,7 @@ TandemRunDialog::checkXtandemBin() if(tandem_bin_path.isEmpty()) { QMessageBox::warning( - this, - tr("Wrong X!Tandem configuration"), + this, tr("Wrong X!Tandem configuration"), tr("X!Tandem .exe file is not set.\n%1").arg(tandem_install_text)); QDesktopServices::openUrl(QUrl("https://www.thegpm.org/tandem/")); @@ -561,8 +550,7 @@ TandemRunDialog::checkXtandemBin() catch(pappso::PappsoException &error) { QMessageBox::warning( - this, - tr("Wrong X!Tandem exe file"), + this, tr("Wrong X!Tandem exe file"), tr("%1 does not seem to be a valid X!Tandem version.\n%2") .arg(tandem_bin.absoluteFilePath()) .arg(tandem_install_text)); @@ -572,8 +560,7 @@ TandemRunDialog::checkXtandemBin() } else { - QMessageBox::warning(this, - tr("Wrong X!Tandem exe file"), + QMessageBox::warning(this, tr("Wrong X!Tandem exe file"), tr("%1 is not executable.\n%2") .arg(tandem_bin_path) .arg(tandem_install_text)); diff --git a/src/gui/tandem_run_dialog/tandemrundialog.h b/src/gui/tandem_run_dialog/tandemrundialog.h index 45e234b8dc8973b9a268087ff78dc940289be3db..5bc76507a3e1c3f62ec34340a8f0f765fc8675df 100644 --- a/src/gui/tandem_run_dialog/tandemrundialog.h +++ b/src/gui/tandem_run_dialog/tandemrundialog.h @@ -33,7 +33,7 @@ namespace Ui { -class TandemRunDialog; + class TandemRunDialog; } diff --git a/src/gui/waiting_message_dialog/waitingmessagedialog.h b/src/gui/waiting_message_dialog/waitingmessagedialog.h index a20c256b4f948fbe4630a7eaef5857aad3c85493..50a73da76796de26bf466165342ef5658bdad11c 100644 --- a/src/gui/waiting_message_dialog/waitingmessagedialog.h +++ b/src/gui/waiting_message_dialog/waitingmessagedialog.h @@ -34,7 +34,7 @@ namespace Ui { -class WaitingMessageDialog; + class WaitingMessageDialog; } diff --git a/src/gui/widgets/automatic_filter_widget/automaticfilterwidget.h b/src/gui/widgets/automatic_filter_widget/automaticfilterwidget.h index 5b2fa39f16c63b72da273a2264ac2422838c54ea..a01b80525f1ec1fe1c66eb6068af61c41b67c56e 100644 --- a/src/gui/widgets/automatic_filter_widget/automaticfilterwidget.h +++ b/src/gui/widgets/automatic_filter_widget/automaticfilterwidget.h @@ -31,7 +31,7 @@ namespace Ui { -class AutomaticFilterWidget; + class AutomaticFilterWidget; } class AutomaticFilterWidget : public QWidget diff --git a/src/gui/widgets/contaminant_widget/contaminantwidget.cpp b/src/gui/widgets/contaminant_widget/contaminantwidget.cpp index 5e167b1d412d6634df54a93d5826ec17823ba556..530668ffa3fcf7bf914c128fc5d461a6633aeff7 100644 --- a/src/gui/widgets/contaminant_widget/contaminantwidget.cpp +++ b/src/gui/widgets/contaminant_widget/contaminantwidget.cpp @@ -215,9 +215,7 @@ ContaminantWidget::doSelectFastaFile() settings.value("path/fastafiles_directory", "").toString(); QStringList filenames = QFileDialog::getOpenFileNames( - this, - tr("FASTA files"), - default_fasta_location, + this, tr("FASTA files"), default_fasta_location, tr("FASTA files (*.fasta);;all files (*)")); if(filenames.size() > 0) diff --git a/src/gui/widgets/contaminant_widget/contaminantwidget.h b/src/gui/widgets/contaminant_widget/contaminantwidget.h index 0a79d0958293439de1ff3cf7068ad29bd5646394..ffea09bd5da7ae97c8c5da086fb3b29eea72cae3 100644 --- a/src/gui/widgets/contaminant_widget/contaminantwidget.h +++ b/src/gui/widgets/contaminant_widget/contaminantwidget.h @@ -40,7 +40,7 @@ namespace Ui { -class ContaminantWidget; + class ContaminantWidget; } class ContaminantWidget : public QWidget diff --git a/src/gui/widgets/decoy_widget/decoywidget.cpp b/src/gui/widgets/decoy_widget/decoywidget.cpp index b2289982aa8d74e6c1012354d66238d43859f2bf..d627f397a4b85acb55af18cba69bca15885d2947 100644 --- a/src/gui/widgets/decoy_widget/decoywidget.cpp +++ b/src/gui/widgets/decoy_widget/decoywidget.cpp @@ -224,9 +224,7 @@ DecoyWidget::doSelectFastaFile() settings.value("path/fastafiles_directory", "").toString(); QStringList filenames = QFileDialog::getOpenFileNames( - this, - tr("FASTA files"), - default_fasta_location, + this, tr("FASTA files"), default_fasta_location, tr("FASTA files (*.fasta);;all files (*)")); if(filenames.size() > 0) diff --git a/src/gui/widgets/decoy_widget/decoywidget.h b/src/gui/widgets/decoy_widget/decoywidget.h index 9cd64c78643b8f0b568b7c24498611b137df46af..4406058d17bc7acbbb4188a27d8b2945a9990422 100644 --- a/src/gui/widgets/decoy_widget/decoywidget.h +++ b/src/gui/widgets/decoy_widget/decoywidget.h @@ -36,7 +36,7 @@ namespace Ui { -class DecoyWidget; + class DecoyWidget; } class DecoyWidget : public QWidget diff --git a/src/gui/workerthread.cpp b/src/gui/workerthread.cpp index f432d576d8ebf3284dc97846fcbca0ab6d60f701..118a7f4bc56c48635ab2a8b12153428233230f15 100644 --- a/src/gui/workerthread.cpp +++ b/src/gui/workerthread.cpp @@ -58,182 +58,106 @@ WorkerThread::WorkerThread(MainWindow *p_main_window) #if QT_VERSION >= 0x050000 // Qt5 code // worker message - connect(_p_work_monitor, - &WorkMonitor::workerMessage, - p_main_window, + connect(_p_work_monitor, &WorkMonitor::workerMessage, p_main_window, &MainWindow::doDisplayLoadingMessage); - connect(_p_work_monitor, - &WorkMonitor::workerMessagePercent, - p_main_window, + connect(_p_work_monitor, &WorkMonitor::workerMessagePercent, p_main_window, &MainWindow::doDisplayLoadingMessagePercent); - connect(_p_work_monitor, - &WorkMonitor::workerAppendText, - p_main_window, + connect(_p_work_monitor, &WorkMonitor::workerAppendText, p_main_window, &MainWindow::doWorkerAppendText); - connect(_p_work_monitor, - &WorkMonitor::workerSetText, - p_main_window, + connect(_p_work_monitor, &WorkMonitor::workerSetText, p_main_window, &MainWindow::doWorkerSetText); - connect(_p_work_monitor, - &WorkMonitor::workerJobFinished, - p_main_window, + connect(_p_work_monitor, &WorkMonitor::workerJobFinished, p_main_window, &MainWindow::doDisplayJobFinished); - connect(p_main_window, - &MainWindow::operateXpipFile, - this, + connect(p_main_window, &MainWindow::operateXpipFile, this, &WorkerThread::doXpipFileLoad); - connect(p_main_window, - &MainWindow::operateWritingXpipFile, - this, + connect(p_main_window, &MainWindow::operateWritingXpipFile, this, &WorkerThread::doWritingXpipFile); - connect(this, - &WorkerThread::projectReady, - p_main_window, + connect(this, &WorkerThread::projectReady, p_main_window, &MainWindow::doProjectReady); - connect(this, - &WorkerThread::loadingResultsFinished, - p_main_window, + connect(this, &WorkerThread::loadingResultsFinished, p_main_window, &MainWindow::doLoadingResultsReady); - connect(p_main_window, - &MainWindow::operateLoadingResults, - this, + connect(p_main_window, &MainWindow::operateLoadingResults, this, &WorkerThread::doLoadingResults); - connect(p_main_window, - &MainWindow::operateRunningXtandem, - this, + connect(p_main_window, &MainWindow::operateRunningXtandem, this, &WorkerThread::doRunningXtandem); - connect(this, - &WorkerThread::loadingMessage, - p_main_window, + connect(this, &WorkerThread::loadingMessage, p_main_window, &MainWindow::doDisplayLoadingMessage); - connect(this, - &WorkerThread::projectNotReady, - p_main_window, + connect(this, &WorkerThread::projectNotReady, p_main_window, &MainWindow::doProjectNotReady); // grouping - connect(p_main_window, - &MainWindow::operateGrouping, - this, + connect(p_main_window, &MainWindow::operateGrouping, this, &WorkerThread::doGrouping); - connect(this, - &WorkerThread::groupingFinished, - p_main_window, + connect(this, &WorkerThread::groupingFinished, p_main_window, &MainWindow::doGroupingFinished); // masschroq write - connect(p_main_window, - &MainWindow::operateWritingMassChroqFile, - this, + connect(p_main_window, &MainWindow::operateWritingMassChroqFile, this, &WorkerThread::doWritingMassChroqFile); - connect(p_main_window, - &MainWindow::operateWritingMassChroqPrmFile, - this, + connect(p_main_window, &MainWindow::operateWritingMassChroqPrmFile, this, &WorkerThread::doWritingMassChroqPrmFile); - connect(p_main_window, - &MainWindow::operateWritingMcqrSpectralCountFile, - this, + connect(p_main_window, &MainWindow::operateWritingMcqrSpectralCountFile, this, &WorkerThread::doWritingMcqrSpectralCountFile); // protic write - connect(p_main_window, - &MainWindow::operateWritingProticFile, - this, + connect(p_main_window, &MainWindow::operateWritingProticFile, this, &WorkerThread::doWritingProticFile); // writing ODS file : - connect(p_main_window, - &MainWindow::operateWritingOdsFile, - this, + connect(p_main_window, &MainWindow::operateWritingOdsFile, this, &WorkerThread::doWritingOdsFile); - connect(this, - &WorkerThread::operationFailed, - p_main_window, + connect(this, &WorkerThread::operationFailed, p_main_window, &MainWindow::doOperationFailed); - connect(this, - &WorkerThread::operationFinished, - p_main_window, + connect(this, &WorkerThread::operationFinished, p_main_window, &MainWindow::doOperationFinished); // FASTA file write - connect(p_main_window, - &MainWindow::operateWritingFastaFile, - this, + connect(p_main_window, &MainWindow::operateWritingFastaFile, this, &WorkerThread::doWritingFastaFile); #else // Qt4 code // worker message - connect(_p_work_monitor, - SIGNAL(workerMessage(QString)), - p_main_window, + connect(_p_work_monitor, SIGNAL(workerMessage(QString)), p_main_window, SLOT(doDisplayLoadingMessage(QString))); - connect(_p_work_monitor, - SIGNAL(workerMessage(QString, int)), - p_main_window, + connect(_p_work_monitor, SIGNAL(workerMessage(QString, int)), p_main_window, SLOT(doDisplayLoadingMessage(QString, int))); - connect(_p_work_monitor, - SIGNAL(workerAppendText(char *)), - p_main_window, + connect(_p_work_monitor, SIGNAL(workerAppendText(char *)), p_main_window, SLOT(doWorkerAppendText(char *))); - connect(p_main_window, - SIGNAL(operateXpipFile(QString)), - this, + connect(p_main_window, SIGNAL(operateXpipFile(QString)), this, SLOT(doXpipFileLoad(QString))); - connect(this, - SIGNAL(projectReady(ProjectSp)), - p_main_window, + connect(this, SIGNAL(projectReady(ProjectSp)), p_main_window, SLOT(doProjectReady(ProjectSp))); connect( p_main_window, SIGNAL(operateLoadingResults(bool, AutomaticFilterParameters, QStringList)), - this, - SLOT(doLoadingResults(bool, AutomaticFilterParameters, QStringList))); + this, SLOT(doLoadingResults(bool, AutomaticFilterParameters, QStringList))); - connect(p_main_window, - SIGNAL(operateRunningXtandem(TandemRunBatch)), - this, + connect(p_main_window, SIGNAL(operateRunningXtandem(TandemRunBatch)), this, SLOT(doRunningXtandem(TandemRunBatch))); - connect(this, - SIGNAL(loadingMessage(QString)), - p_main_window, + connect(this, SIGNAL(loadingMessage(QString)), p_main_window, SLOT(doDisplayLoadingMessage(QString))); - connect(this, - SIGNAL(projectNotReady(QString)), - p_main_window, + connect(this, SIGNAL(projectNotReady(QString)), p_main_window, SLOT(doProjectNotReady(QString))); // grouping - connect(p_main_window, - SIGNAL(operateGrouping(ProjectSp)), - this, + connect(p_main_window, SIGNAL(operateGrouping(ProjectSp)), this, SLOT(doGrouping(ProjectSp))); - connect(this, - SIGNAL(groupingFinished()), - p_main_window, + connect(this, SIGNAL(groupingFinished()), p_main_window, SLOT(doGroupingFinished())); // masschroq write connect(p_main_window, - SIGNAL(operateWritingMassChroqFile(QString, ProjectSp)), - this, + SIGNAL(operateWritingMassChroqFile(QString, ProjectSp)), this, SLOT(doWritingMassChroqFile(QString, ProjectSp))); // protic write - connect(p_main_window, - SIGNAL(operateWritingProticFile(QString, ProjectSp)), - this, - SLOT(doWritingProticFile(QString, ProjectSp))); + connect(p_main_window, SIGNAL(operateWritingProticFile(QString, ProjectSp)), + this, SLOT(doWritingProticFile(QString, ProjectSp))); // writing ODS file : - connect(p_main_window, - SIGNAL(operateWritingOdsFile(QString, ProjectSp)), - this, - SLOT(doWritingOdsFile(QString, ProjectSp))); - connect(this, - SIGNAL(operationFailed(QString)), - p_main_window, + connect(p_main_window, SIGNAL(operateWritingOdsFile(QString, ProjectSp)), + this, SLOT(doWritingOdsFile(QString, ProjectSp))); + connect(this, SIGNAL(operationFailed(QString)), p_main_window, SLOT(doOperationFailed(QString))); - connect(this, - SIGNAL(operationFinished()), - p_main_window, + connect(this, SIGNAL(operationFinished()), p_main_window, SLOT(doOperationFinished())); #endif @@ -250,56 +174,34 @@ WorkerThread::WorkerThread(ProjectWindow *p_project_window) // Qt5 code // worker message - connect(_p_work_monitor, - &WorkMonitor::workerMessage, - p_project_window, + connect(_p_work_monitor, &WorkMonitor::workerMessage, p_project_window, &ProjectWindow::doDisplayLoadingMessage); - connect(_p_work_monitor, - &WorkMonitor::workerMessagePercent, - p_project_window, + connect(_p_work_monitor, &WorkMonitor::workerMessagePercent, p_project_window, &ProjectWindow::doDisplayLoadingMessagePercent); - connect(this, - &WorkerThread::loadingMessage, - p_project_window, + connect(this, &WorkerThread::loadingMessage, p_project_window, &ProjectWindow::doDisplayLoadingMessage); // grouping - connect(p_project_window, - &ProjectWindow::operateGrouping, - this, + connect(p_project_window, &ProjectWindow::operateGrouping, this, &WorkerThread::doGrouping); - connect(this, - &WorkerThread::groupingFinished, - p_project_window, + connect(this, &WorkerThread::groupingFinished, p_project_window, &ProjectWindow::doGroupingFinished); // PTM grouping on IdentificationGroup - connect(p_project_window, - &ProjectWindow::operatePtmGroupingOnIdentification, - this, - &WorkerThread::doPtmGroupingOnIdentification); - connect(this, - &WorkerThread::ptmGroupingOnIdentificationFinished, - p_project_window, - &ProjectWindow::refreshPtmGroup); + connect(p_project_window, &ProjectWindow::operatePtmGroupingOnIdentification, + this, &WorkerThread::doPtmGroupingOnIdentification); + connect(this, &WorkerThread::ptmGroupingOnIdentificationFinished, + p_project_window, &ProjectWindow::refreshPtmGroup); // grouping on IdentificationGroup - connect(p_project_window, - &ProjectWindow::operateGroupingOnIdentification, - this, - &WorkerThread::doGroupingOnIdentification); - connect(this, - &WorkerThread::groupingOnIdentificationFinished, - p_project_window, - &ProjectWindow::refreshGroup); + connect(p_project_window, &ProjectWindow::operateGroupingOnIdentification, + this, &WorkerThread::doGroupingOnIdentification); + connect(this, &WorkerThread::groupingOnIdentificationFinished, + p_project_window, &ProjectWindow::refreshGroup); - connect(this, - &WorkerThread::operationFailed, - p_project_window, + connect(this, &WorkerThread::operationFailed, p_project_window, &ProjectWindow::doOperationFailed); - connect(this, - &WorkerThread::operationFinished, - p_project_window, + connect(this, &WorkerThread::operationFinished, p_project_window, &ProjectWindow::doOperationFinished); #else @@ -307,39 +209,27 @@ WorkerThread::WorkerThread(ProjectWindow *p_project_window) qDebug() << __FILE__ << " " << __FUNCTION__ << " " << __LINE__; // worker message - connect(_p_work_monitor, - SIGNAL(workerMessage(QString)), - p_project_window, + connect(_p_work_monitor, SIGNAL(workerMessage(QString)), p_project_window, SLOT(doDisplayLoadingMessage(QString))); - connect(_p_work_monitor, - SIGNAL(workerMessage(QString, int)), - p_project_window, - SLOT(doDisplayLoadingMessage(QString, int))); + connect(_p_work_monitor, SIGNAL(workerMessage(QString, int)), + p_project_window, SLOT(doDisplayLoadingMessage(QString, int))); - connect(this, - SIGNAL(loadingMessage(QString)), - p_project_window, + connect(this, SIGNAL(loadingMessage(QString)), p_project_window, SLOT(doDisplayLoadingMessage(QString))); // grouping - connect(p_project_window, - SIGNAL(operateGrouping(ProjectSp)), - this, + connect(p_project_window, SIGNAL(operateGrouping(ProjectSp)), this, SLOT(doGrouping(ProjectSp))); - connect(this, - SIGNAL(groupingFinished()), - p_project_window, + connect(this, SIGNAL(groupingFinished()), p_project_window, SLOT(doGroupingFinished())); // PTM grouping on IdentificationGroup connect(p_project_window, SIGNAL(operatePtmGroupingOnIdentification(IdentificationGroup *)), - this, - SLOT(doPtmGroupingOnIdentification(IdentificationGroup *))); + this, SLOT(doPtmGroupingOnIdentification(IdentificationGroup *))); connect(this, SIGNAL(ptmGroupingOnIdentificationFinished(IdentificationGroup *)), - p_project_window, - SLOT(refreshPtmGroup(IdentificationGroup *))); + p_project_window, SLOT(refreshPtmGroup(IdentificationGroup *))); // grouping on IdentificationGroup connect( @@ -348,18 +238,12 @@ WorkerThread::WorkerThread(ProjectWindow *p_project_window) operateGroupingOnIdentification(IdentificationGroup *, GroupingType)), this, SLOT(doGroupingOnIdentification(IdentificationGroup *, GroupingType))); - connect(this, - SIGNAL(groupingOnIdentificationFinished(IdentificationGroup *)), - p_project_window, - SLOT(refreshGroup(IdentificationGroup *))); + connect(this, SIGNAL(groupingOnIdentificationFinished(IdentificationGroup *)), + p_project_window, SLOT(refreshGroup(IdentificationGroup *))); - connect(this, - SIGNAL(operationFailed(QString)), - p_project_window, + connect(this, SIGNAL(operationFailed(QString)), p_project_window, SLOT(doOperationFailed(QString))); - connect(this, - SIGNAL(operationFinished()), - p_project_window, + connect(this, SIGNAL(operationFinished()), p_project_window, SLOT(doOperationFinished())); #endif @@ -511,8 +395,7 @@ WorkerThread::doWritingXpipFile(QString filename, ProjectSp project_sp) } } void -WorkerThread::doWritingOdsFile(QString filename, - QString format, +WorkerThread::doWritingOdsFile(QString filename, QString format, ProjectSp project_sp) { @@ -547,8 +430,7 @@ WorkerThread::doWritingOdsFile(QString filename, void -WorkerThread::doWritingMassChroqFile(QString filename, - ProjectSp project_sp, +WorkerThread::doWritingMassChroqFile(QString filename, ProjectSp project_sp, MasschroqFileParameters params) { @@ -716,14 +598,14 @@ WorkerThread::doRunningXtandem(TandemRunBatch tandem_run_batch) if(use_htcondor) { - TandemCondorProcess xt_process( - _p_main_window, _p_work_monitor, tandem_run_batch); + TandemCondorProcess xt_process(_p_main_window, _p_work_monitor, + tandem_run_batch); xt_process.run(); } else { - TandemBatchProcess xt_process( - _p_main_window, _p_work_monitor, tandem_run_batch); + TandemBatchProcess xt_process(_p_main_window, _p_work_monitor, + tandem_run_batch); xt_process.run(); } @@ -741,8 +623,7 @@ WorkerThread::doRunningXtandem(TandemRunBatch tandem_run_batch) void -WorkerThread::doWritingFastaFile(QString filename, - ProjectSp project_sp, +WorkerThread::doWritingFastaFile(QString filename, ProjectSp project_sp, ExportFastaType type) { diff --git a/src/gui/workerthread.h b/src/gui/workerthread.h index 42c9ced2e82c03f37227e61f0de5b7aaf60893d5..3929b9d2f0015a4842d1d810e14895211d6c1255 100644 --- a/src/gui/workerthread.h +++ b/src/gui/workerthread.h @@ -57,19 +57,16 @@ class WorkerThread : public QObject public slots: void doXpipFileLoad(QString filename); - void doLoadingResults(bool is_individual, - AutomaticFilterParameters param, + void doLoadingResults(bool is_individual, AutomaticFilterParameters param, QStringList file_list); void doWritingXpipFile(QString filename, ProjectSp project_sp); void doWritingOdsFile(QString filename, QString format, ProjectSp project_sp); - void doWritingMassChroqFile(QString filename, - ProjectSp project_sp, + void doWritingMassChroqFile(QString filename, ProjectSp project_sp, MasschroqFileParameters params); void doWritingMassChroqPrmFile(QString filename, ProjectSp project_sp); void doWritingProticFile(QString filename, ProjectSp project_sp); void doWritingMcqrSpectralCountFile(QString filename, ProjectSp project_sp); - void doWritingFastaFile(QString filename, - ProjectSp project_sp, + void doWritingFastaFile(QString filename, ProjectSp project_sp, ExportFastaType type); void doGrouping(ProjectSp project_sp); void doGroupingOnIdentification(IdentificationGroup *p_identification_group, diff --git a/src/gui/xic_view/xic_box/xicbox.cpp b/src/gui/xic_view/xic_box/xicbox.cpp index 070f061dbd5f3f2970114a540e88a8b35cde0d84..efd25ee93eb1659e0e898b0c66b6364e28693592 100644 --- a/src/gui/xic_view/xic_box/xicbox.cpp +++ b/src/gui/xic_view/xic_box/xicbox.cpp @@ -139,17 +139,13 @@ XicBox::XicBox(XicWindow *parent) : QWidget(parent), ui(new Ui::XicBox) connect(p_worker, &XicWorkerThread::operationFailed, this, &XicBox::error); - connect(this, - &XicBox::computeIsotopeMassList, - p_worker, + connect(this, &XicBox::computeIsotopeMassList, p_worker, &XicWorkerThread::doComputeIsotopeMassList); - connect(p_worker, - &XicWorkerThread::isotopeMassListComputed, - this, + connect(p_worker, &XicWorkerThread::isotopeMassListComputed, this, &XicBox::setIsotopeMassList); - connect( - _p_xic_window, &XicWindow::reExtractXicNeeded, this, &XicBox::reExtractXic); + connect(_p_xic_window, &XicWindow::reExtractXicNeeded, this, + &XicBox::reExtractXic); /* connect(ui->xic_widget, qOverload<std::vector<std::pair<pappso::XicCstSPtr, pappso::XicPeakSp>>>( &pappso::XicWidget::xicPeakListChanged), this, @@ -160,9 +156,7 @@ XicBox::XicBox(XicWindow *parent) : QWidget(parent), ui(new Ui::XicBox) this, &XicBox::onXicWidgetClick); */ - connect(_p_xic_window, - &XicWindow::rtUnitChangeNeeded, - this, + connect(_p_xic_window, &XicWindow::rtUnitChangeNeeded, this, &XicBox::onRtUnitChanged); #else // Qt4 code @@ -270,15 +264,13 @@ XicBox::setPeptideEvidence(const PeptideEvidence *p_peptide_evidence) _p_xic_window->getProjectWindow() ->getProjectP() ->getSameXicPeptideEvidenceList( - _peptide_evidence_list, - _msrun_sp.get(), + _peptide_evidence_list, _msrun_sp.get(), _p_peptide_evidence->getPeptideXtpSp().get(), _p_peptide_evidence->getCharge()); emit computeIsotopeMassList(_p_peptide_evidence->getPeptideXtpSp(), _p_peptide_evidence->getCharge(), - _p_xic_window->getXicExtractPrecision(), - 0.8); + _p_xic_window->getXicExtractPrecision(), 0.8); } void @@ -303,8 +295,7 @@ XicBox::setPeptideEvidenceInMsRun(const PeptideEvidence *p_peptide_evidence, _p_xic_window->getProjectWindow() ->getProjectP() ->getSameXicPeptideEvidenceList( - _peptide_evidence_list, - _msrun_sp.get(), + _peptide_evidence_list, _msrun_sp.get(), _p_peptide_evidence->getPeptideXtpSp().get(), _p_peptide_evidence->getCharge()); //_p_xic_window->getProjectWindow()->getProjectP()->getSameXicPeptideEvidenceList(p_peptide_evidence, @@ -312,8 +303,7 @@ XicBox::setPeptideEvidenceInMsRun(const PeptideEvidence *p_peptide_evidence, emit computeIsotopeMassList(_p_peptide_evidence->getPeptideXtpSp(), _p_peptide_evidence->getCharge(), - _p_xic_window->getXicExtractPrecision(), - 0.8); + _p_xic_window->getXicExtractPrecision(), 0.8); } void @@ -506,9 +496,7 @@ XicBox::setIsotopeMassList( {nullptr, natural_isotope_average, nullptr, nullptr}); } - emit loadXic(_msrun_sp, - mass_list, - _p_xic_window->getXicExtractPrecision(), + emit loadXic(_msrun_sp, mass_list, _p_xic_window->getXicExtractPrecision(), pappso::XicExtractMethod::max); // histogram @@ -582,9 +570,7 @@ XicBox::reExtractXic() mass_list.push_back( xic_isotope.peptide_natural_isotope_sp.get()->getMz()); } - emit loadXic(_msrun_sp, - mass_list, - _p_xic_window->getXicExtractPrecision(), + emit loadXic(_msrun_sp, mass_list, _p_xic_window->getXicExtractPrecision(), pappso::XicExtractMethod::max); qDebug() << "XicBox::reExtractXic end"; } @@ -597,7 +583,8 @@ XicBox::setRetentionTime(double rt) } void XicBox::setXicPeakList( - std::vector<std::pair<pappso::XicCstSPtr, pappso::XicPeakCstSPtr>> xic_peak_list) + std::vector<std::pair<pappso::XicCstSPtr, pappso::XicPeakCstSPtr>> + xic_peak_list) { qDebug() << "XicBox::setXicPeakList begin"; QString html; diff --git a/src/gui/xic_view/xic_box/xicbox.h b/src/gui/xic_view/xic_box/xicbox.h index b7acc1f17ddb35c369728bcff7df72265d495bdc..7c8fb86e2b664ef4d01819d0903880530db592ef 100644 --- a/src/gui/xic_view/xic_box/xicbox.h +++ b/src/gui/xic_view/xic_box/xicbox.h @@ -40,7 +40,7 @@ namespace Ui { -class XicBox; + class XicBox; } @@ -67,12 +67,9 @@ class XicBox : public QWidget MsRunSp msrun_sp); signals: - void loadXic(MsRunSp p_msrun, - std::vector<pappso::pappso_double> mz_list, - pappso::PrecisionPtr precision, - pappso::XicExtractMethod method); - void computeIsotopeMassList(pappso::PeptideSp peptide_sp, - unsigned int charge, + void loadXic(MsRunSp p_msrun, std::vector<pappso::pappso_double> mz_list, + pappso::PrecisionPtr precision, pappso::XicExtractMethod method); + void computeIsotopeMassList(pappso::PeptideSp peptide_sp, unsigned int charge, pappso::PrecisionPtr precision, double minimum_isotope_pattern_ratio); private slots: diff --git a/src/gui/xic_view/xic_widgets/zivywidget.h b/src/gui/xic_view/xic_widgets/zivywidget.h index bc48fe3fc7336a65ede8be7fdb1e3076d2ea920b..86d507b5c192c936b0565802351e4e33a42bfc71 100644 --- a/src/gui/xic_view/xic_widgets/zivywidget.h +++ b/src/gui/xic_view/xic_widgets/zivywidget.h @@ -34,7 +34,7 @@ namespace Ui { -class ZivyWidget; + class ZivyWidget; } diff --git a/src/gui/xic_view/xicwindow.cpp b/src/gui/xic_view/xicwindow.cpp index e4ea183905fe3289721c139b6271f5e1a4f38a1f..51cf71c93d8eac0263b6f46f10410aee5c677d24 100644 --- a/src/gui/xic_view/xicwindow.cpp +++ b/src/gui/xic_view/xicwindow.cpp @@ -57,9 +57,7 @@ XicWindow::XicWindow(ProjectWindow *parent) _p_zivy_dialog->setZivyParams(zivy_params); - connect(_p_zivy_dialog, - &ZivyDialog::accepted, - this, + connect(_p_zivy_dialog, &ZivyDialog::accepted, this, &XicWindow::doAcceptedZivyDialog); #if QT_VERSION >= 0x050000 diff --git a/src/gui/xic_view/xicwindow.h b/src/gui/xic_view/xicwindow.h index a83ae03b3228be55fdb7fffe724c53effd6e2636..22d49a1c2ca3cedb4b2e1d27c651d5326cb5500f 100644 --- a/src/gui/xic_view/xicwindow.h +++ b/src/gui/xic_view/xicwindow.h @@ -43,7 +43,7 @@ class ProjectWindow; namespace Ui { -class XicWindow; + class XicWindow; } class XicBox; diff --git a/src/gui/xic_view/xicworkerthread.cpp b/src/gui/xic_view/xicworkerthread.cpp index 6aef044af1398066aa06efc8d76707c7d5935aeb..6c636f40c0a67773f4a53b5f8fe1cd47d91097b5 100644 --- a/src/gui/xic_view/xicworkerthread.cpp +++ b/src/gui/xic_view/xicworkerthread.cpp @@ -98,8 +98,7 @@ XicWorkerThread::doComputeIsotopeMassList(pappso::PeptideSp peptide_sp, isotope_mass_list = isotope_list.getByIntensityRatio( charge, precision, minimum_isotope_pattern_ratio); - std::sort(isotope_mass_list.begin(), - isotope_mass_list.end(), + std::sort(isotope_mass_list.begin(), isotope_mass_list.end(), [](const pappso::PeptideNaturalIsotopeAverageSp &m, const pappso::PeptideNaturalIsotopeAverageSp &n) -> bool { unsigned int mn(m.get()->getIsotopeNumber()), diff --git a/src/gui/xic_view/xicworkerthread.h b/src/gui/xic_view/xicworkerthread.h index bb9cffb8ef63aee3c929713539295818358c7527..2bb662fb04f0e74b653694dc1ae41f5875a0b093 100644 --- a/src/gui/xic_view/xicworkerthread.h +++ b/src/gui/xic_view/xicworkerthread.h @@ -43,8 +43,7 @@ class XicWorkerThread : public QObject XicWorkerThread(XicBox *parent); virtual ~XicWorkerThread(); public slots: - void doXicLoad(MsRunSp p_msrun, - std::vector<pappso::pappso_double> mz_list, + void doXicLoad(MsRunSp p_msrun, std::vector<pappso::pappso_double> mz_list, pappso::PrecisionPtr precision, pappso::XicExtractMethod method); void doComputeIsotopeMassList(pappso::PeptideSp peptide_sp, diff --git a/src/input/condorqxmlsaxhandler.cpp b/src/input/condorqxmlsaxhandler.cpp index 726e9b8b6f14625cc9aa756261bc6763cfb2eb6b..0b7081d3794435b5d0297cdc249768636bedc0be 100644 --- a/src/input/condorqxmlsaxhandler.cpp +++ b/src/input/condorqxmlsaxhandler.cpp @@ -72,18 +72,16 @@ CondorQxmlSaxHandler::startElement(const QString &namespaceURI, } catch(pappso::PappsoException exception_pappso) { - _errorStr = QObject::tr( - "ERROR in CondorQxmlSaxHandler::startElement tag " - "%1, PAPPSO exception:\n%2") + _errorStr = QObject::tr("ERROR in CondorQxmlSaxHandler::startElement tag " + "%1, PAPPSO exception:\n%2") .arg(qName) .arg(exception_pappso.qwhat()); return false; } catch(std::exception exception_std) { - _errorStr = QObject::tr( - "ERROR in CondorQxmlSaxHandler::startElement tag " - "%1, std exception:\n%2") + _errorStr = QObject::tr("ERROR in CondorQxmlSaxHandler::startElement tag " + "%1, std exception:\n%2") .arg(qName) .arg(exception_std.what()); return false; @@ -93,8 +91,7 @@ CondorQxmlSaxHandler::startElement(const QString &namespaceURI, bool CondorQxmlSaxHandler::endElement(const QString &namespaceURI, - const QString &localName, - const QString &qName) + const QString &localName, const QString &qName) { bool is_ok = true; @@ -121,18 +118,16 @@ CondorQxmlSaxHandler::endElement(const QString &namespaceURI, } catch(pappso::PappsoException exception_pappso) { - _errorStr = QObject::tr( - "ERROR in CondorQxmlSaxHandler::endElement tag " - "%1, PAPPSO exception:\n%2") + _errorStr = QObject::tr("ERROR in CondorQxmlSaxHandler::endElement tag " + "%1, PAPPSO exception:\n%2") .arg(qName) .arg(exception_pappso.qwhat()); return false; } catch(std::exception exception_std) { - _errorStr = QObject::tr( - "ERROR in CondorQxmlSaxHandler::endElement tag " - "%1, std exception:\n%2") + _errorStr = QObject::tr("ERROR in CondorQxmlSaxHandler::endElement tag " + "%1, std exception:\n%2") .arg(qName) .arg(exception_std.what()); return false; @@ -148,9 +143,8 @@ CondorQxmlSaxHandler::endElement(const QString &namespaceURI, bool CondorQxmlSaxHandler::error(const QXmlParseException &exception) { - _errorStr = QObject::tr( - "Parse error at line %1, column %2 :\n" - "%3") + _errorStr = QObject::tr("Parse error at line %1, column %2 :\n" + "%3") .arg(exception.lineNumber()) .arg(exception.columnNumber()) .arg(exception.message()); @@ -162,9 +156,8 @@ CondorQxmlSaxHandler::error(const QXmlParseException &exception) bool CondorQxmlSaxHandler::fatalError(const QXmlParseException &exception) { - _errorStr = QObject::tr( - "Parse error at line %1, column %2 :\n" - "%3") + _errorStr = QObject::tr("Parse error at line %1, column %2 :\n" + "%3") .arg(exception.lineNumber()) .arg(exception.columnNumber()) .arg(exception.message()); diff --git a/src/input/condorqxmlsaxhandler.h b/src/input/condorqxmlsaxhandler.h index 9b2e05b9f18e60373a3e25cb0175874c06b02778..4fd269c619fbc50a0cead5d997c9ec4688816fe6 100644 --- a/src/input/condorqxmlsaxhandler.h +++ b/src/input/condorqxmlsaxhandler.h @@ -55,13 +55,10 @@ class CondorQxmlSaxHandler : public QXmlDefaultHandler CondorQxmlSaxHandler(TandemCondorProcess *tandem_condor_process); ~CondorQxmlSaxHandler(); - bool startElement(const QString &namespaceURI, - const QString &localName, - const QString &qName, - const QXmlAttributes &attributes); + bool startElement(const QString &namespaceURI, const QString &localName, + const QString &qName, const QXmlAttributes &attributes); - bool endElement(const QString &namespaceURI, - const QString &localName, + bool endElement(const QString &namespaceURI, const QString &localName, const QString &qName); bool startDocument(); diff --git a/src/input/identificationpwizreader.cpp b/src/input/identificationpwizreader.cpp index 73b854753f830fa82c465ba0b2eca6d5dd475f66..9cc1dafc62a95eb59c73597dedcf2e8368332edf 100644 --- a/src/input/identificationpwizreader.cpp +++ b/src/input/identificationpwizreader.cpp @@ -252,8 +252,7 @@ getQVariantDoubleParam(pwiz::data::ParamContainer *item, pwiz::cv::CVID param) void IdentificationPwizReader::read( - IdentificationDataSource *p_identification_data_source, - Project *p_project, + IdentificationDataSource *p_identification_data_source, Project *p_project, IdentificationGroup *p_identification_group) { qDebug() << "IdentificationPwizReader::read begin"; diff --git a/src/input/identificationpwizreader.h b/src/input/identificationpwizreader.h index 7ed1fde50bd9ee5fbc7d821bddc35652d02a8e37..4738d65f668345c032277e8bbcc3090786ad65f6 100644 --- a/src/input/identificationpwizreader.h +++ b/src/input/identificationpwizreader.h @@ -42,10 +42,10 @@ namespace pwiz { -namespace identdata -{ - class IdentDataFile; -} + namespace identdata + { + class IdentDataFile; + } } // namespace pwiz class IdentificationPwizReader @@ -57,8 +57,7 @@ class IdentificationPwizReader IdentificationEngine getIdentificationEngine() const; void read(IdentificationDataSource *p_identification_data_source, - Project *p_project, - IdentificationGroup *p_identification_group); + Project *p_project, IdentificationGroup *p_identification_group); private: IdentificationEngine getIdentificationEngine(const QString &xml_id) const; diff --git a/src/input/mascot/mascotdatparser.cpp b/src/input/mascot/mascotdatparser.cpp index eb4e5c8dc00e53a594ef4dcf2ce05d72c6586865..e0ea73b2a1f98beefdfcc4b9ea29ccc3c4737b9d 100644 --- a/src/input/mascot/mascotdatparser.cpp +++ b/src/input/mascot/mascotdatparser.cpp @@ -38,8 +38,7 @@ #include "../../core/peptideevidence.h" MascotDatParser::MascotDatParser( - Project *p_project, - IdentificationGroup *p_identification_group, + Project *p_project, IdentificationGroup *p_identification_group, IdentificationDataSource *p_identification_data_source) { _p_project = p_project; @@ -551,9 +550,8 @@ MascotDatParser::parsePeptidesLine(const QString &peptide_line) catch(pappso::PappsoException exception_pappso) { - _error_str = QObject::tr( - "ERROR in MascotDatParser::parsePeptidesLine " - "%1, PAPPSO exception:\n%2 near q%3_p%4") + _error_str = QObject::tr("ERROR in MascotDatParser::parsePeptidesLine " + "%1, PAPPSO exception:\n%2 near q%3_p%4") .arg(peptide_line) .arg(exception_pappso.qwhat()) .arg(_current_peptide.query_index) @@ -563,13 +561,13 @@ MascotDatParser::parsePeptidesLine(const QString &peptide_line) } catch(std::exception exception_std) { - _error_str = QObject::tr( - "ERROR in MascotDatParser::parsePeptidesLine %1, std " - "exception:\n%2 near q%3_p%4") - .arg(peptide_line) - .arg(exception_std.what()) - .arg(_current_peptide.query_index) - .arg(_current_peptide.peptide_index); + _error_str = + QObject::tr("ERROR in MascotDatParser::parsePeptidesLine %1, std " + "exception:\n%2 near q%3_p%4") + .arg(peptide_line) + .arg(exception_std.what()) + .arg(_current_peptide.query_index) + .arg(_current_peptide.peptide_index); qDebug() << _error_str; throw pappso::PappsoException(_error_str); } @@ -639,11 +637,11 @@ MascotDatParser::parseQueryLine(const QString &query_line) catch(pappso::PappsoException exception_pappso) { - _error_str = QObject::tr( - "ERROR in MascotDatParser::parseQueryLine %1, PAPPSO " - "exception:\n%2") - .arg(query_line) - .arg(exception_pappso.qwhat()); + _error_str = + QObject::tr("ERROR in MascotDatParser::parseQueryLine %1, PAPPSO " + "exception:\n%2") + .arg(query_line) + .arg(exception_pappso.qwhat()); qDebug() << _error_str; throw pappso::PappsoException(_error_str); } @@ -848,15 +846,13 @@ MascotDatParser::savePeptideList(std::vector<PeptideLine> &peptide_list, { peptide_evidence.setEvalue(getEvalue( ion_score, - _decoy_summary_list.at(_current_query.query_index - 1), - 0.05)); + _decoy_summary_list.at(_current_query.query_index - 1), 0.05)); } else { - peptide_evidence.setEvalue( - getEvalue(ion_score, - _summary_list.at(_current_query.query_index - 1), - 0.05)); + peptide_evidence.setEvalue(getEvalue( + ion_score, _summary_list.at(_current_query.query_index - 1), + 0.05)); } peptide_evidence.setParam( @@ -988,18 +984,16 @@ MascotDatParser::savePeptideList(std::vector<PeptideLine> &peptide_list, catch(pappso::PappsoException exception_pappso) { - _error_str = QObject::tr( - "ERROR in MascotDatParser::savePeptideList " - " PAPPSO exception:\n%2") + _error_str = QObject::tr("ERROR in MascotDatParser::savePeptideList " + " PAPPSO exception:\n%2") .arg(exception_pappso.qwhat()); qDebug() << _error_str; throw pappso::PappsoException(_error_str); } catch(std::exception exception_std) { - _error_str = QObject::tr( - "ERROR in MascotDatParser::savePeptideList std " - "exception:\n%2") + _error_str = QObject::tr("ERROR in MascotDatParser::savePeptideList std " + "exception:\n%2") .arg(exception_std.what()); qDebug() << _error_str; throw pappso::PappsoException(_error_str); @@ -1025,8 +1019,7 @@ MascotDatParser::getEvalue(pappso::pappso_double ion_score, pappso::pappso_double MascotDatParser::getEvalueExperimental( - pappso::pappso_double ion_score, - SummaryLine &summary_line, + pappso::pappso_double ion_score, SummaryLine &summary_line, pappso::pappso_double confidence_interval) const { // Evalue experimental Homology threshold (QPlughole value from .dat file). diff --git a/src/input/mascot/mascotdatparser.h b/src/input/mascot/mascotdatparser.h index d34368738e1a5130f6a14205393e8c6a760f7742..3268d523aaa1c17ec2469c173d1bda25d2522515 100644 --- a/src/input/mascot/mascotdatparser.h +++ b/src/input/mascot/mascotdatparser.h @@ -89,8 +89,7 @@ class MascotDatParser }; void savePeptideList(std::vector<PeptideLine> &peptide_list, bool is_decoy); pappso::pappso_double - getEvalue(pappso::pappso_double ion_score, - SummaryLine &summary_line, + getEvalue(pappso::pappso_double ion_score, SummaryLine &summary_line, pappso::pappso_double confidence_interval = 0.05) const; pappso::pappso_double getEvalueExperimental(pappso::pappso_double ion_score, diff --git a/src/input/pepxmlsaxhandler.cpp b/src/input/pepxmlsaxhandler.cpp index bc0ad83d350152e342dda7c1249d7caf2240a82a..af6b1be03d7b127fa576f612a1bbe361d597d011 100644 --- a/src/input/pepxmlsaxhandler.cpp +++ b/src/input/pepxmlsaxhandler.cpp @@ -38,8 +38,7 @@ PepXmlSaxHandler::PepXmlSaxHandler( - Project *p_project, - IdentificationGroup *p_identification_group, + Project *p_project, IdentificationGroup *p_identification_group, IdentificationDataSource *p_identification_data_source) : _p_project(p_project) { @@ -56,8 +55,7 @@ PepXmlSaxHandler::~PepXmlSaxHandler() bool PepXmlSaxHandler::startElement(const QString &namespaceURI, - const QString &localName, - const QString &qName, + const QString &localName, const QString &qName, const QXmlAttributes &attributes) { // qDebug() << __FILE__ << " " << __FUNCTION__ << " " << __LINE__; @@ -130,9 +128,8 @@ PepXmlSaxHandler::startElement(const QString &namespaceURI, } catch(pappso::PappsoException exception_pappso) { - _errorStr = QObject::tr( - "ERROR in PepXmlSaxHandler::startElement tag " - "%1, PAPPSO exception:\n%2") + _errorStr = QObject::tr("ERROR in PepXmlSaxHandler::startElement tag " + "%1, PAPPSO exception:\n%2") .arg(qName) .arg(exception_pappso.qwhat()); return false; @@ -151,8 +148,7 @@ PepXmlSaxHandler::startElement(const QString &namespaceURI, bool PepXmlSaxHandler::endElement(const QString &namespaceURI, - const QString &localName, - const QString &qName) + const QString &localName, const QString &qName) { // qDebug() << __FILE__ << " " << __FUNCTION__ << " " << __LINE__; @@ -175,9 +171,8 @@ PepXmlSaxHandler::endElement(const QString &namespaceURI, } catch(pappso::PappsoException exception_pappso) { - _errorStr = QObject::tr( - "ERROR in PepXmlSaxHandler::endElement tag %1, " - "PAPPSO exception:\n%2") + _errorStr = QObject::tr("ERROR in PepXmlSaxHandler::endElement tag %1, " + "PAPPSO exception:\n%2") .arg(qName) .arg(exception_pappso.qwhat()); return false; @@ -309,10 +304,9 @@ PepXmlSaxHandler::startElement_spectrum_query(QXmlAttributes attributes) if(attributes.value("retention_time_sec").isEmpty()) { QString message = - QObject::tr( - "ERROR reading pepxml file :\n" - "unable to read search results from '%1' as retention time " - "is not given in spectrum_query elements") + QObject::tr("ERROR reading pepxml file :\n" + "unable to read search results from '%1' as retention time " + "is not given in spectrum_query elements") .arg(_current_search_engine); qDebug() << __FILE__ << " " << __FUNCTION__ << " " << __LINE__ << " " << message; @@ -332,7 +326,7 @@ PepXmlSaxHandler::startElement_spectrum_query(QXmlAttributes attributes) //<alternative_protein protein="sp|P46784|RS10B_YEAST" protein_descr="40S // ribosomal protein S10-B OS=Saccharomyces cerevisiae (strain ATCC 204508 -// \ +// \ //S288c) GN=RPS10B PE=1 SV=1" num_tol_term="2" peptide_prev_aa="K" // peptide_next_aa="N"/> bool @@ -696,9 +690,8 @@ PepXmlSaxHandler::endElement_modification_info() bool PepXmlSaxHandler::error(const QXmlParseException &exception) { - _errorStr = QObject::tr( - "Parse error at line %1, column %2 :\n" - "%3") + _errorStr = QObject::tr("Parse error at line %1, column %2 :\n" + "%3") .arg(exception.lineNumber()) .arg(exception.columnNumber()) .arg(exception.message()); @@ -710,9 +703,8 @@ PepXmlSaxHandler::error(const QXmlParseException &exception) bool PepXmlSaxHandler::fatalError(const QXmlParseException &exception) { - _errorStr = QObject::tr( - "Parse error at line %1, column %2 :\n" - "%3") + _errorStr = QObject::tr("Parse error at line %1, column %2 :\n" + "%3") .arg(exception.lineNumber()) .arg(exception.columnNumber()) .arg(exception.message()); diff --git a/src/input/pepxmlsaxhandler.h b/src/input/pepxmlsaxhandler.h index ac42d0184e479eb90c0d39c4e73382a084704aeb..8856408c83d1c7cec5d1c68b4ff8b009174f1f18 100644 --- a/src/input/pepxmlsaxhandler.h +++ b/src/input/pepxmlsaxhandler.h @@ -46,13 +46,10 @@ class PepXmlSaxHandler : public QXmlDefaultHandler IdentificationDataSource *p_identification_data_source); ~PepXmlSaxHandler(); - bool startElement(const QString &namespaceURI, - const QString &localName, - const QString &qName, - const QXmlAttributes &attributes); + bool startElement(const QString &namespaceURI, const QString &localName, + const QString &qName, const QXmlAttributes &attributes); - bool endElement(const QString &namespaceURI, - const QString &localName, + bool endElement(const QString &namespaceURI, const QString &localName, const QString &qName); bool startDocument(); diff --git a/src/input/xpipsaxhandler.cpp b/src/input/xpipsaxhandler.cpp index 275cc3d1d9121b11c105dc4f1322bc99dbc035bc..603ed25d58334aab2de0e9e32b581196d1bca93b 100644 --- a/src/input/xpipsaxhandler.cpp +++ b/src/input/xpipsaxhandler.cpp @@ -50,8 +50,7 @@ XpipSaxHandler::isJavaXpip() const bool XpipSaxHandler::startElement(const QString &namespaceURI, - const QString &localName, - const QString &qName, + const QString &localName, const QString &qName, const QXmlAttributes &attributes) { qDebug() << "XpipSaxHandler::startElement begin" << namespaceURI << " " @@ -138,8 +137,7 @@ XpipSaxHandler::startElement(const QString &namespaceURI, bool XpipSaxHandler::endElement(const QString &namespaceURI, - const QString &localName, - const QString &qName) + const QString &localName, const QString &qName) { bool is_ok = true; @@ -472,9 +470,8 @@ XpipSaxHandler::endElement_match() bool XpipSaxHandler::error(const QXmlParseException &exception) { - _errorStr = QObject::tr( - "Parse error at line %1, column %2 :\n" - "%3") + _errorStr = QObject::tr("Parse error at line %1, column %2 :\n" + "%3") .arg(exception.lineNumber()) .arg(exception.columnNumber()) .arg(exception.message()); @@ -486,9 +483,8 @@ XpipSaxHandler::error(const QXmlParseException &exception) bool XpipSaxHandler::fatalError(const QXmlParseException &exception) { - _errorStr = QObject::tr( - "Parse error at line %1, column %2 :\n" - "%3") + _errorStr = QObject::tr("Parse error at line %1, column %2 :\n" + "%3") .arg(exception.lineNumber()) .arg(exception.columnNumber()) .arg(exception.message()); diff --git a/src/input/xpipsaxhandler.h b/src/input/xpipsaxhandler.h index cc692ecd2c630c279acf064c25f988057fba1a26..4a4731c27345816c5e28809e3bdc743ed7cf3bc4 100644 --- a/src/input/xpipsaxhandler.h +++ b/src/input/xpipsaxhandler.h @@ -39,13 +39,10 @@ class XpipSaxHandler : public QXmlDefaultHandler XpipSaxHandler(WorkMonitorInterface *p_monitor, Project *p_project); ~XpipSaxHandler(); - bool startElement(const QString &namespaceURI, - const QString &localName, - const QString &qName, - const QXmlAttributes &attributes); + bool startElement(const QString &namespaceURI, const QString &localName, + const QString &qName, const QXmlAttributes &attributes); - bool endElement(const QString &namespaceURI, - const QString &localName, + bool endElement(const QString &namespaceURI, const QString &localName, const QString &qName); bool startDocument(); diff --git a/src/input/xtandemparamsaxhandler.cpp b/src/input/xtandemparamsaxhandler.cpp index 3d0e2f4374df4e946ea7efeda58d88d2214d74ab..08b9feed0efd9aa3ac6fa1b0126c0fa6ed2a75e7 100644 --- a/src/input/xtandemparamsaxhandler.cpp +++ b/src/input/xtandemparamsaxhandler.cpp @@ -67,10 +67,10 @@ XtandemParamSaxHandler::startElement(const QString &namespaceURI, { if(qName != "bioml") { - _errorStr = QObject::tr( - "ERROR in XtandemParamSaxHandler::startElement " + _errorStr = + QObject::tr("ERROR in XtandemParamSaxHandler::startElement " "root tag %1 is not <bioml>") - .arg(qName); + .arg(qName); return false; } } @@ -84,18 +84,16 @@ XtandemParamSaxHandler::startElement(const QString &namespaceURI, } catch(pappso::PappsoException exception_pappso) { - _errorStr = QObject::tr( - "ERROR in XtandemParamSaxHandler::startElement " - "tag %1, PAPPSO exception:\n%2") + _errorStr = QObject::tr("ERROR in XtandemParamSaxHandler::startElement " + "tag %1, PAPPSO exception:\n%2") .arg(qName) .arg(exception_pappso.qwhat()); return false; } catch(std::exception exception_std) { - _errorStr = QObject::tr( - "ERROR in XtandemParamSaxHandler::startElement " - "tag %1, std exception:\n%2") + _errorStr = QObject::tr("ERROR in XtandemParamSaxHandler::startElement " + "tag %1, std exception:\n%2") .arg(qName) .arg(exception_std.what()); return false; @@ -121,18 +119,16 @@ XtandemParamSaxHandler::endElement(const QString &namespaceURI, } catch(pappso::PappsoException exception_pappso) { - _errorStr = QObject::tr( - "ERROR in XtandemParamSaxHandler::endElement tag " - "%1, PAPPSO exception:\n%2") + _errorStr = QObject::tr("ERROR in XtandemParamSaxHandler::endElement tag " + "%1, PAPPSO exception:\n%2") .arg(qName) .arg(exception_pappso.qwhat()); return false; } catch(std::exception exception_std) { - _errorStr = QObject::tr( - "ERROR in XtandemParamSaxHandler::endElement tag " - "%1, std exception:\n%2") + _errorStr = QObject::tr("ERROR in XtandemParamSaxHandler::endElement tag " + "%1, std exception:\n%2") .arg(qName) .arg(exception_std.what()); return false; @@ -148,9 +144,8 @@ XtandemParamSaxHandler::endElement(const QString &namespaceURI, bool XtandemParamSaxHandler::error(const QXmlParseException &exception) { - _errorStr = QObject::tr( - "Parse error at line %1, column %2 :\n" - "%3") + _errorStr = QObject::tr("Parse error at line %1, column %2 :\n" + "%3") .arg(exception.lineNumber()) .arg(exception.columnNumber()) .arg(exception.message()); @@ -162,9 +157,8 @@ XtandemParamSaxHandler::error(const QXmlParseException &exception) bool XtandemParamSaxHandler::fatalError(const QXmlParseException &exception) { - _errorStr = QObject::tr( - "Parse error at line %1, column %2 :\n" - "%3") + _errorStr = QObject::tr("Parse error at line %1, column %2 :\n" + "%3") .arg(exception.lineNumber()) .arg(exception.columnNumber()) .arg(exception.message()); diff --git a/src/input/xtandemparamsaxhandler.h b/src/input/xtandemparamsaxhandler.h index f475174c9bdd5d15257c7ccd793d7e1b88c1b482..398f516ca4c03dd9551c99d7c9a6e5d7df30939f 100644 --- a/src/input/xtandemparamsaxhandler.h +++ b/src/input/xtandemparamsaxhandler.h @@ -41,13 +41,10 @@ class XtandemParamSaxHandler : public QXmlDefaultHandler XtandemParamSaxHandler(TandemParameters *p_tandem_parameters); ~XtandemParamSaxHandler(); - bool startElement(const QString &namespaceURI, - const QString &localName, - const QString &qName, - const QXmlAttributes &attributes); + bool startElement(const QString &namespaceURI, const QString &localName, + const QString &qName, const QXmlAttributes &attributes); - bool endElement(const QString &namespaceURI, - const QString &localName, + bool endElement(const QString &namespaceURI, const QString &localName, const QString &qName); bool startDocument(); diff --git a/src/input/xtandemsaxhandler.cpp b/src/input/xtandemsaxhandler.cpp index 30df3c4a805b47e9fc26fbc87a25aa835b0289d7..57b17071e31ba50749e20ec2597256a1b0d68f92 100644 --- a/src/input/xtandemsaxhandler.cpp +++ b/src/input/xtandemsaxhandler.cpp @@ -40,8 +40,7 @@ XtandemSaxHandler::XtandemSaxHandler( - Project *p_project, - IdentificationGroup *p_identification_group, + Project *p_project, IdentificationGroup *p_identification_group, IdentificationDataSource *p_identification_data_source) : _p_project(p_project) { @@ -58,8 +57,7 @@ XtandemSaxHandler::~XtandemSaxHandler() bool XtandemSaxHandler::startElement(const QString &namespaceURI, - const QString &localName, - const QString &qName, + const QString &localName, const QString &qName, const QXmlAttributes &attributes) { // qDebug() << namespaceURI << " " << localName << " " << qName ; @@ -98,9 +96,8 @@ XtandemSaxHandler::startElement(const QString &namespaceURI, } catch(pappso::PappsoException &exception_pappso) { - _errorStr = QObject::tr( - "ERROR in XtandemSaxHandler::startElement tag " - "%1, PAPPSO exception:\n%2") + _errorStr = QObject::tr("ERROR in XtandemSaxHandler::startElement tag " + "%1, PAPPSO exception:\n%2") .arg(qName) .arg(exception_pappso.qwhat()); return false; @@ -119,8 +116,7 @@ XtandemSaxHandler::startElement(const QString &namespaceURI, bool XtandemSaxHandler::endElement(const QString &namespaceURI, - const QString &localName, - const QString &qName) + const QString &localName, const QString &qName) { bool is_ok = true; @@ -142,9 +138,8 @@ XtandemSaxHandler::endElement(const QString &namespaceURI, } catch(pappso::PappsoException &exception_pappso) { - _errorStr = QObject::tr( - "ERROR in XtandemSaxHandler::endElement tag %1, " - "PAPPSO exception:\n%2") + _errorStr = QObject::tr("ERROR in XtandemSaxHandler::endElement tag %1, " + "PAPPSO exception:\n%2") .arg(qName) .arg(exception_pappso.qwhat()); return false; @@ -224,10 +219,9 @@ XtandemSaxHandler::startElement_file(QXmlAttributes attributes) // attrs.getValue("URL"))); if(_p_protein_match == nullptr) { - throw pappso::PappsoException( - "ERROR in " - "XtandemSaxHandler::startElement_file " - ": _p_protein_match == nullptr"); + throw pappso::PappsoException("ERROR in " + "XtandemSaxHandler::startElement_file " + ": _p_protein_match == nullptr"); } _p_protein_match->getProteinXtpSp().get()->setFastaFileP( _p_project->getFastaFileStore() @@ -257,10 +251,9 @@ XtandemSaxHandler::startElement_domain(QXmlAttributes attributes) //"")); if(_p_protein_match == nullptr) { - throw pappso::PappsoException( - "ERROR in " - "XtandemSaxHandler::startElement_" - "domain : _p_protein_match == nullptr"); + throw pappso::PappsoException("ERROR in " + "XtandemSaxHandler::startElement_" + "domain : _p_protein_match == nullptr"); } _p_protein_match->getProteinXtpSp().get()->setSequence(_current_text); @@ -422,10 +415,9 @@ XtandemSaxHandler::endElement_domain() .getInstance(_p_peptide_evidence)); if(_p_protein_match == nullptr) { - throw pappso::PappsoException( - "ERROR in " - "XtandemSaxHandler::endElement_domain : " - "_p_protein_match == nullptr"); + throw pappso::PappsoException("ERROR in " + "XtandemSaxHandler::endElement_domain : " + "_p_protein_match == nullptr"); } _p_protein_match->addPeptideMatch(_current_peptide_match); @@ -721,9 +713,8 @@ XtandemSaxHandler::endElement_note() bool XtandemSaxHandler::error(const QXmlParseException &exception) { - _errorStr = QObject::tr( - "Parse error at line %1, column %2 :\n" - "%3") + _errorStr = QObject::tr("Parse error at line %1, column %2 :\n" + "%3") .arg(exception.lineNumber()) .arg(exception.columnNumber()) .arg(exception.message()); @@ -735,9 +726,8 @@ XtandemSaxHandler::error(const QXmlParseException &exception) bool XtandemSaxHandler::fatalError(const QXmlParseException &exception) { - _errorStr = QObject::tr( - "Parse error at line %1, column %2 :\n" - "%3") + _errorStr = QObject::tr("Parse error at line %1, column %2 :\n" + "%3") .arg(exception.lineNumber()) .arg(exception.columnNumber()) .arg(exception.message()); diff --git a/src/input/xtandemsaxhandler.h b/src/input/xtandemsaxhandler.h index 75502f33fddeba4bf57174eb326761ad22f852fc..aa5bef914393fff6233b1a8225757724b35d384b 100644 --- a/src/input/xtandemsaxhandler.h +++ b/src/input/xtandemsaxhandler.h @@ -49,13 +49,10 @@ class XtandemSaxHandler : public QXmlDefaultHandler IdentificationDataSource *p_identification_data_source); ~XtandemSaxHandler(); - bool startElement(const QString &namespaceURI, - const QString &localName, - const QString &qName, - const QXmlAttributes &attributes); + bool startElement(const QString &namespaceURI, const QString &localName, + const QString &qName, const QXmlAttributes &attributes); - bool endElement(const QString &namespaceURI, - const QString &localName, + bool endElement(const QString &namespaceURI, const QString &localName, const QString &qName); bool startDocument(); diff --git a/src/input/xtpxpipsaxhandler.cpp b/src/input/xtpxpipsaxhandler.cpp index 7c006d9f193888ddaf596a0c9cf55f4b574a3e34..d577fd393c8f94d1baf0ad5cd725c305c84f116a 100644 --- a/src/input/xtpxpipsaxhandler.cpp +++ b/src/input/xtpxpipsaxhandler.cpp @@ -58,8 +58,7 @@ XtpXpipSaxHandler::isXtpXpip() const } bool XtpXpipSaxHandler::startElement(const QString &namespaceURI, - const QString &localName, - const QString &qName, + const QString &localName, const QString &qName, const QXmlAttributes &attributes) { qDebug() << "XtpXpipSaxHandler::startElement begin" << namespaceURI << " " @@ -196,9 +195,8 @@ XtpXpipSaxHandler::startElement(const QString &namespaceURI, } catch(pappso::PappsoException exception_pappso) { - _errorStr = QObject::tr( - "ERROR in XtpXpipSaxHandler::startElement tag " - "%1, PAPPSO exception:\n%2") + _errorStr = QObject::tr("ERROR in XtpXpipSaxHandler::startElement tag " + "%1, PAPPSO exception:\n%2") .arg(qName) .arg(exception_pappso.qwhat()); return false; @@ -217,8 +215,7 @@ XtpXpipSaxHandler::startElement(const QString &namespaceURI, bool XtpXpipSaxHandler::endElement(const QString &namespaceURI, - const QString &localName, - const QString &qName) + const QString &localName, const QString &qName) { qDebug() << "XtpXpipSaxHandler::endElement begin" << namespaceURI << " " @@ -270,9 +267,8 @@ XtpXpipSaxHandler::endElement(const QString &namespaceURI, } catch(pappso::PappsoException exception_pappso) { - _errorStr = QObject::tr( - "ERROR in XtpXpipSaxHandler::endElement tag %1, " - "PAPPSO exception:\n%2") + _errorStr = QObject::tr("ERROR in XtpXpipSaxHandler::endElement tag %1, " + "PAPPSO exception:\n%2") .arg(qName) .arg(exception_pappso.qwhat()); return false; @@ -868,9 +864,8 @@ XtpXpipSaxHandler::endElement_protein_match() bool XtpXpipSaxHandler::error(const QXmlParseException &exception) { - _errorStr = QObject::tr( - "Parse error at line %1, column %2 :\n" - "%3") + _errorStr = QObject::tr("Parse error at line %1, column %2 :\n" + "%3") .arg(exception.lineNumber()) .arg(exception.columnNumber()) .arg(exception.message()); @@ -882,9 +877,8 @@ XtpXpipSaxHandler::error(const QXmlParseException &exception) bool XtpXpipSaxHandler::fatalError(const QXmlParseException &exception) { - _errorStr = QObject::tr( - "Parse error at line %1, column %2 :\n" - "%3") + _errorStr = QObject::tr("Parse error at line %1, column %2 :\n" + "%3") .arg(exception.lineNumber()) .arg(exception.columnNumber()) .arg(exception.message()); diff --git a/src/input/xtpxpipsaxhandler.h b/src/input/xtpxpipsaxhandler.h index 1c595984d971894bac2b616513f53b7413aa2369..29f8767953cd2be02758081304c1080004e956a7 100644 --- a/src/input/xtpxpipsaxhandler.h +++ b/src/input/xtpxpipsaxhandler.h @@ -47,13 +47,10 @@ class XtpXpipSaxHandler : public QXmlDefaultHandler XtpXpipSaxHandler(WorkMonitorInterface *p_monitor, Project *p_project); ~XtpXpipSaxHandler(); - bool startElement(const QString &namespaceURI, - const QString &localName, - const QString &qName, - const QXmlAttributes &attributes); + bool startElement(const QString &namespaceURI, const QString &localName, + const QString &qName, const QXmlAttributes &attributes); - bool endElement(const QString &namespaceURI, - const QString &localName, + bool endElement(const QString &namespaceURI, const QString &localName, const QString &qName); bool startDocument(); diff --git a/src/output/exportfastafile.cpp b/src/output/exportfastafile.cpp index b64e010fec677584358a8e41725d5e3731dde1a3..b7a424e068fddf2587d26d40a6c765a63a397ef1 100644 --- a/src/output/exportfastafile.cpp +++ b/src/output/exportfastafile.cpp @@ -79,8 +79,7 @@ ExportFastaFile::writeIdentificationGroup( std::vector<const ProteinMatch *> protein_match_list = group_pair.second.get()->getProteinMatchList(); - std::sort(protein_match_list.begin(), - protein_match_list.end(), + std::sort(protein_match_list.begin(), protein_match_list.end(), [](const ProteinMatch *a, const ProteinMatch *b) { return a->getGrpProteinSp().get()->getGroupingId() < b->getGrpProteinSp().get()->getGroupingId(); diff --git a/src/output/masschroqml.cpp b/src/output/masschroqml.cpp index c23754a28c9769af23f4e12bd76536d6c09d172f..1b0a9e404e1abd58b35c42d2977e8c293d6a0f4c 100644 --- a/src/output/masschroqml.cpp +++ b/src/output/masschroqml.cpp @@ -231,9 +231,8 @@ MassChroQml::writeQuantificationTraces() _output_stream->writeStartElement("quantification_traces"); //<peptide_traces peptide_ids="pep0 pep1" output_dir="pep_traces" // format="tsv" /> - _output_stream->writeComment( - "<peptide_traces peptide_ids=\"pep0 pep1\" " - "output_dir=\"pep_traces\" format=\"tsv\" />"); + _output_stream->writeComment("<peptide_traces peptide_ids=\"pep0 pep1\" " + "output_dir=\"pep_traces\" format=\"tsv\" />"); /* <all_xics_traces output_dir="all_xics_traces" format="tsv" /> <mz_traces mz_values="634.635 449.754 552.234" output_dir="mz_traces" @@ -278,9 +277,8 @@ MassChroQml::writeQuantify() } _output_stream->writeEndElement(); - _output_stream->writeComment( - "<mz_list>732.317 449.754 552.234 464.251 " - "381.577 569.771 575.256</mz_list>"); + _output_stream->writeComment("<mz_list>732.317 449.754 552.234 464.251 " + "381.577 569.771 575.256</mz_list>"); _output_stream->writeComment( "<mzrt_list>\n <mzrt mz=\"732.317\" rt=\"230.712\" />\n <mzrt " "mz=\"575.256\" rt=\"254.788\" />\n </mzrt_list>"); @@ -505,8 +503,7 @@ MassChroQml::writePeptideListInGroup(const GroupingGroup *p_group) } // sort list - std::sort(mcq_peptide_list.begin(), - mcq_peptide_list.end(), + std::sort(mcq_peptide_list.begin(), mcq_peptide_list.end(), [](const McqPeptide &first, const McqPeptide &second) { return (first.id < second.id); }); @@ -592,8 +589,7 @@ MassChroQml::writePeptideListInGroup(const GroupingGroup *p_group) } //<observed_in data="samp0" scan="655" z="2" /> - std::sort(mcq_peptide.observed_in.begin(), - mcq_peptide.observed_in.end(), + std::sort(mcq_peptide.observed_in.begin(), mcq_peptide.observed_in.end(), [](const McqObserved &first, const McqObserved &second) { return std::tie(first.charge, first.scan, first.msrun) < std::tie(second.charge, second.scan, second.msrun); diff --git a/src/output/mcqr/mcqrscpeptide.cpp b/src/output/mcqr/mcqrscpeptide.cpp index 8d9bca9bd6982f71d1b9ad9a355925b4c3477d0d..a855c9dd6f5899ce94e8ce837c2f59a9d98b8978 100644 --- a/src/output/mcqr/mcqrscpeptide.cpp +++ b/src/output/mcqr/mcqrscpeptide.cpp @@ -98,8 +98,7 @@ McqRscPeptide::writeIdentificationGroup(IdentificationGroup *p_ident) std::vector<const ProteinMatch *> protein_match_list = group_pair.second.get()->getProteinMatchList(); - std::sort(protein_match_list.begin(), - protein_match_list.end(), + std::sort(protein_match_list.begin(), protein_match_list.end(), [](const ProteinMatch *a, const ProteinMatch *b) { return a->getGrpProteinSp().get()->getSubGroupNumber() < b->getGrpProteinSp().get()->getSubGroupNumber(); @@ -126,10 +125,8 @@ McqRscPeptide::writeIdentificationGroup(IdentificationGroup *p_ident) std::vector<PeptideMatch> peptide_match_in_msrun = protein_match->getPeptideMatchList(validation_state, msrun_sp.get()); - writePeptidesInMsrun(protein_match, - msrun_sp.get(), - peptide_match_in_msrun, - count_scan_zero); + writePeptidesInMsrun(protein_match, msrun_sp.get(), + peptide_match_in_msrun, count_scan_zero); } } } @@ -139,8 +136,7 @@ McqRscPeptide::writeIdentificationGroup(IdentificationGroup *p_ident) void McqRscPeptide::writePeptidesInMsrun( - const ProteinMatch *p_protein_match, - const MsRun *p_msrun, + const ProteinMatch *p_protein_match, const MsRun *p_msrun, const std::vector<PeptideMatch> &peptide_match_in_msrun, const std::map<ScPeptideLabel, std::size_t> &count_scan_zero) { @@ -198,8 +194,7 @@ McqRscPeptide::writePeptidesInMsrun( (unsigned int)p_protein_match->getGroupingGroupSp() .get() ->countSpecificSequenceLi(p_protein_match, - ValidationState::grouped, - p_msrun, + ValidationState::grouped, p_msrun, pair_count.first._p_label)); } qDebug() << "McqRscPeptide::writePeptidesInMsrun end"; diff --git a/src/output/mcqr/mcqrscpeptide.h b/src/output/mcqr/mcqrscpeptide.h index 76984f839e94d385041253fa6e4a3df75f511f3c..977a478fe17f0256b2e8449a19482b9a17b26dc9 100644 --- a/src/output/mcqr/mcqrscpeptide.h +++ b/src/output/mcqr/mcqrscpeptide.h @@ -55,8 +55,7 @@ class McqRscPeptide void writeIdentificationGroup(IdentificationGroup *p_ident); void writeHeaders(IdentificationGroup *p_ident); void writePeptidesInMsrun( - const ProteinMatch *p_protein_match, - const MsRun *p_msrun, + const ProteinMatch *p_protein_match, const MsRun *p_msrun, const std::vector<PeptideMatch> &peptide_match_in_msrun, const std::map<ScPeptideLabel, std::size_t> &count_scan_zero); diff --git a/src/output/mcqr/mcqrscprotein.cpp b/src/output/mcqr/mcqrscprotein.cpp index c6c34ce3c8212c6d5707f275f5364d16755e58ce..b77b4830c2fe473ac7351abeb13bdd746bd55c36 100644 --- a/src/output/mcqr/mcqrscprotein.cpp +++ b/src/output/mcqr/mcqrscprotein.cpp @@ -87,8 +87,7 @@ McqRscProtein::writeIdentificationGroup(IdentificationGroup *p_ident) std::vector<const ProteinMatch *> protein_match_list = group_pair.second.get()->getProteinMatchList(); - std::sort(protein_match_list.begin(), - protein_match_list.end(), + std::sort(protein_match_list.begin(), protein_match_list.end(), [](const ProteinMatch *a, const ProteinMatch *b) { return a->getGrpProteinSp().get()->getSubGroupNumber() < b->getGrpProteinSp().get()->getSubGroupNumber(); diff --git a/src/output/mcqrspectralcount.cpp b/src/output/mcqrspectralcount.cpp index 7821a23b0b98086a89ebe1ee4b90b611586f7d03..5f0346f4975e38205aab3bd6f1c7fdda2f771bac 100644 --- a/src/output/mcqrspectralcount.cpp +++ b/src/output/mcqrspectralcount.cpp @@ -102,8 +102,7 @@ McqrSpectralCount::writeIdentificationGroup(IdentificationGroup *p_ident) std::vector<const ProteinMatch *> protein_match_list = group_pair.second.get()->getProteinMatchList(); - std::sort(protein_match_list.begin(), - protein_match_list.end(), + std::sort(protein_match_list.begin(), protein_match_list.end(), [](const ProteinMatch *a, const ProteinMatch *b) { return a->getGrpProteinSp().get()->getSubGroupNumber() < b->getGrpProteinSp().get()->getSubGroupNumber(); @@ -140,21 +139,15 @@ McqrSpectralCount::writeOneProtein(const GroupingGroup *p_group, if(_label_list.size() == 0) { - writeOneProteinLabel(p_grp_protein, - msrun_sp.get(), - nullptr, - p_protein, - p_protein_match); + writeOneProteinLabel(p_grp_protein, msrun_sp.get(), nullptr, + p_protein, p_protein_match); } else { for(auto &p_label : _label_list) { - writeOneProteinLabel(p_grp_protein, - msrun_sp.get(), - p_label, - p_protein, - p_protein_match); + writeOneProteinLabel(p_grp_protein, msrun_sp.get(), p_label, + p_protein, p_protein_match); } } } @@ -201,9 +194,9 @@ McqrSpectralCount::writeOneProteinLabel(const pappso::GrpProtein *p_grp_protein, _p_writer->writeCell(p_protein_match->countSampleScan( ValidationState::grouped, p_msrun, p_label)); - _p_writer->writeCell( - (unsigned int)p_protein_match->getGroupingGroupSp() - .get() - ->countSpecificSampleScan( - p_protein_match, ValidationState::grouped, p_msrun, p_label)); + _p_writer->writeCell((unsigned int)p_protein_match->getGroupingGroupSp() + .get() + ->countSpecificSampleScan(p_protein_match, + ValidationState::grouped, + p_msrun, p_label)); } diff --git a/src/output/mcqrspectralcount.h b/src/output/mcqrspectralcount.h index d6a401335eb95da8519e77c5d3aa90e1f4de6b3d..bf26cfd836bb8eb8bd5ebb37f08c5ad7b4c5fc73 100644 --- a/src/output/mcqrspectralcount.h +++ b/src/output/mcqrspectralcount.h @@ -47,8 +47,7 @@ class McqrSpectralCount void writeOneProtein(const GroupingGroup *p_group, const ProteinMatch *p_protein_match); void writeOneProteinLabel(const pappso::GrpProtein *p_grp_protein, - const MsRun *p_msrun, - const Label *p_label, + const MsRun *p_msrun, const Label *p_label, const ProteinXtp *p_protein, const ProteinMatch *p_protein_match); diff --git a/src/output/ods/comparbasesheet.cpp b/src/output/ods/comparbasesheet.cpp index 3c7bfaa5533bc635701407f3559d173a051862d2..88e1115b2fe45d9f613207a81d6ab34f595388f2 100644 --- a/src/output/ods/comparbasesheet.cpp +++ b/src/output/ods/comparbasesheet.cpp @@ -164,8 +164,8 @@ ComparBaseSheet::writeProteinMatch(const ProteinMatch *p_protein_match) { if(_label_list.size() == 0) { - writeComparValue( - p_protein_match, ValidationState::validAndChecked, msrun_sp.get()); + writeComparValue(p_protein_match, ValidationState::validAndChecked, + msrun_sp.get()); if(_first_cell_coordinate.isEmpty()) { _first_cell_coordinate = _p_writer->getOdsCellCoordinate(); @@ -176,8 +176,7 @@ ComparBaseSheet::writeProteinMatch(const ProteinMatch *p_protein_match) for(const Label *p_label : _label_list) { writeComparValue(p_protein_match, - ValidationState::validAndChecked, - msrun_sp.get(), + ValidationState::validAndChecked, msrun_sp.get(), p_label); if(_first_cell_coordinate.isEmpty()) { @@ -212,8 +211,7 @@ ComparBaseSheet::writeIdentificationGroup(IdentificationGroup *p_ident) } std::sort( - protein_match_list.begin(), - protein_match_list.end(), + protein_match_list.begin(), protein_match_list.end(), [](const ProteinMatch *a, const ProteinMatch *b) { unsigned int agroup = a->getGrpProteinSp().get()->getGroupNumber(); unsigned int asubgroup = a->getGrpProteinSp().get()->getSubGroupNumber(); diff --git a/src/output/ods/comparbasesheet.h b/src/output/ods/comparbasesheet.h index c5871f865a1172fcbd0e8cdaea2f9e34a2085d0c..4b85ab7d9fc2fb5a9a8468c4045902cf362d549e 100644 --- a/src/output/ods/comparbasesheet.h +++ b/src/output/ods/comparbasesheet.h @@ -39,8 +39,7 @@ class ComparBaseSheet { public: - ComparBaseSheet(OdsExport *p_ods_export, - CalcWriterInterface *p_writer, + ComparBaseSheet(OdsExport *p_ods_export, CalcWriterInterface *p_writer, const Project *p_project); private: @@ -52,8 +51,7 @@ class ComparBaseSheet protected: virtual void writeComparValue(const ProteinMatch *p_protein_match, - ValidationState state, - const MsRun *p_msrun, + ValidationState state, const MsRun *p_msrun, const Label *p_label = nullptr) = 0; void writeProteinMatch(const ProteinMatch *p_protein_match); diff --git a/src/output/ods/comparspecificspectrasheet.cpp b/src/output/ods/comparspecificspectrasheet.cpp index 20e6923abcd678101b7fad94f5de2f67f3f126c3..5ad6c4fed7af0d0536b79ce0d2d255916fdc3cc3 100644 --- a/src/output/ods/comparspecificspectrasheet.cpp +++ b/src/output/ods/comparspecificspectrasheet.cpp @@ -32,8 +32,7 @@ ComparSpecificSpectraSheet::ComparSpecificSpectraSheet( - OdsExport *p_ods_export, - CalcWriterInterface *p_writer, + OdsExport *p_ods_export, CalcWriterInterface *p_writer, const Project *p_project) : ComparBaseSheet(p_ods_export, p_writer, p_project) { @@ -43,10 +42,8 @@ ComparSpecificSpectraSheet::ComparSpecificSpectraSheet( void ComparSpecificSpectraSheet::writeComparValue( - const ProteinMatch *p_protein_match, - ValidationState state, - const MsRun *p_msrun, - const Label *p_label) + const ProteinMatch *p_protein_match, ValidationState state, + const MsRun *p_msrun, const Label *p_label) { qDebug() << "ComparSpecificSpectraSheet::writeComparValue begin"; _p_writer->writeCell( @@ -58,8 +55,7 @@ ComparSpecificSpectraSheet::writeComparValue( ComparSpecificSequenceSheet::ComparSpecificSequenceSheet( - OdsExport *p_ods_export, - CalcWriterInterface *p_writer, + OdsExport *p_ods_export, CalcWriterInterface *p_writer, const Project *p_project) : ComparBaseSheet(p_ods_export, p_writer, p_project) { @@ -68,10 +64,8 @@ ComparSpecificSequenceSheet::ComparSpecificSequenceSheet( void ComparSpecificSequenceSheet::writeComparValue( - const ProteinMatch *p_protein_match, - ValidationState state, - const MsRun *p_msrun, - const Label *p_label) + const ProteinMatch *p_protein_match, ValidationState state, + const MsRun *p_msrun, const Label *p_label) { qDebug() << "ComparSpecificSequenceSheet::writeComparValue begin"; _p_writer->writeCell( diff --git a/src/output/ods/comparspecificspectrasheet.h b/src/output/ods/comparspecificspectrasheet.h index e677f28f97ffcfd02bff8684b364b2979082220e..90398835876a79e96aff937a41e534b01402e724 100644 --- a/src/output/ods/comparspecificspectrasheet.h +++ b/src/output/ods/comparspecificspectrasheet.h @@ -41,8 +41,7 @@ class ComparSpecificSpectraSheet : public ComparBaseSheet protected: virtual void writeComparValue(const ProteinMatch *p_protein_match, - ValidationState state, - const MsRun *p_msrun, + ValidationState state, const MsRun *p_msrun, const Label *p_label = nullptr) override; }; @@ -55,8 +54,7 @@ class ComparSpecificSequenceSheet : public ComparBaseSheet protected: virtual void writeComparValue(const ProteinMatch *p_protein_match, - ValidationState state, - const MsRun *p_msrun, + ValidationState state, const MsRun *p_msrun, const Label *p_label = nullptr) override; }; diff --git a/src/output/ods/comparspectrabypeptide.cpp b/src/output/ods/comparspectrabypeptide.cpp index 2898bbe1dc4ebae75ac3dd548363f8ab80b76e14..1649ee15b700fb22a73b112feef2168f867b67bc 100644 --- a/src/output/ods/comparspectrabypeptide.cpp +++ b/src/output/ods/comparspectrabypeptide.cpp @@ -132,8 +132,7 @@ ComparSpectraByPeptide::writeIdentificationGroup(IdentificationGroup *p_ident) std::vector<const PeptideEvidence *> peptide_evidence_list = group_pair.second.get()->getPeptideEvidenceList(); - std::sort(peptide_evidence_list.begin(), - peptide_evidence_list.end(), + std::sort(peptide_evidence_list.begin(), peptide_evidence_list.end(), [](const PeptideEvidence *a, const PeptideEvidence *b) { return a->getGrpPeptideSp().get()->getRank() < b->getGrpPeptideSp().get()->getRank(); @@ -199,8 +198,8 @@ ComparSpectraByPeptide::writeIdentificationGroup(IdentificationGroup *p_ident) if(p_best_peptide_evidence != nullptr) { - writeBestPeptideEvidence( - group_pair.second.get(), p_best_peptide_evidence, sample_scan_list); + writeBestPeptideEvidence(group_pair.second.get(), + p_best_peptide_evidence, sample_scan_list); sample_scan_list.clear(); } } @@ -222,8 +221,7 @@ ComparSpectraByPeptide::writeIdentificationGroup(IdentificationGroup *p_ident) void ComparSpectraByPeptide::writeBestPeptideEvidence( - const GroupingGroup *p_group, - const PeptideEvidence *p_peptide_evidence, + const GroupingGroup *p_group, const PeptideEvidence *p_peptide_evidence, const std::map<QString, std::vector<size_t>> &sample_scan_list) { @@ -257,8 +255,8 @@ ComparSpectraByPeptide::writeBestPeptideEvidence( { if(_label_list.size() == 0) { - writeComparValue( - sample_scan_list, ValidationState::validAndChecked, msrun_sp.get()); + writeComparValue(sample_scan_list, ValidationState::validAndChecked, + msrun_sp.get()); if(_first_cell_coordinate.isEmpty()) { _first_cell_coordinate = _p_writer->getOdsCellCoordinate(); @@ -269,8 +267,7 @@ ComparSpectraByPeptide::writeBestPeptideEvidence( for(const Label *p_label : _label_list) { writeComparValue(sample_scan_list, - ValidationState::validAndChecked, - msrun_sp.get(), + ValidationState::validAndChecked, msrun_sp.get(), p_label); if(_first_cell_coordinate.isEmpty()) { @@ -285,9 +282,7 @@ ComparSpectraByPeptide::writeBestPeptideEvidence( void ComparSpectraByPeptide::writeComparValue( const std::map<QString, std::vector<size_t>> &sample_scan_list, - ValidationState state, - const MsRun *p_msrun, - const Label *p_label) + ValidationState state, const MsRun *p_msrun, const Label *p_label) { /* std::sort(sample_scan_list.begin(), sample_scan_list.end()); diff --git a/src/output/ods/comparspectrabypeptide.h b/src/output/ods/comparspectrabypeptide.h index a566384d31c783fc0b29ce3dd4a9c0d3a23d446a..97436247ff6f6ccffd05737e6d985cae666cc8f1 100644 --- a/src/output/ods/comparspectrabypeptide.h +++ b/src/output/ods/comparspectrabypeptide.h @@ -50,18 +50,15 @@ class ComparSpectraByPeptide void writeIdentificationGroup(IdentificationGroup *p_ident); void writeHeaders(IdentificationGroup *p_ident); void writeBestPeptideEvidence( - const GroupingGroup *p_group, - const PeptideEvidence *p_peptide_evidence, + const GroupingGroup *p_group, const PeptideEvidence *p_peptide_evidence, const std::map<QString, std::vector<size_t>> &sample_scan_list); void writeComparValue( const std::map<QString, std::vector<size_t>> &sample_scan_list, - ValidationState state, - const MsRun *p_msrun, + ValidationState state, const MsRun *p_msrun, const Label *p_label = nullptr); public: - ComparSpectraByPeptide(OdsExport *p_ods_export, - CalcWriterInterface *p_writer, + ComparSpectraByPeptide(OdsExport *p_ods_export, CalcWriterInterface *p_writer, const Project *p_project); void writeSheet(); }; diff --git a/src/output/ods/comparspectrasheet.cpp b/src/output/ods/comparspectrasheet.cpp index b9ee4cc32c6eb1f6d0e503358be87e0935e9f503..184ee49aa09b619373c9c131235be981ba6236a9 100644 --- a/src/output/ods/comparspectrasheet.cpp +++ b/src/output/ods/comparspectrasheet.cpp @@ -46,8 +46,7 @@ ComparSpectraSheet::ComparSpectraSheet(OdsExport *p_ods_export, void ComparSpectraSheet::writeComparValue(const ProteinMatch *p_protein_match, ValidationState state, - const MsRun *p_msrun, - const Label *p_label) + const MsRun *p_msrun, const Label *p_label) { qDebug() << "ComparSpectraSheet::writeComparValue begin"; _p_writer->writeCell( @@ -86,8 +85,7 @@ ComparPaiSheet::ComparPaiSheet(OdsExport *p_ods_export, void ComparPaiSheet::writeComparValue(const ProteinMatch *p_protein_match, - ValidationState state, - const MsRun *p_msrun, + ValidationState state, const MsRun *p_msrun, const Label *p_label) { qDebug() << "ComparPaiSheet::writeComparValue begin"; @@ -105,8 +103,7 @@ ComparEmpaiSheet::ComparEmpaiSheet(OdsExport *p_ods_export, void ComparEmpaiSheet::writeComparValue(const ProteinMatch *p_protein_match, - ValidationState state, - const MsRun *p_msrun, + ValidationState state, const MsRun *p_msrun, const Label *p_label) { qDebug() << "ComparEmpaiSheet::writeComparValue begin"; @@ -124,8 +121,7 @@ ComparNsafSheet::ComparNsafSheet(OdsExport *p_ods_export, void ComparNsafSheet::writeComparValue(const ProteinMatch *p_protein_match, - ValidationState state, - const MsRun *p_msrun, + ValidationState state, const MsRun *p_msrun, const Label *p_label) { qDebug() << "ComparNsafSheet::writeComparValue begin"; diff --git a/src/output/ods/comparspectrasheet.h b/src/output/ods/comparspectrasheet.h index d129f71f728bd408dc887d27843dbf7720014a28..04b0df804e5d026985c24b9eab7e3b7372fac212 100644 --- a/src/output/ods/comparspectrasheet.h +++ b/src/output/ods/comparspectrasheet.h @@ -36,14 +36,12 @@ class ComparSpectraSheet : public ComparBaseSheet { public: - ComparSpectraSheet(OdsExport *p_ods_export, - CalcWriterInterface *p_writer, + ComparSpectraSheet(OdsExport *p_ods_export, CalcWriterInterface *p_writer, const Project *p_project); protected: virtual void writeComparValue(const ProteinMatch *p_protein_match, - ValidationState state, - const MsRun *p_msrun, + ValidationState state, const MsRun *p_msrun, const Label *p_label = nullptr) override; }; @@ -51,56 +49,48 @@ class ComparSpectraSheet : public ComparBaseSheet class ComparSequenceSheet : public ComparBaseSheet { public: - ComparSequenceSheet(OdsExport *p_ods_export, - CalcWriterInterface *p_writer, + ComparSequenceSheet(OdsExport *p_ods_export, CalcWriterInterface *p_writer, const Project *p_project); protected: virtual void writeComparValue(const ProteinMatch *p_protein_match, - ValidationState state, - const MsRun *p_msrun, + ValidationState state, const MsRun *p_msrun, const Label *p_label = nullptr) override; }; class ComparPaiSheet : public ComparBaseSheet { public: - ComparPaiSheet(OdsExport *p_ods_export, - CalcWriterInterface *p_writer, + ComparPaiSheet(OdsExport *p_ods_export, CalcWriterInterface *p_writer, const Project *p_project); protected: virtual void writeComparValue(const ProteinMatch *p_protein_match, - ValidationState state, - const MsRun *p_msrun, + ValidationState state, const MsRun *p_msrun, const Label *p_label = nullptr) override; }; class ComparEmpaiSheet : public ComparBaseSheet { public: - ComparEmpaiSheet(OdsExport *p_ods_export, - CalcWriterInterface *p_writer, + ComparEmpaiSheet(OdsExport *p_ods_export, CalcWriterInterface *p_writer, const Project *p_project); protected: virtual void writeComparValue(const ProteinMatch *p_protein_match, - ValidationState state, - const MsRun *p_msrun, + ValidationState state, const MsRun *p_msrun, const Label *p_label = nullptr) override; }; class ComparNsafSheet : public ComparBaseSheet { public: - ComparNsafSheet(OdsExport *p_ods_export, - CalcWriterInterface *p_writer, + ComparNsafSheet(OdsExport *p_ods_export, CalcWriterInterface *p_writer, const Project *p_project); protected: virtual void writeComparValue(const ProteinMatch *p_protein_match, - ValidationState state, - const MsRun *p_msrun, + ValidationState state, const MsRun *p_msrun, const Label *p_label = nullptr) override; private: diff --git a/src/output/ods/groupingsheet.cpp b/src/output/ods/groupingsheet.cpp index 524e37dc6eefd0fa094e1cc672ec04c9706fe0d8..1842d454c34845aab09630b2dbe8fcc6dca02a47 100644 --- a/src/output/ods/groupingsheet.cpp +++ b/src/output/ods/groupingsheet.cpp @@ -105,9 +105,8 @@ GroupingSheet::writeHeaders() "identification engine"); _p_writer->writeCell("psm"); //_p_writer->writeCell("sequences"); - _p_writer->setCellAnnotation( - "number of unique combinations : grouped " - "peptide sequence+modifications+sample name"); + _p_writer->setCellAnnotation("number of unique combinations : grouped " + "peptide sequence+modifications+sample name"); _p_writer->writeCell("peptide/mass/sample"); _p_writer->setCellAnnotation( "FDR at the protein level (number of decoy valid proteins / total number " diff --git a/src/output/ods/groupingsheet.h b/src/output/ods/groupingsheet.h index ec253be645b5bcc650fd78ef45d4639903479aa3..9202bc4fd7b64a0bcebd3537502c0ea891849218 100644 --- a/src/output/ods/groupingsheet.h +++ b/src/output/ods/groupingsheet.h @@ -38,8 +38,7 @@ class GroupingSheet { public: - GroupingSheet(OdsExport *p_ods_export, - CalcWriterInterface *p_writer, + GroupingSheet(OdsExport *p_ods_export, CalcWriterInterface *p_writer, const Project *p_project); private: diff --git a/src/output/ods/infosheet.cpp b/src/output/ods/infosheet.cpp index 4b6699e6fc1d5d08631611dd0c6de70c89b471c7..364bacfbaea13c6a3419de8d84fe951274c3614a 100644 --- a/src/output/ods/infosheet.cpp +++ b/src/output/ods/infosheet.cpp @@ -34,8 +34,7 @@ #include <QSettings> -InfoSheet::InfoSheet(OdsExport *p_ods_export, - CalcWriterInterface *p_writer, +InfoSheet::InfoSheet(OdsExport *p_ods_export, CalcWriterInterface *p_writer, const Project *p_project) : _p_project(p_project) { @@ -130,9 +129,8 @@ InfoSheet::InfoSheet(OdsExport *p_ods_export, if(settings.value("export_ods/groups", "true").toBool()) { p_writer->writeCell("groups"); - p_writer->writeCell( - "simple statistics on the current grouping " - "experiment (numbers of groups, subgroups...)"); + p_writer->writeCell("simple statistics on the current grouping " + "experiment (numbers of groups, subgroups...)"); p_writer->writeLine(); } @@ -146,29 +144,26 @@ InfoSheet::InfoSheet(OdsExport *p_ods_export, if(settings.value("export_ods/peptides", "true").toBool()) { p_writer->writeCell("peptides"); - p_writer->writeCell( - "list of peptides used by the grouping algorithm. " - "Beware : peptides are intended as unique pairs of " - "sequence+mass, given that Leucine and Isoleucine as " - "the same mass, all Leucines are considered as " - "Isoleucines"); + p_writer->writeCell("list of peptides used by the grouping algorithm. " + "Beware : peptides are intended as unique pairs of " + "sequence+mass, given that Leucine and Isoleucine as " + "the same mass, all Leucines are considered as " + "Isoleucines"); p_writer->writeLine(); } if(settings.value("export_ods/spectra", "true").toBool()) { p_writer->writeCell("spectra"); - p_writer->writeCell( - "list of all validated and checked spectrum match. " - "Only the best assigned peptide (best Evalue) is " - "reported "); + p_writer->writeCell("list of all validated and checked spectrum match. " + "Only the best assigned peptide (best Evalue) is " + "reported "); p_writer->writeLine(); } if(settings.value("export_ods/peptidepos", "true").toBool()) { p_writer->writeCell("peptide pos"); - p_writer->writeCell( - "list of all *real* peptides identified on their " - "proteins, with their position on the sequence."); + p_writer->writeCell("list of all *real* peptides identified on their " + "proteins, with their position on the sequence."); p_writer->writeLine(); } } diff --git a/src/output/ods/infosheet.h b/src/output/ods/infosheet.h index c85a4f673a2ef23d623fbc30e4417ef62d759fe5..e3ec4d4200dc6ff9ebbca015bf0989fd05f5fd13 100644 --- a/src/output/ods/infosheet.h +++ b/src/output/ods/infosheet.h @@ -39,8 +39,7 @@ class InfoSheet { public: - InfoSheet(OdsExport *p_ods_export, - CalcWriterInterface *p_writer, + InfoSheet(OdsExport *p_ods_export, CalcWriterInterface *p_writer, const Project *p_project); private: diff --git a/src/output/ods/peptidepossheet.cpp b/src/output/ods/peptidepossheet.cpp index e3e8596270bc034900d57ba99cecb5ad216f59be..9918513ab2ae6008b353b0a3e6410612ee4c1a42 100644 --- a/src/output/ods/peptidepossheet.cpp +++ b/src/output/ods/peptidepossheet.cpp @@ -149,8 +149,7 @@ PeptidePosSheet::writeIdentificationGroup(IdentificationGroup *p_ident) } std::sort( - protein_match_list.begin(), - protein_match_list.end(), + protein_match_list.begin(), protein_match_list.end(), [](const ProteinMatch *a, const ProteinMatch *b) { unsigned int agroup = a->getGrpProteinSp().get()->getGroupNumber(); unsigned int asubgroup = a->getGrpProteinSp().get()->getSubGroupNumber(); @@ -175,8 +174,7 @@ PeptidePosSheet::writeIdentificationGroup(IdentificationGroup *p_ident) continue; peptide_match_list.push_back(peptide_match); } - std::sort(peptide_match_list.begin(), - peptide_match_list.end(), + std::sort(peptide_match_list.begin(), peptide_match_list.end(), [](const PeptideMatch &a, const PeptideMatch &b) { unsigned int arank = a.getPeptideEvidence()->getGrpPeptideSp().get()->getRank(); diff --git a/src/output/ods/peptidepossheet.h b/src/output/ods/peptidepossheet.h index d65740fd43f14c86f17c503aca23623be33003ba..a7b32bf8cfc34ea6a970f7abc372fb21d37ceaf1 100644 --- a/src/output/ods/peptidepossheet.h +++ b/src/output/ods/peptidepossheet.h @@ -41,8 +41,7 @@ class PeptidePosSheet { public: - PeptidePosSheet(OdsExport *p_ods_export, - CalcWriterInterface *p_writer, + PeptidePosSheet(OdsExport *p_ods_export, CalcWriterInterface *p_writer, const Project *p_project); private: diff --git a/src/output/ods/peptidesheet.cpp b/src/output/ods/peptidesheet.cpp index c05710d44f9ada89362610a91384a4686565dfc7..8e97e737a2595d7b615f4c63f3d716ff3c37e5a1 100644 --- a/src/output/ods/peptidesheet.cpp +++ b/src/output/ods/peptidesheet.cpp @@ -101,8 +101,7 @@ PeptideSheet::writeIdentificationGroup(IdentificationGroup *p_ident) std::vector<const PeptideEvidence *> peptide_evidence_list = group_pair.second.get()->getPeptideEvidenceList(); - std::sort(peptide_evidence_list.begin(), - peptide_evidence_list.end(), + std::sort(peptide_evidence_list.begin(), peptide_evidence_list.end(), [](const PeptideEvidence *a, const PeptideEvidence *b) { return a->getGrpPeptideSp().get()->getRank() < b->getGrpPeptideSp().get()->getRank(); diff --git a/src/output/ods/peptidesheet.h b/src/output/ods/peptidesheet.h index 1f64c4bed11563c7ab16aef1439b7db6dd8881e8..7db49c459755b1ee2c01ea27459fa19d643ae125 100644 --- a/src/output/ods/peptidesheet.h +++ b/src/output/ods/peptidesheet.h @@ -39,8 +39,7 @@ class PeptideSheet { public: - PeptideSheet(OdsExport *p_ods_export, - CalcWriterInterface *p_writer, + PeptideSheet(OdsExport *p_ods_export, CalcWriterInterface *p_writer, const Project *p_project); private: diff --git a/src/output/ods/proteinsheet.cpp b/src/output/ods/proteinsheet.cpp index 90a6d82e4dbabf545ecaf66f4c95d33e2a8abe8f..70fc14d52dc9e2f845dfa35bcca583a9dfd809e5 100644 --- a/src/output/ods/proteinsheet.cpp +++ b/src/output/ods/proteinsheet.cpp @@ -141,8 +141,7 @@ ProteinSheet::writeIdentificationGroup(IdentificationGroup *p_ident) std::vector<const ProteinMatch *> protein_match_list = group_pair.second.get()->getProteinMatchList(); - std::sort(protein_match_list.begin(), - protein_match_list.end(), + std::sort(protein_match_list.begin(), protein_match_list.end(), [](const ProteinMatch *a, const ProteinMatch *b) { return a->getGrpProteinSp().get()->getGroupingId() < b->getGrpProteinSp().get()->getGroupingId(); diff --git a/src/output/ods/proteinsheet.h b/src/output/ods/proteinsheet.h index a4e7347af2df7070152aa3a9e2fc2cab6f1b9d13..660256246b3d3b08c939b7cf6d86dbcb038d87bc 100644 --- a/src/output/ods/proteinsheet.h +++ b/src/output/ods/proteinsheet.h @@ -40,8 +40,7 @@ class ProteinSheet { public: - ProteinSheet(OdsExport *p_ods_export, - CalcWriterInterface *p_writer, + ProteinSheet(OdsExport *p_ods_export, CalcWriterInterface *p_writer, const Project *p_project); private: diff --git a/src/output/ods/ptm/ptmislandsheet.cpp b/src/output/ods/ptm/ptmislandsheet.cpp index e6d9489f00d53cf0446998849266ad2ad59fba4f..87e15abec5abe9bbeb629eccf985a0ec6653b33c 100644 --- a/src/output/ods/ptm/ptmislandsheet.cpp +++ b/src/output/ods/ptm/ptmislandsheet.cpp @@ -133,8 +133,7 @@ PtmIslandSheet::writeIdentificationGroup(IdentificationGroup *p_ident) ptm_island_list.push_back(ptm_island_sp); } qDebug() << "PtmIslandSheet::writeIdentificationGroup sort"; - std::sort(ptm_island_list.begin(), - ptm_island_list.end(), + std::sort(ptm_island_list.begin(), ptm_island_list.end(), [](PtmIslandSp &a, PtmIslandSp &b) { return a.get()->getGroupingId() < b.get()->getGroupingId(); }); diff --git a/src/output/ods/ptm/ptmislandsheet.h b/src/output/ods/ptm/ptmislandsheet.h index dcf46ad298193be515b7f28836a67feed59169d2..b9e9071fd792d0f03e6d77670e9c0efd38cdf9f8 100644 --- a/src/output/ods/ptm/ptmislandsheet.h +++ b/src/output/ods/ptm/ptmislandsheet.h @@ -40,8 +40,7 @@ class PtmIslandSheet { public: - PtmIslandSheet(OdsExport *p_ods_export, - CalcWriterInterface *p_writer, + PtmIslandSheet(OdsExport *p_ods_export, CalcWriterInterface *p_writer, const Project *p_project); private: diff --git a/src/output/ods/ptm/ptmspectrasheet.h b/src/output/ods/ptm/ptmspectrasheet.h index 4832ebeebbc7118d8ae38ac7e27e5f247435999c..6b589c045e6ee0e065899167e3416511a66a29ed 100644 --- a/src/output/ods/ptm/ptmspectrasheet.h +++ b/src/output/ods/ptm/ptmspectrasheet.h @@ -40,15 +40,12 @@ class PtmSpectraSheet { public: - PtmSpectraSheet(OdsExport *p_ods_export, - CalcWriterInterface *p_writer, + PtmSpectraSheet(OdsExport *p_ods_export, CalcWriterInterface *p_writer, const Project *p_project); protected: - PtmSpectraSheet(OdsExport *p_ods_export, - CalcWriterInterface *p_writer, - const Project *p_project, - const QString &sheet_name); + PtmSpectraSheet(OdsExport *p_ods_export, CalcWriterInterface *p_writer, + const Project *p_project, const QString &sheet_name); virtual void writeIdentificationGroup(IdentificationGroup *p_ident); void writeHeaders(IdentificationGroup *p_ident); void writeBestPeptideEvidence( diff --git a/src/output/ods/samplesheet.cpp b/src/output/ods/samplesheet.cpp index a3c78b2a6b07ad7bad8f2635782a0a113af224f5..5fe39259fef811b24b10052bfca30773d09984b2 100644 --- a/src/output/ods/samplesheet.cpp +++ b/src/output/ods/samplesheet.cpp @@ -30,8 +30,7 @@ #include "samplesheet.h" -SampleSheet::SampleSheet(OdsExport *p_ods_export, - CalcWriterInterface *p_writer, +SampleSheet::SampleSheet(OdsExport *p_ods_export, CalcWriterInterface *p_writer, const Project *p_project) : _p_project(p_project) { @@ -119,19 +118,16 @@ SampleSheet::writeHeaders() "total number of MS level 3 during the MS run (from mz file)"); _p_writer->writeCell("Total MS3"); - _p_writer->setCellAnnotation( - "total ion current in MS level 1 spectra " - "during the MS run (from mz file)"); + _p_writer->setCellAnnotation("total ion current in MS level 1 spectra " + "during the MS run (from mz file)"); _p_writer->writeCell("TIC MS1"); - _p_writer->setCellAnnotation( - "total ion current in MS level 2 spectra " - "during the MS run (from mz file)"); + _p_writer->setCellAnnotation("total ion current in MS level 2 spectra " + "during the MS run (from mz file)"); _p_writer->writeCell("TIC MS2"); - _p_writer->setCellAnnotation( - "total ion current in MS level 3 spectra " - "during the MS run (from mz file)"); + _p_writer->setCellAnnotation("total ion current in MS level 3 spectra " + "during the MS run (from mz file)"); _p_writer->writeCell("TIC MS3"); } diff --git a/src/output/ods/samplesheet.h b/src/output/ods/samplesheet.h index ce0181945787a6fc4c76e43b0eb449ed512128f6..12677f5f2186c78196fda60434185f57c15b0f59 100644 --- a/src/output/ods/samplesheet.h +++ b/src/output/ods/samplesheet.h @@ -38,8 +38,7 @@ class SampleSheet { public: - SampleSheet(OdsExport *p_ods_export, - CalcWriterInterface *p_writer, + SampleSheet(OdsExport *p_ods_export, CalcWriterInterface *p_writer, const Project *p_project); private: diff --git a/src/output/ods/spectrasheet.cpp b/src/output/ods/spectrasheet.cpp index 4fc18127664d0dacd023f598fcc6490952160d5d..c260028ca98c9eac00e4a481c81d0993079512d5 100644 --- a/src/output/ods/spectrasheet.cpp +++ b/src/output/ods/spectrasheet.cpp @@ -34,8 +34,7 @@ SpectraSheet::SpectraSheet(OdsExport *p_ods_export, CalcWriterInterface *p_writer, - const Project *p_project, - const QString &sheet_name) + const Project *p_project, const QString &sheet_name) : _p_project(p_project) { _p_ods_export = p_ods_export; @@ -176,8 +175,7 @@ SpectraSheet::writeIdentificationGroup(IdentificationGroup *p_ident) group_pair.second.get()->getPeptideEvidenceList(); std::sort( - peptide_evidence_list.begin(), - peptide_evidence_list.end(), + peptide_evidence_list.begin(), peptide_evidence_list.end(), [](const PeptideEvidence *a, const PeptideEvidence *b) { unsigned int arank = a->getGrpPeptideSp().get()->getRank(); unsigned int ascan = a->getScan(); @@ -206,8 +204,8 @@ SpectraSheet::writeIdentificationGroup(IdentificationGroup *p_ident) if(std::tie(arank, p_best_peptide_evidence->getMsRunP()->getSampleName(), ascan) != - std::tie( - brank, peptide_evidence->getMsRunP()->getSampleName(), bscan)) + std::tie(brank, peptide_evidence->getMsRunP()->getSampleName(), + bscan)) { // write p_best_peptide_match writeBestPeptideEvidence(group_pair.second.get(), diff --git a/src/output/ods/spectrasheet.h b/src/output/ods/spectrasheet.h index afbecc2c1a233f6ccda314839140a7cf1bb682c2..5035d45aed2ce9f09695a7d67b70fa3c7d4dc20c 100644 --- a/src/output/ods/spectrasheet.h +++ b/src/output/ods/spectrasheet.h @@ -40,15 +40,12 @@ class SpectraSheet { public: - SpectraSheet(OdsExport *p_ods_export, - CalcWriterInterface *p_writer, + SpectraSheet(OdsExport *p_ods_export, CalcWriterInterface *p_writer, const Project *p_project); protected: - SpectraSheet(OdsExport *p_ods_export, - CalcWriterInterface *p_writer, - const Project *p_project, - const QString &sheet_name); + SpectraSheet(OdsExport *p_ods_export, CalcWriterInterface *p_writer, + const Project *p_project, const QString &sheet_name); virtual void writeIdentificationGroup(IdentificationGroup *p_ident); void writeHeaders(IdentificationGroup *p_ident); void writeBestPeptideEvidence(const GroupingGroup *p_group, diff --git a/src/output/proticdbml.cpp b/src/output/proticdbml.cpp index 8e08e19f9073bdeab8704d7203ec311fcfa42eb0..1542d45461f7561d1ef53e43fce04bf0d76d4ddb 100644 --- a/src/output/proticdbml.cpp +++ b/src/output/proticdbml.cpp @@ -542,8 +542,7 @@ ProticdbMl::writepeptideHitsbyGroup(GroupingGroup *p_group) protic_peptide_hit_list.push_back(protic_peptide_hit); } } - std::sort(protic_peptide_hit_list.begin(), - protic_peptide_hit_list.end(), + std::sort(protic_peptide_hit_list.begin(), protic_peptide_hit_list.end(), [](const ProticPeptideHit &first, const ProticPeptideHit &second) { return (first.key < second.key); }); @@ -616,10 +615,9 @@ ProticdbMl::writePeptideHit(QString xml_id, protic_peptide_hit.peptide_match.getPeptideEvidence()->getScan())); qDebug() << __FILE__ << " " << __FUNCTION__ << " " << __LINE__; _output_stream->writeAttribute( - "ms_run_id", - protic_peptide_hit.peptide_match.getPeptideEvidence() - ->getMsRunP() - ->getXmlId()); + "ms_run_id", protic_peptide_hit.peptide_match.getPeptideEvidence() + ->getMsRunP() + ->getXmlId()); _output_stream->writeAttribute("id", xml_id); _output_stream->writeAttribute( "exp_z", @@ -739,8 +737,7 @@ ProticdbMl::writeMatchs(IdentificationGroup *p_identification) std::vector<const ProteinMatch *> protein_match_list = group_pair.second.get()->getProteinMatchList(); // sort protein match by subgroup - std::sort(protein_match_list.begin(), - protein_match_list.end(), + std::sort(protein_match_list.begin(), protein_match_list.end(), [](const ProteinMatch *a, const ProteinMatch *b) { return a->getGrpProteinSp().get()->getSubGroupNumber() < b->getGrpProteinSp().get()->getSubGroupNumber(); @@ -853,9 +850,8 @@ ProticdbMl::writeMatch(std::vector<const ProteinMatch *> &protein_match_sg_list) .arg(p_protein_match->getProteinXtpSp().get()->getDescription())); // proteinHit.setAttribute("score", ""); _output_stream->writeAttribute( - "rank", - QString("%1").arg( - p_protein_match->getGrpProteinSp().get()->getRank())); + "rank", QString("%1").arg( + p_protein_match->getGrpProteinSp().get()->getRank())); // //cvparam writeCvParam("PROTICdbO:0000284", @@ -876,8 +872,7 @@ ProticdbMl::writeMatch(std::vector<const ProteinMatch *> &protein_match_sg_list) // id: PROTICdbO:0000335 // name: X!TandemPipeline PAI writeCvParam("PROTICdbO:0000335", - Utils::getXmlDouble(p_protein_match->getPAI()), - "PAI"); + Utils::getXmlDouble(p_protein_match->getPAI()), "PAI"); // [Term] // id: PROTICdbO:0000337 diff --git a/src/output/xpip.cpp b/src/output/xpip.cpp index 2d3290c4b4c497dc7e541850e70dba28ca0cceff..470c178e00ecc63ba3328af7113ca2af6e6e51fb 100644 --- a/src/output/xpip.cpp +++ b/src/output/xpip.cpp @@ -253,9 +253,8 @@ Xpip::writeIdentificationDataSourceList( ident_source_sp.get()->getResourceName()); _output_stream->writeAttribute( - "engine", - QString("%1").arg(static_cast<std::int8_t>( - ident_source_sp.get()->getIdentificationEngine()))); + "engine", QString("%1").arg(static_cast<std::int8_t>( + ident_source_sp.get()->getIdentificationEngine()))); _output_stream->writeAttribute( "version", ident_source_sp.get()->getIdentificationEngineVersion()); @@ -318,9 +317,9 @@ Xpip::writeMsrunList(const MsRunStore &msrun_store) _output_stream->writeStartElement("msrun"); _output_stream->writeAttribute("id", msrun_sp.get()->getXmlId()); _output_stream->writeAttribute("name", msrun_sp.get()->getSampleName()); - _output_stream->writeAttribute("format", - QString("%1").arg(static_cast<std::int8_t>( - msrun_sp.get()->getMzFormat()))); + _output_stream->writeAttribute( + "format", QString("%1").arg( + static_cast<std::int8_t>(msrun_sp.get()->getMzFormat()))); QFileInfo mz_info(msrun_sp.get()->getFilename()); if(mz_info.exists()) { @@ -592,9 +591,8 @@ Xpip::writePeptideEvidence(const PeptideEvidence *p_peptide_evidence) "scan", QString("%1").arg(p_peptide_evidence->getScan())); writeDoubleAttribute("rt", p_peptide_evidence->getRetentionTime()); _output_stream->writeAttribute( - "eng", - QString("%1").arg( - (unsigned int)p_peptide_evidence->getIdentificationEngine())); + "eng", QString("%1").arg( + (unsigned int)p_peptide_evidence->getIdentificationEngine())); writeDoubleAttribute("evalue", p_peptide_evidence->getEvalue()); writeDoubleAttribute("exp_mass", p_peptide_evidence->getExperimentalMass()); _output_stream->writeAttribute( diff --git a/src/utils/httpversion.cpp b/src/utils/httpversion.cpp index cd76e5f5967adeca86f23ebbd528dcfcced894f8..582fd54daf7a1b0c6dc126044af2e91cd557da4d 100644 --- a/src/utils/httpversion.cpp +++ b/src/utils/httpversion.cpp @@ -48,9 +48,7 @@ HttpVersion::HttpVersion() { mpa_manager = new QNetworkAccessManager(); QObject::connect( - mpa_manager, - &QNetworkAccessManager::finished, - this, + mpa_manager, &QNetworkAccessManager::finished, this, [=](QNetworkReply *reply) { if(reply->error()) { @@ -77,12 +75,11 @@ HttpVersion::HttpVersion() m_request.setHeader(QNetworkRequest::ContentTypeHeader, "application/json"); - m_request.setRawHeader("User-Agent", - QString("%1 %2 (%3)") - .arg(SOFTWARE_NAME) - .arg(XTPCPP_VERSION) - .arg(BUILD_SYSTEM_NAME) - .toLatin1()); + m_request.setRawHeader("User-Agent", QString("%1 %2 (%3)") + .arg(SOFTWARE_NAME) + .arg(XTPCPP_VERSION) + .arg(BUILD_SYSTEM_NAME) + .toLatin1()); mpa_manager->get(m_request); } } diff --git a/src/utils/msrunstore.cpp b/src/utils/msrunstore.cpp index d5312dc8828fbbb6b9d6c5b9da2a73bccb72d0ab..f867fb0b9e92017998c12f762f545393eff8288f 100644 --- a/src/utils/msrunstore.cpp +++ b/src/utils/msrunstore.cpp @@ -46,9 +46,8 @@ MsRunSp MsRunStore::getInstance(const MsRun *p_msrun) { auto it = std::find_if( - _map_msrun.begin(), _map_msrun.end(), [p_msrun](const MsRunSp &msrun_sp) { - return msrun_sp.get() == p_msrun; - }); + _map_msrun.begin(), _map_msrun.end(), + [p_msrun](const MsRunSp &msrun_sp) { return msrun_sp.get() == p_msrun; }); if(it != _map_msrun.end()) { return (*it); @@ -66,8 +65,7 @@ MsRunStore::getInstance(const QString &location) if(file_ondisk.baseName() == location) { // look only for the same sample name - it = std::find_if(_map_msrun.begin(), - _map_msrun.end(), + it = std::find_if(_map_msrun.begin(), _map_msrun.end(), [location](const MsRunSp &msrun_sp) { return msrun_sp.get()->getSampleName() == location; }); @@ -75,8 +73,7 @@ MsRunStore::getInstance(const QString &location) else { // look for an absolute file path - it = std::find_if(_map_msrun.begin(), - _map_msrun.end(), + it = std::find_if(_map_msrun.begin(), _map_msrun.end(), [location](const MsRunSp &msrun_sp) { if(msrun_sp.get()->getSampleName() == msrun_sp.get()->getFilename()) diff --git a/src/utils/peptideevidencestore.cpp b/src/utils/peptideevidencestore.cpp index ea5318fa38497723202d5f04b834b4f2e5c905b7..a99100907b1a2bb2535c079b58b4673194b294d4 100644 --- a/src/utils/peptideevidencestore.cpp +++ b/src/utils/peptideevidencestore.cpp @@ -129,9 +129,7 @@ PeptideEvidenceStore::getPeptideEvidenceList() const void PeptideEvidenceStore::getSameXicPeptideEvidenceList( std::vector<const PeptideEvidence *> &peptide_evidence_list, - const MsRun *p_msrun, - const PeptideXtp *p_peptide, - unsigned int charge) const + const MsRun *p_msrun, const PeptideXtp *p_peptide, unsigned int charge) const { for(const PeptideEvidenceSp &peptide_evidence_sp : _peptide_evidence_list) { diff --git a/src/utils/peptideevidencestore.h b/src/utils/peptideevidencestore.h index ed356fc648ac444e32d87b3439c79ad6b407694f..515cc660572c66a501881799e863a5ca19134e5b 100644 --- a/src/utils/peptideevidencestore.h +++ b/src/utils/peptideevidencestore.h @@ -70,8 +70,7 @@ class PeptideEvidenceStore */ void getSameXicPeptideEvidenceList( std::vector<const PeptideEvidence *> &peptide_evidence_list, - const MsRun *p_msrun, - const PeptideXtp *p_peptide, + const MsRun *p_msrun, const PeptideXtp *p_peptide, unsigned int charge) const; private: