PepMapViz: A Versatile Toolkit for Peptide Mapping, Visualization, and Comparative Exploration

Introduction

This vignette demonstrates how to use PepMapViz with input files.

Accessing Input Files

The input files are stored in the inst/extdata/ directory of the package. You can access them using the system.file() function. The example files are searching results from PEAKS software. “Donor” column is added to plot peptides from different donors.

library(PepMapViz)
# Access the input files
input_file_folder <- system.file("extdata", package = "PepMapViz")

# Read the input files
resulting_df <- combine_files_from_folder(input_file_folder)
head(resulting_df)
##                           Peptide -10LgP     Mass Length Delta 1/k0   ppm
##                            <char>  <num>    <num>  <num>      <num> <num>
## 1:      ADYEKHKVYAC(+57.02)EVTHQG  26.08 2033.927     17          0   0.5
## 2:      ADYEKHKVYAC(+57.02)EVTHQG  43.32 2033.927     17          0   3.0
## 3:    ADYEKHKVYAC(+57.02)EVTHQGLS  37.61 2234.043     19          0   2.3
## 4:    ADYEKHKVYAC(+57.02)EVTHQGLS  26.73 2234.043     19          0   4.4
## 5:    ADYEKHKVYAC(+57.02)EVTHQGLS  44.82 2234.043     19          0   2.3
## 6: ADYEKHKVYAC(+57.02)EVTHQGLSSPV  29.12 2517.196     22          0   9.7
##         m/z     z      RT    1/k0 Range     Area Intensity    Scan Precursor Id
##       <num> <num>   <num>        <char>    <num>     <num>   <num>        <num>
## 1: 509.4939     4 31.9954 0.8114-0.8215 5554.165  73379.20 1591380        58236
## 2: 678.9911     3 31.9985 0.9191-0.9292 1305.469  18703.08 1591376        58232
## 3: 745.6968     3 39.5249 0.9050-0.9151 2653.591  38730.42 1978829        86021
## 4: 559.5256     4 39.5073 0.8272-0.8373 2627.366  78978.09 1978842        86034
## 5: 745.6968     3 39.5249 0.9066-0.9167 2653.591  38730.42 1980444        86112
## 6: 630.3182     4 48.1040 0.9272-0.9373       NA        NA 2430176       122840
##                                                                      Source File
##                                                                           <char>
## 1: 20230208_TTS1_ptran0117_OBJ42352_IDB001031_9D1_Boco_IP1_L243_MAPPs_1_1_1419.d
## 2: 20230208_TTS1_ptran0117_OBJ42352_IDB001031_9D1_Boco_IP1_L243_MAPPs_1_1_1419.d
## 3: 20230208_TTS1_ptran0117_OBJ42352_IDB001031_9D1_Boco_IP1_L243_MAPPs_1_1_1419.d
## 4: 20230208_TTS1_ptran0117_OBJ42352_IDB001031_9D1_Boco_IP1_L243_MAPPs_1_1_1419.d
## 5: 20230208_TTS1_ptran0117_OBJ42352_IDB001031_9D1_Boco_IP1_L243_MAPPs_1_1_1419.d
## 6: 20230208_TTS1_ptran0117_OBJ42352_IDB001031_9D1_Boco_IP1_L243_MAPPs_1_1_1419.d
##                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   Accession
##                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      <char>
## 1: A0A087WWV8|A0A087WWV8_HUMAN;Herceptin_LC|Trastuzumab_LC;aVb8-65_LC|aVb8-65_LC|aVb8-65_Light_Chain,;Tecentriq_LC|Atezolizumab_LC;Q6P5S8|Q6P5S8_HUMAN;Q5EFE6|Q5EFE6_HUMAN;V9HW34|V9HW34_HUMAN;JNJ61178104_TNFa_LC|JNJ61178104_TNFa_Light_Chain;Opdivo_LC|Nivolumab_LC;A0A087WYL9|A0A087WYL9_HUMAN;Rybrevant_EGFR_LC|Amivantamab_EGFR_Light_Chain;hA33_LC|hA33_LC;Herceptin_signalseqVHS_LC|Trastuzumab_signalseqVHS_LC;Tecentriq_signalseqNAYA_LC|Atezolizumab_signalseqNAYA_LC;Herceptin_signalseqNAYA_LC|Trastuzumab_signalseqNAYA_LC;JNJ61178104_TNFa_HC|JNJ61178104_TNFa_Heavy_Chain;Q6PJF2|Q6PJF2_HUMAN;Lemtrada_LC|Alemtuzumab_LC;Ly3415244_LC2|Ly3415244_Light_Chain_2;BocoBev_Bev_LC|BocoBev_Bev_Light_Chain;A0A087X130|A0A087X130_HUMAN;Praluent_LC|Alirocumab_LC;MPSK3169A_LC|MPSK3169A_LC;Keytruda_LC|Pembrolizumab_LC;Q8TCD0|Q8TCD0_HUMAN;Cosentyx_LC|Secukinumab_LC;Imfinzi_LC|Durvalumab_LC;Q6GMX0|Q6GMX0_HUMAN;Etrolizumab_LC|Etrolizumab;BocoBev_Boco_LC|BocoBev_Boco_Light_Chain;Tecentriq_signalseqVHS_LC|Atezolizumab_signlaseqVHS_LC;Q6PIL8|Q6PIL8_HUMAN;Q0KKI6|Q0KKI6_HUMAN;Remicade_LC|Infliximab_LC;Bococizumab_LC|Bococizumab_LC;P01834|IGKC_HUMAN;Libtayo_LC|Cemiplimab_LC;TrasBev_1cell_Tras_LC|TrasBev_1cell_Tras_Light_Chain;Q7Z3Y4|Q7Z3Y4_HUMAN;TrasBev_2cell_Tras_LC|TrasBev_2cell_Tras_Light_Chain;TrasBev_1cell_v2_Tras_LC|TrasBev_1cellv2_Tras_Light_Chain;hC6D4_LC|hC6D4.hIgG1;A0A087WTX5|A0A087WTX5_HUMAN;Rybrevant_Met_LC|Amivantamab_Met_Light_Chain;Humira_LC|Adalimumab_LC;A0A087WZW8|A0A087WZW8_HUMAN;KLK5KLK7_KLK5_LC|KLK5KLK7_KLK5_Light_Chain;METMab_LC|Onartuzumab;A0A075B6H6|A0A075B6H6_HUMAN
## 2: A0A087WWV8|A0A087WWV8_HUMAN;Herceptin_LC|Trastuzumab_LC;aVb8-65_LC|aVb8-65_LC|aVb8-65_Light_Chain,;Tecentriq_LC|Atezolizumab_LC;Q6P5S8|Q6P5S8_HUMAN;Q5EFE6|Q5EFE6_HUMAN;V9HW34|V9HW34_HUMAN;JNJ61178104_TNFa_LC|JNJ61178104_TNFa_Light_Chain;Opdivo_LC|Nivolumab_LC;A0A087WYL9|A0A087WYL9_HUMAN;Rybrevant_EGFR_LC|Amivantamab_EGFR_Light_Chain;hA33_LC|hA33_LC;Herceptin_signalseqVHS_LC|Trastuzumab_signalseqVHS_LC;Tecentriq_signalseqNAYA_LC|Atezolizumab_signalseqNAYA_LC;Herceptin_signalseqNAYA_LC|Trastuzumab_signalseqNAYA_LC;JNJ61178104_TNFa_HC|JNJ61178104_TNFa_Heavy_Chain;Q6PJF2|Q6PJF2_HUMAN;Lemtrada_LC|Alemtuzumab_LC;Ly3415244_LC2|Ly3415244_Light_Chain_2;BocoBev_Bev_LC|BocoBev_Bev_Light_Chain;A0A087X130|A0A087X130_HUMAN;Praluent_LC|Alirocumab_LC;MPSK3169A_LC|MPSK3169A_LC;Keytruda_LC|Pembrolizumab_LC;Q8TCD0|Q8TCD0_HUMAN;Cosentyx_LC|Secukinumab_LC;Imfinzi_LC|Durvalumab_LC;Q6GMX0|Q6GMX0_HUMAN;Etrolizumab_LC|Etrolizumab;BocoBev_Boco_LC|BocoBev_Boco_Light_Chain;Tecentriq_signalseqVHS_LC|Atezolizumab_signlaseqVHS_LC;Q6PIL8|Q6PIL8_HUMAN;Q0KKI6|Q0KKI6_HUMAN;Remicade_LC|Infliximab_LC;Bococizumab_LC|Bococizumab_LC;P01834|IGKC_HUMAN;Libtayo_LC|Cemiplimab_LC;TrasBev_1cell_Tras_LC|TrasBev_1cell_Tras_Light_Chain;Q7Z3Y4|Q7Z3Y4_HUMAN;TrasBev_2cell_Tras_LC|TrasBev_2cell_Tras_Light_Chain;TrasBev_1cell_v2_Tras_LC|TrasBev_1cellv2_Tras_Light_Chain;hC6D4_LC|hC6D4.hIgG1;A0A087WTX5|A0A087WTX5_HUMAN;Rybrevant_Met_LC|Amivantamab_Met_Light_Chain;Humira_LC|Adalimumab_LC;A0A087WZW8|A0A087WZW8_HUMAN;KLK5KLK7_KLK5_LC|KLK5KLK7_KLK5_Light_Chain;METMab_LC|Onartuzumab;A0A075B6H6|A0A075B6H6_HUMAN
## 3:                                                 Keytruda_LC|Pembrolizumab_LC;A0A087WWV8|A0A087WWV8_HUMAN;Q8TCD0|Q8TCD0_HUMAN;Imfinzi_LC|Durvalumab_LC;Cosentyx_LC|Secukinumab_LC;Q6GMX0|Q6GMX0_HUMAN;Herceptin_LC|Trastuzumab_LC;aVb8-65_LC|aVb8-65_LC|aVb8-65_Light_Chain,;Tecentriq_LC|Atezolizumab_LC;BocoBev_Boco_LC|BocoBev_Boco_Light_Chain;Tecentriq_signalseqVHS_LC|Atezolizumab_signlaseqVHS_LC;Q6PIL8|Q6PIL8_HUMAN;Q0KKI6|Q0KKI6_HUMAN;Q6P5S8|Q6P5S8_HUMAN;Q5EFE6|Q5EFE6_HUMAN;V9HW34|V9HW34_HUMAN;Remicade_LC|Infliximab_LC;Bococizumab_LC|Bococizumab_LC;JNJ61178104_TNFa_LC|JNJ61178104_TNFa_Light_Chain;P01834|IGKC_HUMAN;Libtayo_LC|Cemiplimab_LC;Opdivo_LC|Nivolumab_LC;A0A087WYL9|A0A087WYL9_HUMAN;TrasBev_1cell_Tras_LC|TrasBev_1cell_Tras_Light_Chain;Rybrevant_EGFR_LC|Amivantamab_EGFR_Light_Chain;Q7Z3Y4|Q7Z3Y4_HUMAN;TrasBev_1cell_v2_Tras_LC|TrasBev_1cellv2_Tras_Light_Chain;TrasBev_2cell_Tras_LC|TrasBev_2cell_Tras_Light_Chain;hA33_LC|hA33_LC;A0A087WTX5|A0A087WTX5_HUMAN;Herceptin_signalseqVHS_LC|Trastuzumab_signalseqVHS_LC;Tecentriq_signalseqNAYA_LC|Atezolizumab_signalseqNAYA_LC;Herceptin_signalseqNAYA_LC|Trastuzumab_signalseqNAYA_LC;JNJ61178104_TNFa_HC|JNJ61178104_TNFa_Heavy_Chain;Rybrevant_Met_LC|Amivantamab_Met_Light_Chain;Humira_LC|Adalimumab_LC;Q6PJF2|Q6PJF2_HUMAN;Lemtrada_LC|Alemtuzumab_LC;Ly3415244_LC2|Ly3415244_Light_Chain_2;BocoBev_Bev_LC|BocoBev_Bev_Light_Chain;A0A087X130|A0A087X130_HUMAN;Praluent_LC|Alirocumab_LC;A0A087WZW8|A0A087WZW8_HUMAN;KLK5KLK7_KLK5_LC|KLK5KLK7_KLK5_Light_Chain;METMab_LC|Onartuzumab;A0A075B6H6|A0A075B6H6_HUMAN;MPSK3169A_LC|MPSK3169A_LC
## 4:                                                 Keytruda_LC|Pembrolizumab_LC;A0A087WWV8|A0A087WWV8_HUMAN;Q8TCD0|Q8TCD0_HUMAN;Imfinzi_LC|Durvalumab_LC;Cosentyx_LC|Secukinumab_LC;Q6GMX0|Q6GMX0_HUMAN;Herceptin_LC|Trastuzumab_LC;aVb8-65_LC|aVb8-65_LC|aVb8-65_Light_Chain,;Tecentriq_LC|Atezolizumab_LC;BocoBev_Boco_LC|BocoBev_Boco_Light_Chain;Tecentriq_signalseqVHS_LC|Atezolizumab_signlaseqVHS_LC;Q6PIL8|Q6PIL8_HUMAN;Q0KKI6|Q0KKI6_HUMAN;Q6P5S8|Q6P5S8_HUMAN;Q5EFE6|Q5EFE6_HUMAN;V9HW34|V9HW34_HUMAN;Remicade_LC|Infliximab_LC;Bococizumab_LC|Bococizumab_LC;JNJ61178104_TNFa_LC|JNJ61178104_TNFa_Light_Chain;P01834|IGKC_HUMAN;Libtayo_LC|Cemiplimab_LC;Opdivo_LC|Nivolumab_LC;A0A087WYL9|A0A087WYL9_HUMAN;TrasBev_1cell_Tras_LC|TrasBev_1cell_Tras_Light_Chain;Rybrevant_EGFR_LC|Amivantamab_EGFR_Light_Chain;Q7Z3Y4|Q7Z3Y4_HUMAN;TrasBev_1cell_v2_Tras_LC|TrasBev_1cellv2_Tras_Light_Chain;TrasBev_2cell_Tras_LC|TrasBev_2cell_Tras_Light_Chain;hA33_LC|hA33_LC;A0A087WTX5|A0A087WTX5_HUMAN;Herceptin_signalseqVHS_LC|Trastuzumab_signalseqVHS_LC;Tecentriq_signalseqNAYA_LC|Atezolizumab_signalseqNAYA_LC;Herceptin_signalseqNAYA_LC|Trastuzumab_signalseqNAYA_LC;JNJ61178104_TNFa_HC|JNJ61178104_TNFa_Heavy_Chain;Rybrevant_Met_LC|Amivantamab_Met_Light_Chain;Humira_LC|Adalimumab_LC;Q6PJF2|Q6PJF2_HUMAN;Lemtrada_LC|Alemtuzumab_LC;Ly3415244_LC2|Ly3415244_Light_Chain_2;BocoBev_Bev_LC|BocoBev_Bev_Light_Chain;A0A087X130|A0A087X130_HUMAN;Praluent_LC|Alirocumab_LC;A0A087WZW8|A0A087WZW8_HUMAN;KLK5KLK7_KLK5_LC|KLK5KLK7_KLK5_Light_Chain;METMab_LC|Onartuzumab;A0A075B6H6|A0A075B6H6_HUMAN;MPSK3169A_LC|MPSK3169A_LC
## 5:                                                 Keytruda_LC|Pembrolizumab_LC;A0A087WWV8|A0A087WWV8_HUMAN;Q8TCD0|Q8TCD0_HUMAN;Imfinzi_LC|Durvalumab_LC;Cosentyx_LC|Secukinumab_LC;Q6GMX0|Q6GMX0_HUMAN;Herceptin_LC|Trastuzumab_LC;aVb8-65_LC|aVb8-65_LC|aVb8-65_Light_Chain,;Tecentriq_LC|Atezolizumab_LC;BocoBev_Boco_LC|BocoBev_Boco_Light_Chain;Tecentriq_signalseqVHS_LC|Atezolizumab_signlaseqVHS_LC;Q6PIL8|Q6PIL8_HUMAN;Q0KKI6|Q0KKI6_HUMAN;Q6P5S8|Q6P5S8_HUMAN;Q5EFE6|Q5EFE6_HUMAN;V9HW34|V9HW34_HUMAN;Remicade_LC|Infliximab_LC;Bococizumab_LC|Bococizumab_LC;JNJ61178104_TNFa_LC|JNJ61178104_TNFa_Light_Chain;P01834|IGKC_HUMAN;Libtayo_LC|Cemiplimab_LC;Opdivo_LC|Nivolumab_LC;A0A087WYL9|A0A087WYL9_HUMAN;TrasBev_1cell_Tras_LC|TrasBev_1cell_Tras_Light_Chain;Rybrevant_EGFR_LC|Amivantamab_EGFR_Light_Chain;Q7Z3Y4|Q7Z3Y4_HUMAN;TrasBev_1cell_v2_Tras_LC|TrasBev_1cellv2_Tras_Light_Chain;TrasBev_2cell_Tras_LC|TrasBev_2cell_Tras_Light_Chain;hA33_LC|hA33_LC;A0A087WTX5|A0A087WTX5_HUMAN;Herceptin_signalseqVHS_LC|Trastuzumab_signalseqVHS_LC;Tecentriq_signalseqNAYA_LC|Atezolizumab_signalseqNAYA_LC;Herceptin_signalseqNAYA_LC|Trastuzumab_signalseqNAYA_LC;JNJ61178104_TNFa_HC|JNJ61178104_TNFa_Heavy_Chain;Rybrevant_Met_LC|Amivantamab_Met_Light_Chain;Humira_LC|Adalimumab_LC;Q6PJF2|Q6PJF2_HUMAN;Lemtrada_LC|Alemtuzumab_LC;Ly3415244_LC2|Ly3415244_Light_Chain_2;BocoBev_Bev_LC|BocoBev_Bev_Light_Chain;A0A087X130|A0A087X130_HUMAN;Praluent_LC|Alirocumab_LC;A0A087WZW8|A0A087WZW8_HUMAN;KLK5KLK7_KLK5_LC|KLK5KLK7_KLK5_Light_Chain;METMab_LC|Onartuzumab;A0A075B6H6|A0A075B6H6_HUMAN;MPSK3169A_LC|MPSK3169A_LC
## 6: A0A087WWV8|A0A087WWV8_HUMAN;Herceptin_LC|Trastuzumab_LC;aVb8-65_LC|aVb8-65_LC|aVb8-65_Light_Chain,;Tecentriq_LC|Atezolizumab_LC;Q6P5S8|Q6P5S8_HUMAN;Q5EFE6|Q5EFE6_HUMAN;V9HW34|V9HW34_HUMAN;JNJ61178104_TNFa_LC|JNJ61178104_TNFa_Light_Chain;Opdivo_LC|Nivolumab_LC;A0A087WYL9|A0A087WYL9_HUMAN;Rybrevant_EGFR_LC|Amivantamab_EGFR_Light_Chain;hA33_LC|hA33_LC;Herceptin_signalseqVHS_LC|Trastuzumab_signalseqVHS_LC;Tecentriq_signalseqNAYA_LC|Atezolizumab_signalseqNAYA_LC;Herceptin_signalseqNAYA_LC|Trastuzumab_signalseqNAYA_LC;JNJ61178104_TNFa_HC|JNJ61178104_TNFa_Heavy_Chain;Q6PJF2|Q6PJF2_HUMAN;Lemtrada_LC|Alemtuzumab_LC;Ly3415244_LC2|Ly3415244_Light_Chain_2;BocoBev_Bev_LC|BocoBev_Bev_Light_Chain;A0A087X130|A0A087X130_HUMAN;Praluent_LC|Alirocumab_LC;MPSK3169A_LC|MPSK3169A_LC;Keytruda_LC|Pembrolizumab_LC;Q8TCD0|Q8TCD0_HUMAN;Imfinzi_LC|Durvalumab_LC;Cosentyx_LC|Secukinumab_LC;Q6GMX0|Q6GMX0_HUMAN;Etrolizumab_LC|Etrolizumab;BocoBev_Boco_LC|BocoBev_Boco_Light_Chain;Tecentriq_signalseqVHS_LC|Atezolizumab_signlaseqVHS_LC;Q6PIL8|Q6PIL8_HUMAN;Q0KKI6|Q0KKI6_HUMAN;Remicade_LC|Infliximab_LC;Bococizumab_LC|Bococizumab_LC;P01834|IGKC_HUMAN;Libtayo_LC|Cemiplimab_LC;TrasBev_1cell_Tras_LC|TrasBev_1cell_Tras_Light_Chain;Q7Z3Y4|Q7Z3Y4_HUMAN;TrasBev_1cell_v2_Tras_LC|TrasBev_1cellv2_Tras_Light_Chain;TrasBev_2cell_Tras_LC|TrasBev_2cell_Tras_Light_Chain;hC6D4_LC|hC6D4.hIgG1;A0A087WTX5|A0A087WTX5_HUMAN;Rybrevant_Met_LC|Amivantamab_Met_Light_Chain;Humira_LC|Adalimumab_LC;A0A087WZW8|A0A087WZW8_HUMAN;KLK5KLK7_KLK5_LC|KLK5KLK7_KLK5_Light_Chain;METMab_LC|Onartuzumab;A0A075B6H6|A0A075B6H6_HUMAN
##                     PTM                           AScore  Donor
##                  <char>                           <char> <char>
## 1: Carbamidomethylation C11:Carbamidomethylation:1001.00     D1
## 2: Carbamidomethylation C11:Carbamidomethylation:1001.00     D1
## 3: Carbamidomethylation C11:Carbamidomethylation:1001.00     D1
## 4: Carbamidomethylation C11:Carbamidomethylation:1001.00     D1
## 5: Carbamidomethylation C11:Carbamidomethylation:1001.00     D1
## 6: Carbamidomethylation C11:Carbamidomethylation:1001.00     D1

