read_npx: Read Olink data in R.

View source: R/read_npx.R

read_npxR Documentation

Read Olink data in R.

Description

Imports a file exported from Olink software that quantifies protein levels in NPX, Ct or absolute quantification.

Note: Do not modify the Olink software output file prior to importing it with read_npx as it might fail.

Usage

read_npx(
  filename,
  out_df = "tibble",
  long_format = NULL,
  olink_platform = NULL,
  data_type = NULL,
  .ignore_files = c("README.txt"),
  quiet = TRUE,
  legacy = FALSE
)

read_NPX(
  filename,
  out_df = "tibble",
  long_format = NULL,
  olink_platform = NULL,
  data_type = NULL,
  .ignore_files = c("README.txt"),
  quiet = TRUE,
  legacy = FALSE
)

Arguments

filename

Path to Olink software output file in wide or long format. Expecting extensions "xls" or "xlsx" for excel files, "csv" or "txt" for delim files, "parquet" for parquet files, and "zip" for compressed files.

out_df

The class of the output dataset. One of "tibble" or "arrow". Defaults to "tibble".

long_format

Boolean marking format of input file. One of TRUE for long format and FALSE for wide format files. Defaults to NULL for auto-detection.

olink_platform

Olink platform used to generate the input file. One of "Target 48", "Flex", "Target 96", "Explore 3072", "Explore HT", "Focus", or "Reveal". Defaults to NULL for auto-detection.

data_type

Quantification method of the input data. One of "Ct", "NPX", or "Quantified". Defaults to NULL for auto-detection.

.ignore_files

Character vector of files included in the zip-compressed Olink software output files that should be ignored. Used only for zip-compressed input files (default = c("README.txt")).

quiet

Boolean to print a confirmation message when reading the input file. Applies to excel or delimited input only. TRUE skips printing the message, and FALSE otherwise.

legacy

Boolean to run the legacy version of the read_npx function. Important: should be used only to wide format files from Target 96 or Target 48 with NPX Software version earlier than 1.8! (default FALSE).

Value

Dataset, "tibble" or "ArrowObject", with Olink data in long format.

Author(s)

Klev Diamanti Kathleen Nevola Pascal Pucholt Christoffer Cambronero Boxi Zhang Olof Mansson Marianne Sandin

Examples


file <- system.file("extdata",
                    "npx_data_ext.parquet",
                    package = "OlinkAnalyze")
read_npx(filename = file)



OlinkAnalyze documentation built on June 24, 2026, 1:06 a.m.