add_sample_annotation | R Documentation |
Add sample annotation to Skyline data frame
add_sample_annotation(data, annot_file)
data |
LipidomicsExperiment object. |
annot_file |
CSV file or a data.frame with at least 2 columns, sample names & group(s). |
LipidomicsExperiment with sample group information.
datadir <- system.file("extdata", package = "lipidr")
# all csv files
filelist <- list.files(datadir, "data.csv", full.names = TRUE)
d <- read_skyline(filelist)
# Add clinical info to existing LipidomicsExperiment object
clinical_file <- system.file("extdata", "clin.csv", package = "lipidr")
d <- add_sample_annotation(d, clinical_file)
colData(d)
d$group
# Subset samples using clinical information
# Note we are subsetting columns
d[, d$group == "QC"]
# Subset lipids using lipid annotation
# Note we are subsetting rows
d[rowData(d)$istd, ]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.