read_olink: Read olink file

View source: R/3.6_read_somascan.R

read_olinkR Documentation

Description

Read olink file

Usage

read_olink(file, sample_excel = NULL, sample_tsv = NULL, by.y = "SampleID")

Arguments

file

olinkfile

sample_excel

sample excel

sample_tsv

sample tsv

by.y

sample tsv mergeby column

Value

SummarizedExperiment

Examples

# 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')

bhagwataditya/importomics documentation built on May 1, 2024, 2:01 a.m.