Strip the sequence

This function takes outputs from multiple platform, a data frame with a column containing peptide sequences with modifications and converts it into a new dataframe with plain peptide sequences without modifications.

# Strip the sequence
striped_data_peaks <- strip_sequence(resulting_df, "Peptide", "Sequence", "PEAKS")
head(striped_data_peaks)
##                           Peptide -10LgP     Mass Length Delta 1/k0   ppm
##                            <char>  <num>    <num>  <num>      <num> <num>
## 1:      ADYEKHKVYAC(+57.02)EVTHQG  26.08 2033.927     17          0   0.5
## 2:      ADYEKHKVYAC(+57.02)EVTHQG  43.32 2033.927     17          0   3.0
## 3:    ADYEKHKVYAC(+57.02)EVTHQGLS  37.61 2234.043     19          0   2.3
## 4:    ADYEKHKVYAC(+57.02)EVTHQGLS  26.73 2234.043     19          0   4.4
## 5:    ADYEKHKVYAC(+57.02)EVTHQGLS  44.82 2234.043     19          0   2.3
## 6: ADYEKHKVYAC(+57.02)EVTHQGLSSPV  29.12 2517.196     22          0   9.7
##         m/z     z      RT    1/k0 Range     Area Intensity    Scan Precursor Id
##       <num> <num>   <num>        <char>    <num>     <num>   <num>        <num>
## 1: 509.4939     4 31.9954 0.8114-0.8215 5554.165  73379.20 1591380        58236
## 2: 678.9911     3 31.9985 0.9191-0.9292 1305.469  18703.08 1591376        58232
## 3: 745.6968     3 39.5249 0.9050-0.9151 2653.591  38730.42 1978829        86021
## 4: 559.5256     4 39.5073 0.8272-0.8373 2627.366  78978.09 1978842        86034
## 5: 745.6968     3 39.5249 0.9066-0.9167 2653.591  38730.42 1980444        86112
## 6: 630.3182     4 48.1040 0.9272-0.9373       NA        NA 2430176       122840
##                                                                      Source File
##                                                                           <char>
## 1: 20230208_TTS1_ptran0117_OBJ42352_IDB001031_9D1_Boco_IP1_L243_MAPPs_1_1_1419.d
## 2: 20230208_TTS1_ptran0117_OBJ42352_IDB001031_9D1_Boco_IP1_L243_MAPPs_1_1_1419.d
## 3: 20230208_TTS1_ptran0117_OBJ42352_IDB001031_9D1_Boco_IP1_L243_MAPPs_1_1_1419.d
## 4: 20230208_TTS1_ptran0117_OBJ42352_IDB001031_9D1_Boco_IP1_L243_MAPPs_1_1_1419.d
## 5: 20230208_TTS1_ptran0117_OBJ42352_IDB001031_9D1_Boco_IP1_L243_MAPPs_1_1_1419.d
## 6: 20230208_TTS1_ptran0117_OBJ42352_IDB001031_9D1_Boco_IP1_L243_MAPPs_1_1_1419.d
##                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   Accession
##                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      <char>
## 1: A0A087WWV8|A0A087WWV8_HUMAN;Herceptin_LC|Trastuzumab_LC;aVb8-65_LC|aVb8-65_LC|aVb8-65_Light_Chain,;Tecentriq_LC|Atezolizumab_LC;Q6P5S8|Q6P5S8_HUMAN;Q5EFE6|Q5EFE6_HUMAN;V9HW34|V9HW34_HUMAN;JNJ61178104_TNFa_LC|JNJ61178104_TNFa_Light_Chain;Opdivo_LC|Nivolumab_LC;A0A087WYL9|A0A087WYL9_HUMAN;Rybrevant_EGFR_LC|Amivantamab_EGFR_Light_Chain;hA33_LC|hA33_LC;Herceptin_signalseqVHS_LC|Trastuzumab_signalseqVHS_LC;Tecentriq_signalseqNAYA_LC|Atezolizumab_signalseqNAYA_LC;Herceptin_signalseqNAYA_LC|Trastuzumab_signalseqNAYA_LC;JNJ61178104_TNFa_HC|JNJ61178104_TNFa_Heavy_Chain;Q6PJF2|Q6PJF2_HUMAN;Lemtrada_LC|Alemtuzumab_LC;Ly3415244_LC2|Ly3415244_Light_Chain_2;BocoBev_Bev_LC|BocoBev_Bev_Light_Chain;A0A087X130|A0A087X130_HUMAN;Praluent_LC|Alirocumab_LC;MPSK3169A_LC|MPSK3169A_LC;Keytruda_LC|Pembrolizumab_LC;Q8TCD0|Q8TCD0_HUMAN;Cosentyx_LC|Secukinumab_LC;Imfinzi_LC|Durvalumab_LC;Q6GMX0|Q6GMX0_HUMAN;Etrolizumab_LC|Etrolizumab;BocoBev_Boco_LC|BocoBev_Boco_Light_Chain;Tecentriq_signalseqVHS_LC|Atezolizumab_signlaseqVHS_LC;Q6PIL8|Q6PIL8_HUMAN;Q0KKI6|Q0KKI6_HUMAN;Remicade_LC|Infliximab_LC;Bococizumab_LC|Bococizumab_LC;P01834|IGKC_HUMAN;Libtayo_LC|Cemiplimab_LC;TrasBev_1cell_Tras_LC|TrasBev_1cell_Tras_Light_Chain;Q7Z3Y4|Q7Z3Y4_HUMAN;TrasBev_2cell_Tras_LC|TrasBev_2cell_Tras_Light_Chain;TrasBev_1cell_v2_Tras_LC|TrasBev_1cellv2_Tras_Light_Chain;hC6D4_LC|hC6D4.hIgG1;A0A087WTX5|A0A087WTX5_HUMAN;Rybrevant_Met_LC|Amivantamab_Met_Light_Chain;Humira_LC|Adalimumab_LC;A0A087WZW8|A0A087WZW8_HUMAN;KLK5KLK7_KLK5_LC|KLK5KLK7_KLK5_Light_Chain;METMab_LC|Onartuzumab;A0A075B6H6|A0A075B6H6_HUMAN
## 2: A0A087WWV8|A0A087WWV8_HUMAN;Herceptin_LC|Trastuzumab_LC;aVb8-65_LC|aVb8-65_LC|aVb8-65_Light_Chain,;Tecentriq_LC|Atezolizumab_LC;Q6P5S8|Q6P5S8_HUMAN;Q5EFE6|Q5EFE6_HUMAN;V9HW34|V9HW34_HUMAN;JNJ61178104_TNFa_LC|JNJ61178104_TNFa_Light_Chain;Opdivo_LC|Nivolumab_LC;A0A087WYL9|A0A087WYL9_HUMAN;Rybrevant_EGFR_LC|Amivantamab_EGFR_Light_Chain;hA33_LC|hA33_LC;Herceptin_signalseqVHS_LC|Trastuzumab_signalseqVHS_LC;Tecentriq_signalseqNAYA_LC|Atezolizumab_signalseqNAYA_LC;Herceptin_signalseqNAYA_LC|Trastuzumab_signalseqNAYA_LC;JNJ61178104_TNFa_HC|JNJ61178104_TNFa_Heavy_Chain;Q6PJF2|Q6PJF2_HUMAN;Lemtrada_LC|Alemtuzumab_LC;Ly3415244_LC2|Ly3415244_Light_Chain_2;BocoBev_Bev_LC|BocoBev_Bev_Light_Chain;A0A087X130|A0A087X130_HUMAN;Praluent_LC|Alirocumab_LC;MPSK3169A_LC|MPSK3169A_LC;Keytruda_LC|Pembrolizumab_LC;Q8TCD0|Q8TCD0_HUMAN;Cosentyx_LC|Secukinumab_LC;Imfinzi_LC|Durvalumab_LC;Q6GMX0|Q6GMX0_HUMAN;Etrolizumab_LC|Etrolizumab;BocoBev_Boco_LC|BocoBev_Boco_Light_Chain;Tecentriq_signalseqVHS_LC|Atezolizumab_signlaseqVHS_LC;Q6PIL8|Q6PIL8_HUMAN;Q0KKI6|Q0KKI6_HUMAN;Remicade_LC|Infliximab_LC;Bococizumab_LC|Bococizumab_LC;P01834|IGKC_HUMAN;Libtayo_LC|Cemiplimab_LC;TrasBev_1cell_Tras_LC|TrasBev_1cell_Tras_Light_Chain;Q7Z3Y4|Q7Z3Y4_HUMAN;TrasBev_2cell_Tras_LC|TrasBev_2cell_Tras_Light_Chain;TrasBev_1cell_v2_Tras_LC|TrasBev_1cellv2_Tras_Light_Chain;hC6D4_LC|hC6D4.hIgG1;A0A087WTX5|A0A087WTX5_HUMAN;Rybrevant_Met_LC|Amivantamab_Met_Light_Chain;Humira_LC|Adalimumab_LC;A0A087WZW8|A0A087WZW8_HUMAN;KLK5KLK7_KLK5_LC|KLK5KLK7_KLK5_Light_Chain;METMab_LC|Onartuzumab;A0A075B6H6|A0A075B6H6_HUMAN
## 3:                                                 Keytruda_LC|Pembrolizumab_LC;A0A087WWV8|A0A087WWV8_HUMAN;Q8TCD0|Q8TCD0_HUMAN;Imfinzi_LC|Durvalumab_LC;Cosentyx_LC|Secukinumab_LC;Q6GMX0|Q6GMX0_HUMAN;Herceptin_LC|Trastuzumab_LC;aVb8-65_LC|aVb8-65_LC|aVb8-65_Light_Chain,;Tecentriq_LC|Atezolizumab_LC;BocoBev_Boco_LC|BocoBev_Boco_Light_Chain;Tecentriq_signalseqVHS_LC|Atezolizumab_signlaseqVHS_LC;Q6PIL8|Q6PIL8_HUMAN;Q0KKI6|Q0KKI6_HUMAN;Q6P5S8|Q6P5S8_HUMAN;Q5EFE6|Q5EFE6_HUMAN;V9HW34|V9HW34_HUMAN;Remicade_LC|Infliximab_LC;Bococizumab_LC|Bococizumab_LC;JNJ61178104_TNFa_LC|JNJ61178104_TNFa_Light_Chain;P01834|IGKC_HUMAN;Libtayo_LC|Cemiplimab_LC;Opdivo_LC|Nivolumab_LC;A0A087WYL9|A0A087WYL9_HUMAN;TrasBev_1cell_Tras_LC|TrasBev_1cell_Tras_Light_Chain;Rybrevant_EGFR_LC|Amivantamab_EGFR_Light_Chain;Q7Z3Y4|Q7Z3Y4_HUMAN;TrasBev_1cell_v2_Tras_LC|TrasBev_1cellv2_Tras_Light_Chain;TrasBev_2cell_Tras_LC|TrasBev_2cell_Tras_Light_Chain;hA33_LC|hA33_LC;A0A087WTX5|A0A087WTX5_HUMAN;Herceptin_signalseqVHS_LC|Trastuzumab_signalseqVHS_LC;Tecentriq_signalseqNAYA_LC|Atezolizumab_signalseqNAYA_LC;Herceptin_signalseqNAYA_LC|Trastuzumab_signalseqNAYA_LC;JNJ61178104_TNFa_HC|JNJ61178104_TNFa_Heavy_Chain;Rybrevant_Met_LC|Amivantamab_Met_Light_Chain;Humira_LC|Adalimumab_LC;Q6PJF2|Q6PJF2_HUMAN;Lemtrada_LC|Alemtuzumab_LC;Ly3415244_LC2|Ly3415244_Light_Chain_2;BocoBev_Bev_LC|BocoBev_Bev_Light_Chain;A0A087X130|A0A087X130_HUMAN;Praluent_LC|Alirocumab_LC;A0A087WZW8|A0A087WZW8_HUMAN;KLK5KLK7_KLK5_LC|KLK5KLK7_KLK5_Light_Chain;METMab_LC|Onartuzumab;A0A075B6H6|A0A075B6H6_HUMAN;MPSK3169A_LC|MPSK3169A_LC
## 4:                                                 Keytruda_LC|Pembrolizumab_LC;A0A087WWV8|A0A087WWV8_HUMAN;Q8TCD0|Q8TCD0_HUMAN;Imfinzi_LC|Durvalumab_LC;Cosentyx_LC|Secukinumab_LC;Q6GMX0|Q6GMX0_HUMAN;Herceptin_LC|Trastuzumab_LC;aVb8-65_LC|aVb8-65_LC|aVb8-65_Light_Chain,;Tecentriq_LC|Atezolizumab_LC;BocoBev_Boco_LC|BocoBev_Boco_Light_Chain;Tecentriq_signalseqVHS_LC|Atezolizumab_signlaseqVHS_LC;Q6PIL8|Q6PIL8_HUMAN;Q0KKI6|Q0KKI6_HUMAN;Q6P5S8|Q6P5S8_HUMAN;Q5EFE6|Q5EFE6_HUMAN;V9HW34|V9HW34_HUMAN;Remicade_LC|Infliximab_LC;Bococizumab_LC|Bococizumab_LC;JNJ61178104_TNFa_LC|JNJ61178104_TNFa_Light_Chain;P01834|IGKC_HUMAN;Libtayo_LC|Cemiplimab_LC;Opdivo_LC|Nivolumab_LC;A0A087WYL9|A0A087WYL9_HUMAN;TrasBev_1cell_Tras_LC|TrasBev_1cell_Tras_Light_Chain;Rybrevant_EGFR_LC|Amivantamab_EGFR_Light_Chain;Q7Z3Y4|Q7Z3Y4_HUMAN;TrasBev_1cell_v2_Tras_LC|TrasBev_1cellv2_Tras_Light_Chain;TrasBev_2cell_Tras_LC|TrasBev_2cell_Tras_Light_Chain;hA33_LC|hA33_LC;A0A087WTX5|A0A087WTX5_HUMAN;Herceptin_signalseqVHS_LC|Trastuzumab_signalseqVHS_LC;Tecentriq_signalseqNAYA_LC|Atezolizumab_signalseqNAYA_LC;Herceptin_signalseqNAYA_LC|Trastuzumab_signalseqNAYA_LC;JNJ61178104_TNFa_HC|JNJ61178104_TNFa_Heavy_Chain;Rybrevant_Met_LC|Amivantamab_Met_Light_Chain;Humira_LC|Adalimumab_LC;Q6PJF2|Q6PJF2_HUMAN;Lemtrada_LC|Alemtuzumab_LC;Ly3415244_LC2|Ly3415244_Light_Chain_2;BocoBev_Bev_LC|BocoBev_Bev_Light_Chain;A0A087X130|A0A087X130_HUMAN;Praluent_LC|Alirocumab_LC;A0A087WZW8|A0A087WZW8_HUMAN;KLK5KLK7_KLK5_LC|KLK5KLK7_KLK5_Light_Chain;METMab_LC|Onartuzumab;A0A075B6H6|A0A075B6H6_HUMAN;MPSK3169A_LC|MPSK3169A_LC
## 5:                                                 Keytruda_LC|Pembrolizumab_LC;A0A087WWV8|A0A087WWV8_HUMAN;Q8TCD0|Q8TCD0_HUMAN;Imfinzi_LC|Durvalumab_LC;Cosentyx_LC|Secukinumab_LC;Q6GMX0|Q6GMX0_HUMAN;Herceptin_LC|Trastuzumab_LC;aVb8-65_LC|aVb8-65_LC|aVb8-65_Light_Chain,;Tecentriq_LC|Atezolizumab_LC;BocoBev_Boco_LC|BocoBev_Boco_Light_Chain;Tecentriq_signalseqVHS_LC|Atezolizumab_signlaseqVHS_LC;Q6PIL8|Q6PIL8_HUMAN;Q0KKI6|Q0KKI6_HUMAN;Q6P5S8|Q6P5S8_HUMAN;Q5EFE6|Q5EFE6_HUMAN;V9HW34|V9HW34_HUMAN;Remicade_LC|Infliximab_LC;Bococizumab_LC|Bococizumab_LC;JNJ61178104_TNFa_LC|JNJ61178104_TNFa_Light_Chain;P01834|IGKC_HUMAN;Libtayo_LC|Cemiplimab_LC;Opdivo_LC|Nivolumab_LC;A0A087WYL9|A0A087WYL9_HUMAN;TrasBev_1cell_Tras_LC|TrasBev_1cell_Tras_Light_Chain;Rybrevant_EGFR_LC|Amivantamab_EGFR_Light_Chain;Q7Z3Y4|Q7Z3Y4_HUMAN;TrasBev_1cell_v2_Tras_LC|TrasBev_1cellv2_Tras_Light_Chain;TrasBev_2cell_Tras_LC|TrasBev_2cell_Tras_Light_Chain;hA33_LC|hA33_LC;A0A087WTX5|A0A087WTX5_HUMAN;Herceptin_signalseqVHS_LC|Trastuzumab_signalseqVHS_LC;Tecentriq_signalseqNAYA_LC|Atezolizumab_signalseqNAYA_LC;Herceptin_signalseqNAYA_LC|Trastuzumab_signalseqNAYA_LC;JNJ61178104_TNFa_HC|JNJ61178104_TNFa_Heavy_Chain;Rybrevant_Met_LC|Amivantamab_Met_Light_Chain;Humira_LC|Adalimumab_LC;Q6PJF2|Q6PJF2_HUMAN;Lemtrada_LC|Alemtuzumab_LC;Ly3415244_LC2|Ly3415244_Light_Chain_2;BocoBev_Bev_LC|BocoBev_Bev_Light_Chain;A0A087X130|A0A087X130_HUMAN;Praluent_LC|Alirocumab_LC;A0A087WZW8|A0A087WZW8_HUMAN;KLK5KLK7_KLK5_LC|KLK5KLK7_KLK5_Light_Chain;METMab_LC|Onartuzumab;A0A075B6H6|A0A075B6H6_HUMAN;MPSK3169A_LC|MPSK3169A_LC
## 6: A0A087WWV8|A0A087WWV8_HUMAN;Herceptin_LC|Trastuzumab_LC;aVb8-65_LC|aVb8-65_LC|aVb8-65_Light_Chain,;Tecentriq_LC|Atezolizumab_LC;Q6P5S8|Q6P5S8_HUMAN;Q5EFE6|Q5EFE6_HUMAN;V9HW34|V9HW34_HUMAN;JNJ61178104_TNFa_LC|JNJ61178104_TNFa_Light_Chain;Opdivo_LC|Nivolumab_LC;A0A087WYL9|A0A087WYL9_HUMAN;Rybrevant_EGFR_LC|Amivantamab_EGFR_Light_Chain;hA33_LC|hA33_LC;Herceptin_signalseqVHS_LC|Trastuzumab_signalseqVHS_LC;Tecentriq_signalseqNAYA_LC|Atezolizumab_signalseqNAYA_LC;Herceptin_signalseqNAYA_LC|Trastuzumab_signalseqNAYA_LC;JNJ61178104_TNFa_HC|JNJ61178104_TNFa_Heavy_Chain;Q6PJF2|Q6PJF2_HUMAN;Lemtrada_LC|Alemtuzumab_LC;Ly3415244_LC2|Ly3415244_Light_Chain_2;BocoBev_Bev_LC|BocoBev_Bev_Light_Chain;A0A087X130|A0A087X130_HUMAN;Praluent_LC|Alirocumab_LC;MPSK3169A_LC|MPSK3169A_LC;Keytruda_LC|Pembrolizumab_LC;Q8TCD0|Q8TCD0_HUMAN;Imfinzi_LC|Durvalumab_LC;Cosentyx_LC|Secukinumab_LC;Q6GMX0|Q6GMX0_HUMAN;Etrolizumab_LC|Etrolizumab;BocoBev_Boco_LC|BocoBev_Boco_Light_Chain;Tecentriq_signalseqVHS_LC|Atezolizumab_signlaseqVHS_LC;Q6PIL8|Q6PIL8_HUMAN;Q0KKI6|Q0KKI6_HUMAN;Remicade_LC|Infliximab_LC;Bococizumab_LC|Bococizumab_LC;P01834|IGKC_HUMAN;Libtayo_LC|Cemiplimab_LC;TrasBev_1cell_Tras_LC|TrasBev_1cell_Tras_Light_Chain;Q7Z3Y4|Q7Z3Y4_HUMAN;TrasBev_1cell_v2_Tras_LC|TrasBev_1cellv2_Tras_Light_Chain;TrasBev_2cell_Tras_LC|TrasBev_2cell_Tras_Light_Chain;hC6D4_LC|hC6D4.hIgG1;A0A087WTX5|A0A087WTX5_HUMAN;Rybrevant_Met_LC|Amivantamab_Met_Light_Chain;Humira_LC|Adalimumab_LC;A0A087WZW8|A0A087WZW8_HUMAN;KLK5KLK7_KLK5_LC|KLK5KLK7_KLK5_Light_Chain;METMab_LC|Onartuzumab;A0A075B6H6|A0A075B6H6_HUMAN
##                     PTM                           AScore  Donor
##                  <char>                           <char> <char>
## 1: Carbamidomethylation C11:Carbamidomethylation:1001.00     D1
## 2: Carbamidomethylation C11:Carbamidomethylation:1001.00     D1
## 3: Carbamidomethylation C11:Carbamidomethylation:1001.00     D1
## 4: Carbamidomethylation C11:Carbamidomethylation:1001.00     D1
## 5: Carbamidomethylation C11:Carbamidomethylation:1001.00     D1
## 6: Carbamidomethylation C11:Carbamidomethylation:1001.00     D1
##                  Sequence
##                    <char>
## 1:      ADYEKHKVYACEVTHQG
## 2:      ADYEKHKVYACEVTHQG
## 3:    ADYEKHKVYACEVTHQGLS
## 4:    ADYEKHKVYACEVTHQGLS
## 5:    ADYEKHKVYACEVTHQGLS
## 6: ADYEKHKVYACEVTHQGLSSPV

