From e229909a1385c91ad15d2d0828c4bc63350b64b3 Mon Sep 17 00:00:00 2001
From: Olivier Langella <Olivier.Langella@moulon.inra.fr>
Date: Thu, 23 Mar 2017 14:08:30 +0100
Subject: [PATCH] doxygen documentation

---
 src/core/peptidematch.h      | 6 ++++--
 src/core/proteinmatch.cpp    | 2 +-
 src/input/xpipsaxhandler.cpp | 2 +-
 3 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/core/peptidematch.h b/src/core/peptidematch.h
index c65b2021..c1eddbb6 100644
--- a/src/core/peptidematch.h
+++ b/src/core/peptidematch.h
@@ -40,10 +40,12 @@ public :
     void setEvalue(pappso::pappso_double evalue);
     void setExperimentalMass(pappso::pappso_double exp_mass);
     
-           /** @brief start position on the protein sequence (starts at 1, not 0)
+/** @brief set start position of this peptide inside the protein sequence
+     * @param start position in the protein amino acid sequence (starts at 0)
      * */
     void setStart(unsigned int start);
-          /** @brief get start position on the protein sequence (starts at 1, not 0)
+/** @brief get start position of this peptide inside the protein sequence
+     * @return start position in the protein amino acid sequence (starts at 0)
      * */
     unsigned int getStart() const;
     void setCharge(unsigned int charge);
diff --git a/src/core/proteinmatch.cpp b/src/core/proteinmatch.cpp
index d7b8d391..b03473c2 100644
--- a/src/core/proteinmatch.cpp
+++ b/src/core/proteinmatch.cpp
@@ -138,7 +138,7 @@ const pappso::GrpProteinSp & ProteinMatch::getGrpProteinSp() const {
         for (auto & p_peptide_match : _peptide_match_list) {
             if (p_peptide_match->isValidAndChecked()) {
                 size_t size = p_peptide_match->getPeptideSp().get()->size();
-                size_t offset = p_peptide_match->getStart()-1;
+                size_t offset = p_peptide_match->getStart();
                 if (offset >= 0) {
                     for (size_t i=0; (i < size) && (offset < prot_size) ; i++,offset++) {
                         cover_bool[offset] = true;
diff --git a/src/input/xpipsaxhandler.cpp b/src/input/xpipsaxhandler.cpp
index 569c0453..719ebbd8 100644
--- a/src/input/xpipsaxhandler.cpp
+++ b/src/input/xpipsaxhandler.cpp
@@ -241,7 +241,7 @@ bool XpipSaxHandler::startElement_peptide(QXmlAttributes attributes) {
     _p_peptide_match->setEvalue(attributes.value("evalue").simplified().toDouble());
     pappso::pappso_double exp_mass = attributes.value("mhplus_obser").simplified().toDouble() - pappso::MHPLUS;
     _p_peptide_match->setExperimentalMass(exp_mass);
-    _p_peptide_match->setStart(attributes.value("start").simplified().toUInt());
+    _p_peptide_match->setStart(attributes.value("start").simplified().toUInt()-1);
     _p_peptide_match->setCharge(attributes.value("charge").simplified().toUInt());
 
     _p_peptide_match->setCharge(attributes.value("charge").simplified().toUInt());
-- 
GitLab