# NOT RUN {
# Load libraries
library(tidyr)
library(stringr)
library(tibble)
# DIA-NN example data
diann <- tibble::tibble(
"traceR_traced_proteinGroups" = c("common", "common", "unique"),
"traceR_traced_mod.peptides" = c("common", "unique", "common"),
"traceR_traced_precursor" = c("common", "unique", "common"),
"traceR_proteinGroups" = c("P02768", "P02671", "Q92496"),
"traceR_mod.peptides" = c("AAC(UniMod:4)LLPK", "RLEVDIDIK", "EGIVEYPR"),
"traceR_mod.peptides_unknownMods" = c(FALSE, FALSE, FALSE),
"traceR_precursor" = c("AAC(UniMod:4)LLPK1", "RLEVDIDIK2", "EGIVEYPR2"),
"traceR_precursor_unknownMods" = c(FALSE, FALSE, FALSE)
)
spectronaut <- tibble::tibble(
"traceR_traced_proteinGroups" = c("common", "common", "unique"),
"traceR_traced_mod.peptides" = c("common", "unique", "common"),
"traceR_traced_precursor" = c("common", "unique", "common"),
"traceR_proteinGroups" = c("P02768", "P02671", "Q02985"),
"traceR_mod.peptides" = c("AAC(UniMod:4)LLPK", "M(UniMod:35)KPVPDLVPGNFK", "EGIVEYPR"),
"traceR_mod.peptides_unknownMods" = c(FALSE, FALSE, FALSE),
"traceR_precursor" = c("AAC(UniMod:4)LLPK1", "M(UniMod:35)KPVPDLVPGNFK2", "EGIVEYPR2"),
"traceR_precursor_unknownMods" = c(FALSE, FALSE, FALSE)
)
# Connect Precursor and ProteinGroup level
diann_connected <- connect_traceR_levels(input_df = diann, level = "proteinGroups")
spectronaut_connected <- connect_traceR_levels(input_df = spectronaut, level = "proteinGroups")
# }
Run the code above in your browser using DataLab