obtain_mod_MSFragger: Obtain modification information from Peptide data generated...

View source: R/extract_modification.R

obtain_mod_MSFraggerR Documentation

Obtain modification information from Peptide data generated by MSFragger

Description

This function takes MSFragger output containing a 'Assigned Modifications' column with PTM information and converts it into a new dataframe with the desired format of peptide sequences and associated PTM information.

Usage

obtain_mod_MSFragger(
  data,
  column,
  strip_seq_col,
  PTM_table = NULL,
  PTM_annotation = FALSE,
  PTM_mass_column
)

Arguments

data

A data.table with a column containing stripped sequence and a column containing PTM information.

column

The name of the column containing the modified peptide sequences.

strip_seq_col

The name of the column containing the stripped peptide sequences.

PTM_table

A data.table with columns 'PTM_mass' and 'PTM_type' containing PTM annotation information.

PTM_annotation

A logical value indicating whether to include PTM annotation information in the result.

PTM_mass_column

The name of the column containing the PTM mass information

Value

A data.table with 'PTM_position', 'PTM_type', 'reps', and other columns.

Examples

library(data.table)
data <- data.table(
  Peptide = c("DDREDMLVYQAK", "EAAENSLVAYK", "IEAELQDICNDVLELLDK"),
  `Assigned Modifications` = c("C-term(15.9949), 6M(-0.98)", "", "N-term(42.0106)"),
  Condition1 = c("A", "B", "B"),
  Condition2 = c("C", "C", "D")
)
PTM_table <- data.table(
  PTM_mass = c(42.0106, -0.98, 15.9949),
  PTM_type = c("Acet", "Amid", "Ox")
)
column <- "Assigned Modifications"
strip_seq_col <- "Peptide"
converted_data <- obtain_mod_MSFragger(
  data,
  column,
  strip_seq_col,
  PTM_table,
  PTM_annotation = TRUE,
  PTM_mass_column = "PTM_mass"
)


PepMapViz documentation built on April 3, 2025, 6:29 p.m.