From cb571c38be34e90fe496372224abbf66dcc5a078 Mon Sep 17 00:00:00 2001
From: Olivier Langella <olivier.langella@u-psud.fr>
Date: Sat, 16 Mar 2019 10:42:38 +0100
Subject: [PATCH] new peptide Nter and Cter columns

---
 .../peptide_list_view/peptidetablemodel.cpp   | 14 +++-
 src/gui/peptide_list_view/peptidetablemodel.h | 68 ++++++++++---------
 2 files changed, 48 insertions(+), 34 deletions(-)

diff --git a/src/gui/peptide_list_view/peptidetablemodel.cpp b/src/gui/peptide_list_view/peptidetablemodel.cpp
index b8ed59b4..e7e4684e 100644
--- a/src/gui/peptide_list_view/peptidetablemodel.cpp
+++ b/src/gui/peptide_list_view/peptidetablemodel.cpp
@@ -149,7 +149,7 @@ PeptideTableModel::rowCount(const QModelIndex &parent) const
 int
 PeptideTableModel::columnCount(const QModelIndex &parent) const
 {
-  return 40;
+  return 42;
 }
 QVariant
 PeptideTableModel::headerData(int section, Qt::Orientation orientation,
@@ -577,9 +577,15 @@ PeptideTableModel::getTitle(std::int8_t column)
       case(std::int8_t)PeptideListColumn::experimental_mz:
         return "observed m/z";
         break;
+      case(std::int8_t)PeptideListColumn::sequence_nter:
+        return "Nter";
+        break;
       case(std::int8_t)PeptideListColumn::sequence:
         return "sequence";
         break;
+      case(std::int8_t)PeptideListColumn::sequence_cter:
+        return "Cter";
+        break;
       case(std::int8_t)PeptideListColumn::modifs:
         return "modifs";
         break;
@@ -712,9 +718,15 @@ PeptideTableModel::getDescription(std::int8_t column)
       case(std::int8_t)PeptideListColumn::experimental_mz:
         return "observed m/z (experimental m/z of precursor)";
         break;
+      case(std::int8_t)PeptideListColumn::sequence_nter:
+        return "flanking protein amino acid on peptide Nter side";
+        break;
       case(std::int8_t)PeptideListColumn::sequence:
         return "peptide sequence";
         break;
+      case(std::int8_t)PeptideListColumn::sequence_cter:
+        return "flanking protein amino acid on peptide Cter side";
+        break;
       case(std::int8_t)PeptideListColumn::modifs:
         return "peptide modifications";
         break;
diff --git a/src/gui/peptide_list_view/peptidetablemodel.h b/src/gui/peptide_list_view/peptidetablemodel.h
index 82addadd..13cad620 100644
--- a/src/gui/peptide_list_view/peptidetablemodel.h
+++ b/src/gui/peptide_list_view/peptidetablemodel.h
@@ -43,40 +43,42 @@ enum class PeptideListColumn : std::int8_t
   rt                                = 6,
   charge                            = 7,
   experimental_mz                   = 8,
-  sequence                          = 9,
-  modifs                            = 10,
-  label                             = 11,
-  start                             = 12,
-  length                            = 13,
-  used                              = 14,
-  subgroups                         = 15,
-  Evalue                            = 16,
-  experimental_mhplus               = 17,
-  theoretical_mhplus                = 18,
-  delta_mhplus                      = 19,
-  delta_ppm                         = 20,
-  peptide_prophet_probability       = 21, ///< no PSI MS description
-  peptide_inter_prophet_probability = 22, ///< no PSI MS description
-  tandem_hyperscore                 = 23, ///< X!Tandem hyperscore MS:1001331
-  mascot_score = 24, ///< PSI-MS MS:1001171 mascot:score 56.16
+  sequence_nter                     = 9,
+  sequence                          = 10,
+  sequence_cter                     = 11,
+  modifs                            = 12,
+  label                             = 13,
+  start                             = 14,
+  length                            = 15,
+  used                              = 16,
+  subgroups                         = 17,
+  Evalue                            = 18,
+  experimental_mhplus               = 19,
+  theoretical_mhplus                = 20,
+  delta_mhplus                      = 21,
+  delta_ppm                         = 22,
+  peptide_prophet_probability       = 23, ///< no PSI MS description
+  peptide_inter_prophet_probability = 24, ///< no PSI MS description
+  tandem_hyperscore                 = 25, ///< X!Tandem hyperscore MS:1001331
+  mascot_score = 26, ///< PSI-MS MS:1001171 mascot:score 56.16
   mascot_expectation_value =
-    25, ///< PSI-MS MS:1001172 mascot:expectation value 2.42102904673618e-006
-  omssa_evalue        = 26, ///< MS:1001328  "OMSSA E-value." [PSI:PI]
-  omssa_pvalue        = 27, ///< MS:1001329  "OMSSA p-value." [PSI:PI]
-  msgfplus_raw        = 28, ///< MS:1002049  "MS-GF raw score." [PSI:PI]
-  msgfplus_denovo     = 29, ///< MS:1002050  "MS-GF de novo score." [PSI:PI]
-  msgfplus_energy     = 30, ///< MS:1002051  "MS-GF energy score." [PSI:PI]
-  msgfplus_SpecEValue = 31, ///< MS:1002052  "MS-GF spectral E-value." [PSI:PI]
-  msgfplus_EValue     = 32, ///< MS:1002053  "MS-GF E-value." [PSI:PI]
-  msgfplus_isotope_error = 33, ///< MS:1002053  "MS-GF E-value." [PSI:PI]
-  comet_xcorr   = 34, ///< MS:1002252  "The Comet result 'XCorr'." [PSI:PI]
-  comet_deltacn = 35, ///< MS:1002253  "The Comet result 'DeltaCn'." [PSI:PI]
+    27, ///< PSI-MS MS:1001172 mascot:expectation value 2.42102904673618e-006
+  omssa_evalue        = 28, ///< MS:1001328  "OMSSA E-value." [PSI:PI]
+  omssa_pvalue        = 29, ///< MS:1001329  "OMSSA p-value." [PSI:PI]
+  msgfplus_raw        = 30, ///< MS:1002049  "MS-GF raw score." [PSI:PI]
+  msgfplus_denovo     = 31, ///< MS:1002050  "MS-GF de novo score." [PSI:PI]
+  msgfplus_energy     = 32, ///< MS:1002051  "MS-GF energy score." [PSI:PI]
+  msgfplus_SpecEValue = 33, ///< MS:1002052  "MS-GF spectral E-value." [PSI:PI]
+  msgfplus_EValue     = 34, ///< MS:1002053  "MS-GF E-value." [PSI:PI]
+  msgfplus_isotope_error = 35, ///< MS:1002053  "MS-GF E-value." [PSI:PI]
+  comet_xcorr   = 36, ///< MS:1002252  "The Comet result 'XCorr'." [PSI:PI]
+  comet_deltacn = 37, ///< MS:1002253  "The Comet result 'DeltaCn'." [PSI:PI]
   comet_deltacnstar =
-    36, ///< MS:1002254  "The Comet result 'DeltaCnStar'." [PSI:PI]
-  comet_spscore = 37, ///< MS:1002255  "The Comet result 'SpScore'." [PSI:PI]
-  comet_sprank  = 38, ///< MS:1002256  "The Comet result 'SpRank'." [PSI:PI]
+    38, ///< MS:1002254  "The Comet result 'DeltaCnStar'." [PSI:PI]
+  comet_spscore = 39, ///< MS:1002255  "The Comet result 'SpScore'." [PSI:PI]
+  comet_sprank  = 40, ///< MS:1002256  "The Comet result 'SpRank'." [PSI:PI]
   comet_expectation_value =
-    39, ///< MS:1002257  "The Comet result 'Expectation value'." [PSI:PI]
+    41, ///< MS:1002257  "The Comet result 'Expectation value'." [PSI:PI]
 };
 
 class PeptideListWindow;
@@ -88,8 +90,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;
 
-- 
GitLab