Extract modifications information

This function takes outputs from multiple platform, a data frame with a column containing modified peptide sequence with the detailed post translational modification(PTM) information and converts it into a new dataframe with plain peptide sequences and associated PTM information.

# Extract modifications information
PTM_table <- data.frame(PTM_mass = c("15.99", ".98", "57.02", "42.01"),
                        PTM_type = c("Ox", "Deamid", "Cam", "Acetyl"))
converted_data_peaks <- obtain_mod(
  striped_data_peaks,
  "Peptide",
  "PEAKS",
  strip_seq_col = NULL,
  PTM_table,
  PTM_annotation = TRUE,
  PTM_mass_column = "PTM_mass"
)
head(converted_data_peaks)
## Key: <PTM_mass>
##    PTM_mass PTM_position  reps             Peptide -10LgP     Mass Length
##      <char>        <num> <num>              <char>  <num>    <num>  <num>
## 1:     <NA>           NA     1 AENTLQSFRQDVDNASLAR  26.93 2134.040     19
## 2:     <NA>           NA     1     AKVQWKVDNALQSGN  32.89 1656.858     15
## 3:     <NA>           NA     1      AKVQWKVDNALQSG  24.38 1542.815     14
## 4:     <NA>           NA     1    AKVQWKVDNALQSGNS  46.89 1743.890     16
## 5:     <NA>           NA     1    AKVQWKVDNALQSGNS  42.78 1743.890     16
## 6:     <NA>           NA     1    AKVQWKVDNALQSGNS  39.31 1743.890     16
##    Delta 1/k0   ppm      m/z     z      RT    1/k0 Range       Area  Intensity
##         <num> <num>    <num> <num>   <num>        <char>      <num>      <num>
## 1:          0   0.9 712.3613     3 64.0846 0.9642-0.9743   802.0634   9006.403
## 2:          0  -0.1 829.4441     2 51.1203 1.0806-1.0907  1093.7975  12566.528
## 3:          0   3.9 772.4252     2 51.9183 1.0480-1.0581         NA         NA
## 4:          0   6.4 872.9662     2 50.9561 1.0983-1.1084 32295.9060 333551.380
## 5:          0   6.4 872.9662     2 50.9561 1.0951-1.1051 32295.9060 333551.380
## 6:          0   6.4 872.9662     2 50.9561 1.0999-1.1100 32295.9060 333551.380
##       Scan Precursor Id
##      <num>        <num>
## 1: 3270489       198105
## 2: 2586900       136308
## 3: 2630329       140113
## 4: 2576838       135390
## 5: 2575164       135240
## 6: 2575182       135258
##                                                                      Source File
##                                                                           <char>
## 1: 20230208_TTS1_ptran0117_OBJ42352_IDB001031_9D1_Boco_IP1_L243_MAPPs_1_1_1419.d
## 2: 20230208_TTS1_ptran0117_OBJ42352_IDB001031_9D1_Boco_IP1_L243_MAPPs_1_1_1419.d
## 3: 20230208_TTS1_ptran0117_OBJ42352_IDB001031_9D1_Boco_IP1_L243_MAPPs_1_1_1419.d
## 4: 20230208_TTS1_ptran0117_OBJ42352_IDB001031_9D1_Boco_IP1_L243_MAPPs_1_1_1419.d
## 5: 20230208_TTS1_ptran0117_OBJ42352_IDB001031_9D1_Boco_IP1_L243_MAPPs_1_1_1419.d
## 6: 20230208_TTS1_ptran0117_OBJ42352_IDB001031_9D1_Boco_IP1_L243_MAPPs_1_1_1419.d
##                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           Accession
##                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              <char>
## 1:                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        B0YJC5|B0YJC5_HUMAN;Q5JVS8|Q5JVS8_HUMAN;B0YJC4|B0YJC4_HUMAN;P08670|VIME_HUMAN;Q53HU8|Q53HU8_HUMAN;B3KRK8|B3KRK8_HUMAN;V9HWE1|V9HWE1_HUMAN
## 2: A0A087WWV8|A0A087WWV8_HUMAN;S6B2A1|S6B2A1_HUMAN;S6AWF4|S6AWF4_HUMAN;Herceptin_LC|Trastuzumab_LC;aVb8-65_LC|aVb8-65_LC|aVb8-65_Light_Chain,;Tecentriq_LC|Atezolizumab_LC;Q6P5S8|Q6P5S8_HUMAN;Q5EFE6|Q5EFE6_HUMAN;V9HW34|V9HW34_HUMAN;Q569I7|Q569I7_HUMAN;JNJ61178104_TNFa_LC|JNJ61178104_TNFa_Light_Chain;Opdivo_LC|Nivolumab_LC;A0A087WYL9|A0A087WYL9_HUMAN;Rybrevant_EGFR_LC|Amivantamab_EGFR_Light_Chain;S6AWD6|S6AWD6_HUMAN;hA33_LC|hA33_LC;Herceptin_signalseqVHS_LC|Trastuzumab_signalseqVHS_LC;Tecentriq_signalseqNAYA_LC|Atezolizumab_signalseqNAYA_LC;Herceptin_signalseqNAYA_LC|Trastuzumab_signalseqNAYA_LC;Lemtrada_LC|Alemtuzumab_LC;Q6PJF2|Q6PJF2_HUMAN;Ly3415244_LC2|Ly3415244_Light_Chain_2;BocoBev_Bev_LC|BocoBev_Bev_Light_Chain;A0A087X130|A0A087X130_HUMAN;Praluent_LC|Alirocumab_LC;MPSK3169A_LC|MPSK3169A_LC;Keytruda_LC|Pembrolizumab_LC;Q8TCD0|Q8TCD0_HUMAN;S6AWE3|S6AWE3_HUMAN;Imfinzi_LC|Durvalumab_LC;Q6GMX0|Q6GMX0_HUMAN;S6B2C3|S6B2C3_HUMAN;BocoBev_Boco_LC|BocoBev_Boco_Light_Chain;Tecentriq_signalseqVHS_LC|Atezolizumab_signlaseqVHS_LC;Q6PIL8|Q6PIL8_HUMAN;Q0KKI6|Q0KKI6_HUMAN;Remicade_LC|Infliximab_LC;Bococizumab_LC|Bococizumab_LC;P01834|IGKC_HUMAN;Libtayo_LC|Cemiplimab_LC;S6BGE9|S6BGE9_HUMAN;Q7Z3Y4|Q7Z3Y4_HUMAN;TrasBev_2cell_Tras_LC|TrasBev_2cell_Tras_Light_Chain;A0A087WTX5|A0A087WTX5_HUMAN;Humira_LC|Adalimumab_LC;S6AWD3|S6AWD3_HUMAN;A0A087WZW8|A0A087WZW8_HUMAN;KLK5KLK7_KLK5_LC|KLK5KLK7_KLK5_Light_Chain;METMab_LC|Onartuzumab;A0A075B6H6|A0A075B6H6_HUMAN
## 3: A0A087WWV8|A0A087WWV8_HUMAN;S6B2A1|S6B2A1_HUMAN;S6AWF4|S6AWF4_HUMAN;Herceptin_LC|Trastuzumab_LC;aVb8-65_LC|aVb8-65_LC|aVb8-65_Light_Chain,;Tecentriq_LC|Atezolizumab_LC;Q6P5S8|Q6P5S8_HUMAN;Q5EFE6|Q5EFE6_HUMAN;V9HW34|V9HW34_HUMAN;Q569I7|Q569I7_HUMAN;JNJ61178104_TNFa_LC|JNJ61178104_TNFa_Light_Chain;Opdivo_LC|Nivolumab_LC;A0A087WYL9|A0A087WYL9_HUMAN;Rybrevant_EGFR_LC|Amivantamab_EGFR_Light_Chain;S6AWD6|S6AWD6_HUMAN;hA33_LC|hA33_LC;Herceptin_signalseqVHS_LC|Trastuzumab_signalseqVHS_LC;Tecentriq_signalseqNAYA_LC|Atezolizumab_signalseqNAYA_LC;Herceptin_signalseqNAYA_LC|Trastuzumab_signalseqNAYA_LC;Lemtrada_LC|Alemtuzumab_LC;Q6PJF2|Q6PJF2_HUMAN;Ly3415244_LC2|Ly3415244_Light_Chain_2;BocoBev_Bev_LC|BocoBev_Bev_Light_Chain;A0A087X130|A0A087X130_HUMAN;Praluent_LC|Alirocumab_LC;MPSK3169A_LC|MPSK3169A_LC;Keytruda_LC|Pembrolizumab_LC;Q8TCD0|Q8TCD0_HUMAN;S6AWE3|S6AWE3_HUMAN;Imfinzi_LC|Durvalumab_LC;Q6GMX0|Q6GMX0_HUMAN;S6B2C3|S6B2C3_HUMAN;BocoBev_Boco_LC|BocoBev_Boco_Light_Chain;Tecentriq_signalseqVHS_LC|Atezolizumab_signlaseqVHS_LC;Q6PIL8|Q6PIL8_HUMAN;Q0KKI6|Q0KKI6_HUMAN;Remicade_LC|Infliximab_LC;Bococizumab_LC|Bococizumab_LC;P01834|IGKC_HUMAN;Libtayo_LC|Cemiplimab_LC;S6BGE9|S6BGE9_HUMAN;Q7Z3Y4|Q7Z3Y4_HUMAN;TrasBev_2cell_Tras_LC|TrasBev_2cell_Tras_Light_Chain;A0A087WTX5|A0A087WTX5_HUMAN;Humira_LC|Adalimumab_LC;S6AWD3|S6AWD3_HUMAN;A0A087WZW8|A0A087WZW8_HUMAN;KLK5KLK7_KLK5_LC|KLK5KLK7_KLK5_Light_Chain;METMab_LC|Onartuzumab;A0A075B6H6|A0A075B6H6_HUMAN
## 4:                                                             Keytruda_LC|Pembrolizumab_LC;A0A087WWV8|A0A087WWV8_HUMAN;Q8TCD0|Q8TCD0_HUMAN;S6AWE3|S6AWE3_HUMAN;Imfinzi_LC|Durvalumab_LC;Q6GMX0|Q6GMX0_HUMAN;Herceptin_LC|Trastuzumab_LC;aVb8-65_LC|aVb8-65_LC|aVb8-65_Light_Chain,;S6B2C3|S6B2C3_HUMAN;Tecentriq_LC|Atezolizumab_LC;BocoBev_Boco_LC|BocoBev_Boco_Light_Chain;Tecentriq_signalseqVHS_LC|Atezolizumab_signlaseqVHS_LC;Q6PIL8|Q6PIL8_HUMAN;Q0KKI6|Q0KKI6_HUMAN;Q6P5S8|Q6P5S8_HUMAN;Q5EFE6|Q5EFE6_HUMAN;V9HW34|V9HW34_HUMAN;Remicade_LC|Infliximab_LC;Q569I7|Q569I7_HUMAN;Bococizumab_LC|Bococizumab_LC;JNJ61178104_TNFa_LC|JNJ61178104_TNFa_Light_Chain;P01834|IGKC_HUMAN;Libtayo_LC|Cemiplimab_LC;Opdivo_LC|Nivolumab_LC;A0A087WYL9|A0A087WYL9_HUMAN;S6BGE9|S6BGE9_HUMAN;Rybrevant_EGFR_LC|Amivantamab_EGFR_Light_Chain;hA33_LC|hA33_LC;Q7Z3Y4|Q7Z3Y4_HUMAN;TrasBev_2cell_Tras_LC|TrasBev_2cell_Tras_Light_Chain;A0A087WTX5|A0A087WTX5_HUMAN;Herceptin_signalseqVHS_LC|Trastuzumab_signalseqVHS_LC;Tecentriq_signalseqNAYA_LC|Atezolizumab_signalseqNAYA_LC;Herceptin_signalseqNAYA_LC|Trastuzumab_signalseqNAYA_LC;Lemtrada_LC|Alemtuzumab_LC;Q6PJF2|Q6PJF2_HUMAN;Humira_LC|Adalimumab_LC;Ly3415244_LC2|Ly3415244_Light_Chain_2;BocoBev_Bev_LC|BocoBev_Bev_Light_Chain;A0A087X130|A0A087X130_HUMAN;Praluent_LC|Alirocumab_LC;S6AWD3|S6AWD3_HUMAN;A0A087WZW8|A0A087WZW8_HUMAN;KLK5KLK7_KLK5_LC|KLK5KLK7_KLK5_Light_Chain;METMab_LC|Onartuzumab;A0A075B6H6|A0A075B6H6_HUMAN;MPSK3169A_LC|MPSK3169A_LC
## 5:                                                             Keytruda_LC|Pembrolizumab_LC;A0A087WWV8|A0A087WWV8_HUMAN;Q8TCD0|Q8TCD0_HUMAN;S6AWE3|S6AWE3_HUMAN;Imfinzi_LC|Durvalumab_LC;Q6GMX0|Q6GMX0_HUMAN;Herceptin_LC|Trastuzumab_LC;aVb8-65_LC|aVb8-65_LC|aVb8-65_Light_Chain,;S6B2C3|S6B2C3_HUMAN;Tecentriq_LC|Atezolizumab_LC;BocoBev_Boco_LC|BocoBev_Boco_Light_Chain;Tecentriq_signalseqVHS_LC|Atezolizumab_signlaseqVHS_LC;Q6PIL8|Q6PIL8_HUMAN;Q0KKI6|Q0KKI6_HUMAN;Q6P5S8|Q6P5S8_HUMAN;Q5EFE6|Q5EFE6_HUMAN;V9HW34|V9HW34_HUMAN;Remicade_LC|Infliximab_LC;Q569I7|Q569I7_HUMAN;Bococizumab_LC|Bococizumab_LC;JNJ61178104_TNFa_LC|JNJ61178104_TNFa_Light_Chain;P01834|IGKC_HUMAN;Libtayo_LC|Cemiplimab_LC;Opdivo_LC|Nivolumab_LC;A0A087WYL9|A0A087WYL9_HUMAN;S6BGE9|S6BGE9_HUMAN;Rybrevant_EGFR_LC|Amivantamab_EGFR_Light_Chain;hA33_LC|hA33_LC;Q7Z3Y4|Q7Z3Y4_HUMAN;TrasBev_2cell_Tras_LC|TrasBev_2cell_Tras_Light_Chain;A0A087WTX5|A0A087WTX5_HUMAN;Herceptin_signalseqVHS_LC|Trastuzumab_signalseqVHS_LC;Tecentriq_signalseqNAYA_LC|Atezolizumab_signalseqNAYA_LC;Herceptin_signalseqNAYA_LC|Trastuzumab_signalseqNAYA_LC;Lemtrada_LC|Alemtuzumab_LC;Q6PJF2|Q6PJF2_HUMAN;Humira_LC|Adalimumab_LC;Ly3415244_LC2|Ly3415244_Light_Chain_2;BocoBev_Bev_LC|BocoBev_Bev_Light_Chain;A0A087X130|A0A087X130_HUMAN;Praluent_LC|Alirocumab_LC;S6AWD3|S6AWD3_HUMAN;A0A087WZW8|A0A087WZW8_HUMAN;KLK5KLK7_KLK5_LC|KLK5KLK7_KLK5_Light_Chain;METMab_LC|Onartuzumab;A0A075B6H6|A0A075B6H6_HUMAN;MPSK3169A_LC|MPSK3169A_LC
## 6:                                                             Keytruda_LC|Pembrolizumab_LC;A0A087WWV8|A0A087WWV8_HUMAN;Q8TCD0|Q8TCD0_HUMAN;S6AWE3|S6AWE3_HUMAN;Imfinzi_LC|Durvalumab_LC;Q6GMX0|Q6GMX0_HUMAN;Herceptin_LC|Trastuzumab_LC;aVb8-65_LC|aVb8-65_LC|aVb8-65_Light_Chain,;S6B2C3|S6B2C3_HUMAN;Tecentriq_LC|Atezolizumab_LC;BocoBev_Boco_LC|BocoBev_Boco_Light_Chain;Tecentriq_signalseqVHS_LC|Atezolizumab_signlaseqVHS_LC;Q6PIL8|Q6PIL8_HUMAN;Q0KKI6|Q0KKI6_HUMAN;Q6P5S8|Q6P5S8_HUMAN;Q5EFE6|Q5EFE6_HUMAN;V9HW34|V9HW34_HUMAN;Remicade_LC|Infliximab_LC;Q569I7|Q569I7_HUMAN;Bococizumab_LC|Bococizumab_LC;JNJ61178104_TNFa_LC|JNJ61178104_TNFa_Light_Chain;P01834|IGKC_HUMAN;Libtayo_LC|Cemiplimab_LC;Opdivo_LC|Nivolumab_LC;A0A087WYL9|A0A087WYL9_HUMAN;S6BGE9|S6BGE9_HUMAN;Rybrevant_EGFR_LC|Amivantamab_EGFR_Light_Chain;hA33_LC|hA33_LC;Q7Z3Y4|Q7Z3Y4_HUMAN;TrasBev_2cell_Tras_LC|TrasBev_2cell_Tras_Light_Chain;A0A087WTX5|A0A087WTX5_HUMAN;Herceptin_signalseqVHS_LC|Trastuzumab_signalseqVHS_LC;Tecentriq_signalseqNAYA_LC|Atezolizumab_signalseqNAYA_LC;Herceptin_signalseqNAYA_LC|Trastuzumab_signalseqNAYA_LC;Lemtrada_LC|Alemtuzumab_LC;Q6PJF2|Q6PJF2_HUMAN;Humira_LC|Adalimumab_LC;Ly3415244_LC2|Ly3415244_Light_Chain_2;BocoBev_Bev_LC|BocoBev_Bev_Light_Chain;A0A087X130|A0A087X130_HUMAN;Praluent_LC|Alirocumab_LC;S6AWD3|S6AWD3_HUMAN;A0A087WZW8|A0A087WZW8_HUMAN;KLK5KLK7_KLK5_LC|KLK5KLK7_KLK5_Light_Chain;METMab_LC|Onartuzumab;A0A075B6H6|A0A075B6H6_HUMAN;MPSK3169A_LC|MPSK3169A_LC
##       PTM AScore  Donor            Sequence PTM_type
##    <char> <char> <char>              <char>   <char>
## 1:                   D1 AENTLQSFRQDVDNASLAR     <NA>
## 2:                   D1     AKVQWKVDNALQSGN     <NA>
## 3:                   D1      AKVQWKVDNALQSG     <NA>
## 4:                   D1    AKVQWKVDNALQSGNS     <NA>
## 5:                   D1    AKVQWKVDNALQSGNS     <NA>
## 6:                   D1    AKVQWKVDNALQSGNS     <NA>

