modsToTableByRaw: Convert list of (mixed)modifications to a frequency table

View source: R/modsToTableByRaw.R

modsToTableByRawR Documentation

Convert list of (mixed)modifications to a frequency table

Description

Convert list of (mixed)modifications to a frequency table

Usage

modsToTableByRaw(
  df_evd,
  name_unmod = "Unmodified",
  name_unmod_inverse = "Modified (total)"
)

Arguments

df_evd

data.frame with 'fc.raw.file' and a 'modifications' column, which contains the modifications for each peptide.

name_unmod

String in 'modifications' which represents an unmodified peptide

name_unmod_inverse

If non-empty, then inverse the frequencies of the 'name_unmod' modifications (i.e. 100-x) IFF they are >=50% on average (across Raw files) and rename them to this string

Value

A data.table with 'fc.raw.file', 'modification_names' (factor), and 'Freq' (0-100)

Examples

data = data.frame(fc.raw.file = rep(c("file A", "file B"),
                                each = 3),
       modifications = c("Oxidation (M)",
                        "Unmodified",
                        "Oxidation (M),Acetyl (Protein N-term)",
                        "2 Oxidation (M)", 
                        "Unmodified", "Unmodified"))
modsToTableByRaw(data)



PTXQC documentation built on May 29, 2024, 9:26 a.m.