View source: R/3.6_read_somascan.R
read_olink | R Documentation |
Read olink file
read_olink(file, sample_excel = NULL, sample_tsv = NULL, by.y = "SampleID")
file |
olinkfile |
sample_excel |
sample excel |
sample_tsv |
sample tsv |
by.y |
sample tsv mergeby column |
SummarizedExperiment
# Example data
npxdt <- data.table::data.table(OlinkAnalyze::npx_data1)[, c(1:11, 17)]
sampledt <- data.table::data.table(OlinkAnalyze::npx_data1)[, c(1, 12:15)]
sampledt %<>% extract(!grepl('CONTROL', SampleID))
sampledt %<>% unique()
# Write to file
file <- paste0(tempfile(), '.olink.csv')
samplefile <- paste0(tempfile(), '.samples.xlsx')
data.table::fwrite(npxdt, file)
writexl::write_xlsx(sampledt, samplefile)
# Read
object <- read_olink(file, sample_excel = samplefile)
biplot(pca(object), color = 'Time', group = 'Subject', shape = 'Treatment')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.