add_sample_annotation {lipidr} | R Documentation |
Add sample annotation to Skyline data frame
add_sample_annotation(data, annot_file)
data |
SkylineExperiment object created by |
annot_file |
CSV file with at least 2 columns, sample names & group(s). |
Skyline data.frame 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 SkylineExperiment 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, ]