Match peptide sequence with provided sequence and calculate positions

This function matches peptide sequences from the ‘peptide_data’ data frame to corresponding provided whole sequences in the ‘whole_seq’ data frame. It calculates the start and end positions of the matched sequences and returns data frame with information about the matching positions.

# Match peptide sequence with provided sequence and calculate positions
whole_seq <- data.frame(
  Epitope = c("Boco", "Boco"),
  Chain = c("HC", "LC"),
  Region_Sequence = c("QVQLVQSGAEVKKPGASVKVSCKASGYTFTSYYMHWVRQAPGQGLEWMGEISPFGGRTNYNEKFKSRVTMTRDTSTSTVYMELSSLRSEDTAVYYCARERPLYASDLWGQGTTVTVSSASTKGPSVFPLAPCSRSTSESTAALGCLVKDYFPEPVTVSWNSGALTSGVHTFPAVLQSSGLYSLSSVVTVPSSNFGTQTYTCNVDHKPSNTKVDKTVERKCCVECPPCPAPPVAGPSVFLFPPKPKDTLMISRTPEVTCVVVDVSHEDPEVQFNWYVDGVEVHNAKTKPREEQFNSTFRVVSVLTVVHQDWLNGKEYKCKVSNKGLPSSIEKTISKTKGQPREPQVYTLPPSREEMTKNQVSLTCLVKGFYPSDIAVEWESNGQPENNYKTTPPMLDSDGSFFLYSKLTVDKSRWQQGNVFSCSVMHEALHNHYTQKSLSLSPGK", 
                      "DIQMTQSPSSLSASVGDRVTITCRASQGISSALAWYQQKPGKAPKLLIYSASYRYTGVPSRFSGSGSGTDFTFTISSLQPEDIATYYCQQRYSLWRTFGQGTKLEIKRTVAAPSVFIFPPSDEQLKSGTASVVCLLNNFYPREAKVQWKVDNALQSGNSQESVTEQDSKDSTYSLSSTLTLSKADYEKHKVYACEVTHQGLSSPVTKSFNRGEC"
  )
)
matching_result <- match_and_calculate_positions(
  converted_data_peaks,
  'Sequence',
  whole_seq,
  match_columns = NULL,
  sequence_length = c(10, 30),
  column_keep = c(
    "PTM_mass",
    "PTM_position",
    "reps",
    "Area",
    "Donor",
    "PTM_type"
  )
)
head(matching_result)
##           Sequence PTM_mass PTM_position reps     Area Donor PTM_type Epitope
## 2  AKVQWKVDNALQSGN     <NA>         <NA>    1 1093.797    D1     <NA>    Boco
## 3   AKVQWKVDNALQSG     <NA>         <NA>    1     <NA>    D1     <NA>    Boco
## 4 AKVQWKVDNALQSGNS     <NA>         <NA>    1 32295.91    D1     <NA>    Boco
## 5 AKVQWKVDNALQSGNS     <NA>         <NA>    1 32295.91    D1     <NA>    Boco
## 6 AKVQWKVDNALQSGNS     <NA>         <NA>    1 32295.91    D1     <NA>    Boco
## 7 AKVQWKVDNALQSGNS     <NA>         <NA>    1 32295.91    D1     <NA>    Boco
##   Chain Start_Position End_Position
## 2    LC            144          158
## 3    LC            144          157
## 4    LC            144          159
## 5    LC            144          159
## 6    LC            144          159
## 7    LC            144          159

