read_npx: Read NPX and metadata file together

Description Usage Arguments Details Value Author(s) Examples

View source: R/read_npx.R

Description

Read one or more NPX files from Olink NPX manager and one metadata file in excel format.

Usage

1
read_npx(npxFn, metaFn, panel = NULL)

Arguments

npxFn

Path to NPX files

metaFn

Path to metadata excel file

panel

character(1): the panel to load. By default, the first panel in the data will be loaded.

Details

The metadata excel file shall have column “SampleID” and other metadata column that ends with “_Factor” (mandatory )or “_Numeric” (optional). If some samples from NPX don't exist in metadata file, it gives a warning. Only the samples in metadata file are kept. If some samples from metadata file don't exists in NPX file, it gives an error.

Value

A tibble in long format with following columns:

SampleID

The sample name

OlinkID

The internal Olink IDs

UniProt

The UniProt IDs

Assay

The protein name

MissingFreq

The percentage of samples that have intensities lower than LOD

Panel

The panel name

Panel_Version

The panel version

PlateID

The unique plate ID

QC_Warning

If the splot passes QC

LOD

The limit of detection

NPX

NPX value

Normalization

The intr-plate normalization method

Author(s)

Ge Tan

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
npxFn <- system.file("extdata",
                     c("20200507_Inflammation_NPX_1.xlsx",
                       "20200625_Inflammation_NPX_2.xlsx"),
                     package = "OlinkR")
metaFn <- system.file("extdata", "Inflammation_Metadata.xlsx", package = "OlinkR")
npx <- read_npx(npxFn, metaFn)

npxFn <- system.file("extdata", "OlinkAnalyze_extdata", "npx_data2.xlsx",
                     package = "OlinkR")
metaFn <- system.file("extdata", "OlinkAnalyze_extdata" ,
                      "npx_data2_meta.xlsx", package = "OlinkR")
npx <- read_npx(npxFn, metaFn)

ge11232002/OlinkR documentation built on Jan. 17, 2022, 8:28 p.m.