Skip to contents

Analysis of the traceR_precursor_unknownMods or traceR_mod.peptides_unknownMods column

Usage

analyze_unknown_mods(
  input_df,
  level = c("precursor, modified_peptides"),
  plot = TRUE,
  plot_characteristic = c("absolute", "relative")
)

Arguments

input_df

A tibble with the traceR_precursor_unknownMods or traceR_mod.peptides_unknownMods column.

level

Choose either precursor for traceR_precursor_unknownMods or modified_peptides for traceR_mod.peptides_unknownMods. Default is precursor.

plot

Logical value, default is TRUE. If TRUE barplot is generated, if FALSE report as output.

plot_characteristic

If absolute the absolute count is displayed in barplot, if relative the relative count is displayed in barplot. Default is absolute. plot_characteristic has no influence on report.

Value

This function returns a plot - absolute/relative counts - or a data frame.

Details

Shows the absolute and relative counts of TRUE/FALSE of the traceR_precursor_unknownMods or traceR_mod.peptides_unknownMods column - as data frame or plot. Duplicate traceR_mod.peptides entries or traceR_precursor entries are removed, respectively.

Author

Oliver Kardell

Examples

# Load libraries
library(dplyr)
library(stringr)
library(ggplot2)
library(tibble)

# Generate data
data <- tibble::tibble(
 "traceR_mod.peptides" = c("AACLLPK",
  "ALTDM(UniMod:35)PQM(UniMod:35)R",
  "ALTDM(DummyModification)PQMK",
  "ALTDM(UniMod:35)PQM(UniMod:35)R",
  "ALTDM(DummyModification)PQMK"),
 "traceR_mod.peptides_unknownMods" = c(FALSE, FALSE, TRUE, FALSE, TRUE),
 "traceR_precursor" = c("AACLLPK2",
  "ALTDM(UniMod:35)PQM(UniMod:35)R2",
  "ALTDM(DummyModification)PQMK3",
  "ALTDM(UniMod:35)PQM(UniMod:35)R2",
  "ALTDM(DummyModification)PQMK3"),
 "traceR_precursor_unknownMods" = c(FALSE, FALSE, TRUE, FALSE, TRUE)
)

# Generate Report - precursor level
analyze_unknown_mods(
 input_df = data,
 level = "precursor",
 plot = FALSE
)
#> # A tibble: 2 x 3
#>   Unknown_Modifications absolute_count relative_count
#> * <lgl>                          <int>          <dbl>
#> 1 FALSE                              2           66.7
#> 2 TRUE                               1           33.3

# Generate relative Plot - peptide level
analyze_unknown_mods(
 input_df = data,
 level = "modified_peptides",
 plot = TRUE,
 plot_characteristic = "relative"
)