Quantify matched peptide sequences

This function takes peptide matching result and quantifies the matched peptide sequences based on the provided quantification method. If the quantification method is ‘PSM’, the function calculates the number of matched peptide sequences in each positions of the provided whole sequence. If the quantification method is ‘Area’, the function select the max value in area column of identical peptide sequences and calculates the sum of the areas of the matched peptide sequences in each positions of the provided whole sequence.

# Quantify matched peptide sequences by PSM
matching_columns = c("Chain", "Epitope")
distinct_columns = c("Donor")
data_with_psm <- peptide_quantification(
  whole_seq,
  matching_result,
  matching_columns,
  distinct_columns,
  quantify_method = "PSM",
  with_PTM = TRUE,
  reps = TRUE
)
region <- data.frame(
  Epitope = c("Boco", "Boco", "Boco", "Boco", "Boco", "Boco"),
  Chain = c("HC", "HC", "HC", "HC", "LC", "LC"),
  Region = c("VH", "CH1", "CH2", "CH3", "VL", "CL"),
  Region_start = c(1,119,229,338,1,108),
  Region_end = c(118,228,337,444,107,214)
)
result_with_psm <- data.frame()
for (i in 1:nrow(region)) {
  chain <- region$Chain[i]
  region_start <- region$Region_start[i]
  region_end <- region$Region_end[i]
  region_name <- region$Region[i]

  temp <- data_with_psm[data_with_psm$Chain == chain & 
                          data_with_psm$Position >= region_start & 
                          data_with_psm$Position <= region_end, ]
  temp$Region <- region_name

  result_with_psm <- rbind(result_with_psm, temp)
}
  
