diff --git a/src/core/peptidematch.h b/src/core/peptidematch.h index c65b2021dbd71e2c8ab592d2763a21d7cb6e64df..c1eddbb63105163562491024040563c03f7af7b4 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 d7b8d391e0ef7d6b0f97f714b7c81a53675e6268..b03473c2a54233d51399456a9a5b3dea2417fe05 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 569c04532af61109af060bebf8401a31b1bc7421..719ebbd8ef226421d71a57ea45d285e3ff13ae7f 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());