Loading...
Searching...
No Matches
peptidemodel.h
Go to the documentation of this file.
/**
* \file pappsomspp/processing/specglob/peptidemodel.h
* \date 05/10/2025
* \author Olivier Langella
* \brief SpecPeptidOMS peptide model
* \todo https://www.psidev.info/proforma
*
*/
/*
* SpecGlobTool, Spectra to peptide alignment tool
* Copyright (C) 2025 Olivier Langella
* <olivier.langella@universite-paris-saclay.fr>
*
* This program is free software: you can redistribute ipetide to spectrum
* alignmentt and/or modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#pragma once
#include "pappsomspp/core/types.h"
#include "pappsomspp/core/amino_acid/aa.h"
#include "pappsomspp/export-import-config.h"
namespace pappso
{
namespace specpeptidoms
{
struct AminoAcidModel
{
pappso::Aa m_aminoAcid = pappso::Aa('A');
double m_massDifference = 0;
bool m_skipped = false;
QString toProForma() const;
QString toInterpretation() const;
};
/**
* @brief modelize peptide sequence to facilitate rendering in bracket or proforma
*/
class PMSPP_LIB_DECL PeptideModel : public std::vector<AminoAcidModel>
{
public:
/**
* Default constructor
*/
PeptideModel();
/**
* Destructor
*/
virtual ~PeptideModel();
void reset();
void setCterShift(double mass_shift);
void setNterShift(double mass_shift);
QString toProForma() const;
QString toInterpretation() const;
void setPrecursorMass(double mass);
double getPrecursorMass() const;
static QString toProFormaMass(double mass);
double getMass() const;
/**
* @brief Return the difference between the precursor's mass and the mass modelized by the
* PeptideModel.
*/
double getNonAlignedMass() const;
private:
double m_cterShift = 0;
double m_nterShift = 0;
double m_precursorMass = 0;
};
} // namespace specpeptidoms
} // namespace pappso
aa.h
pappso::Aa
Definition aa.h:45
pappso::specpeptidoms::PeptideModel::toProFormaMass
static QString toProFormaMass(double mass)
Definition peptidemodel.cpp:120
pappso::specpeptidoms::PeptideModel::PeptideModel
PeptideModel()
Definition peptidemodel.cpp:80
pappso::specpeptidoms::PeptideModel::setNterShift
void setNterShift(double mass_shift)
Definition peptidemodel.cpp:103
pappso::specpeptidoms::PeptideModel::m_precursorMass
double m_precursorMass
Definition peptidemodel.h:94
pappso::specpeptidoms::PeptideModel::setCterShift
void setCterShift(double mass_shift)
Definition peptidemodel.cpp:97
pappso::specpeptidoms::PeptideModel::getNonAlignedMass
double getNonAlignedMass() const
Return the difference between the precursor's mass and the mass modelized by the PeptideModel.
Definition peptidemodel.cpp:204
pappso::specpeptidoms::PeptideModel::m_cterShift
double m_cterShift
Definition peptidemodel.h:92
pappso::specpeptidoms::PeptideModel::toProForma
QString toProForma() const
Definition peptidemodel.cpp:146
pappso::specpeptidoms::PeptideModel::m_nterShift
double m_nterShift
Definition peptidemodel.h:93
pappso::specpeptidoms::PeptideModel::getPrecursorMass
double getPrecursorMass() const
Definition peptidemodel.cpp:115
pappso::specpeptidoms::PeptideModel::toInterpretation
QString toInterpretation() const
Definition peptidemodel.cpp:181
pappso::specpeptidoms::PeptideModel::setPrecursorMass
void setPrecursorMass(double mass)
Definition peptidemodel.cpp:109
pappso::specpeptidoms::PeptideModel::getMass
double getMass() const
Definition peptidemodel.cpp:133
pappso::specpeptidoms::PeptideModel::reset
void reset()
Definition peptidemodel.cpp:89
export-import-config.h
PMSPP_LIB_DECL
#define PMSPP_LIB_DECL
Definition export-import-config.h:14
pappso::specpeptidoms
Definition correctiontree.h:40
pappso
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
Definition aa.cpp:39
pappso::specpeptidoms::AminoAcidModel
Definition peptidemodel.h:44
pappso::specpeptidoms::AminoAcidModel::m_massDifference
double m_massDifference
Definition peptidemodel.h:46
pappso::specpeptidoms::AminoAcidModel::toInterpretation
QString toInterpretation() const
Definition peptidemodel.cpp:54
pappso::specpeptidoms::AminoAcidModel::m_aminoAcid
pappso::Aa m_aminoAcid
Definition peptidemodel.h:45
pappso::specpeptidoms::AminoAcidModel::m_skipped
bool m_skipped
Definition peptidemodel.h:47
pappso::specpeptidoms::AminoAcidModel::toProForma
QString toProForma() const
Definition peptidemodel.cpp:39
types.h