head(result_with_psm)
##   Character Position Chain Epitope PSM Donor   PTM PTM_type Region
## 1         Q        1    HC    Boco   0    D1 FALSE     <NA>     VH
## 2         V        2    HC    Boco   0    D1 FALSE     <NA>     VH
## 3         Q        3    HC    Boco   0    D1 FALSE     <NA>     VH
## 4         L        4    HC    Boco   0    D1 FALSE     <NA>     VH
## 5         V        5    HC    Boco   0    D1 FALSE     <NA>     VH
## 6         Q        6    HC    Boco   0    D1 FALSE     <NA>     VH

Plotting peptide in whole provided sequence

This function takes the quantified peptide data frame and plots the matched peptide sequences in the provided whole sequence. The function returns a ggplot object with the matched peptide sequences plotted in the provided whole sequence.

# Plotting peptide in whole provided sequence
domain <- data.frame(
  domain_type = c("CDR H1", "CDR H2", "CDR H3", "CDR L1", "CDR L2", "CDR L3"),
  Region = c("VH", "VH", "VH",  "VL", "VL", "VL"),
  Epitope = c("Boco", "Boco", "Boco", "Boco", "Boco", "Boco"),
  domain_start = c(26, 50, 97,  24, 50, 89),
  domain_end = c(35, 66, 107,  34, 56, 97)
)
x_axis_vars <- c("Region")
y_axis_vars <- c("Donor")
column_order <- list(
    Donor = "D1,D2,D3,D4,D5,D6,D7,D8",
    Region = "VH,CH1,CH2,CH3,VL,CL"
)
domain_color <- c(
"CDR H1" = "#F8766D",
"CDR H2" = "#B79F00",
"CDR H3" = "#00BA38",
"CDR L1" = "#00BFC4",
"CDR L2" = "#619CFF",
"CDR L3" = "#F564E3"
)
PTM_color <- c(
  "Ox" = "red",
  "Deamid" = "cyan",
  "Cam" = "blue",
  "Acetyl" = "magenta"
)
label_value = list(Donor = "D1")
p_psm <- create_peptide_plot(
  result_with_psm,
  y_axis_vars,
  x_axis_vars,
  y_expand = c(0.2, 0.2),
  x_expand = c(0.5, 0.5),
  theme_options = list(legend.box = "horizontal"),
  labs_options = list(title = "PSM Plot", x = "Position", fill = "PSM"),
  color_fill_column = 'PSM',
  fill_gradient_options = list(limits = c(0, 160)),  # Set the limits for the color scale
  label_size = 1.9,
  add_domain = TRUE,
  domain = domain,
  domain_start_column = "domain_start",
  domain_end_column = "domain_end",
  domain_type_column = "domain_type",
  domain_color = domain_color,
  PTM = TRUE,
  PTM_type_column = "PTM_type",
  PTM_color = PTM_color,
  add_label = TRUE,
  label_column = "Character",
  label_value = label_value,
  column_order = column_order
)
print(p_psm)