# NOT RUN {
# Load libraries
library(dplyr)
library(stringr)
library(tibble)
# DIA-NN example data
diann <- tibble::tibble(
"traceR_proteinGroups" = c("P02768", "P02671", "Q92496", "DummyProt"),
"traceR_mod.peptides" = c("AAC(UniMod:4)LLPK", "RLEVDIDIK",
"EGIVEYPR", "ALTDM(DummyModification)PQMK"),
"traceR_mod.peptides_unknownMods" = c(FALSE, FALSE, FALSE, TRUE),
"traceR_precursor" = c("AAC(UniMod:4)LLPK1", "RLEVDIDIK2",
"EGIVEYPR2", "ALTDM(DummyModification)PQMK3" ),
"traceR_precursor_unknownMods" = c(FALSE, FALSE, FALSE, TRUE)
)
# Spectronaut example data
spectronaut <- tibble::tibble(
"traceR_proteinGroups" = c("P02768", "Q02985", "P02671"),
"traceR_mod.peptides" = c("AAC(UniMod:4)LLPK", "EGIVEYPR", "M(UniMod:35)KPVPDLVPGNFK"),
"traceR_mod.peptides_unknownMods" = c(FALSE, FALSE, FALSE),
"traceR_precursor" = c("AAC(UniMod:4)LLPK1", "EGIVEYPR2", "M(UniMod:35)KPVPDLVPGNFK2"),
"traceR_precursor_unknownMods" = c(FALSE, FALSE, FALSE)
)
# trace proteinGroup level
traced_proteinGroups <- trace_level(
input_df1 = diann,
input_df2 = spectronaut,
analysis_name1 = "DIA-NN",
analysis_name2 = "Spectronaut",
level = "proteinGroups",
filter_unknown_mods = TRUE
)
# trace precursor level
traced_pecursor <- trace_level(
input_df1 = diann,
input_df2 = spectronaut,
analysis_name1 = "DIA-NN",
analysis_name2 = "Spectronaut",
level = "precursor",
filter_unknown_mods = TRUE
)
# }
Run the code above in your browser using DataLab