olink_bridgeability_plot: Plots for each bridgeable assays between two products.

View source: R/plot_is_bridgeable.R

olink_bridgeability_plotR Documentation

Description

Plots for each bridgeable assays between two products.

Usage

olink_bridgeability_plot(
  df,
  check_log = NULL,
  olink_id = NULL,
  median_counts_threshold = 150L,
  min_count = 10L
)

Arguments

df

A tibble containing the cross-product bridge normalized dataset generated by olink_normalization.

check_log

A named list returned by check_npx(). If NULL, check_npx() will be run internally using df.

olink_id

Character vector of Olink assay identifiers OlinkID for which bridgeability plots will be created. If null, plots for all assays in data will be created. (default = NULL)

median_counts_threshold

Threshold indicating the minimum median counts for each product (default = 150).

min_count

Threshold indicating the minimum number of counts per data point (default = 10). Data below min_count are excluded.

Value

An object of class "ggplot" containing 4 plots for each assay.

Author(s)

Amrita Kar Klev Diamanti

Generates a combined plot per assay containing a violin and boxplot for IQR ranges; correlation plot of NPX values; a median count bar plot and KS plots from the 2 products.

Examples


if (rlang::is_installed(pkg = c("ggpubr"))) {
  npx_ht <- OlinkAnalyze:::data_ht_small |>
    dplyr::filter(
      .data[["SampleType"]] == "SAMPLE"
    )

  npx_3072 <- OlinkAnalyze:::data_3k_small |>
    dplyr::filter(
      .data[["SampleType"]] == "SAMPLE"
    )

  overlapping_samples <- intersect(
    x = npx_ht$SampleID,
    y = npx_3072$SampleID
  )

  data_norm <- OlinkAnalyze::olink_normalization(
    df1 = npx_ht,
    df2 = npx_3072,
    overlapping_samples_df1 = overlapping_samples,
    df1_project_nr = "Explore HT",
    df2_project_nr = "Explore 3072",
    reference_project = "Explore HT",
    df1_check_log = check_npx(df = npx_ht) |>
      suppressMessages() |>
      suppressWarnings(),
    df2_check_log = check_npx(df = npx_3072) |>
      suppressMessages() |>
      suppressWarnings()
  )

  data_norm_bridge_p <- OlinkAnalyze::olink_bridgeability_plot(
    df = data_norm,
    check_log = check_npx(df = data_norm) |>
      suppressMessages() |>
      suppressWarnings(),
    olink_id = c("OID40770", "OID40835"),
    median_counts_threshold = 150L,
    min_count = 10L
  )
}



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