Creates horizontal or vertical boxplots showing sample distributions (normalized and/or unnormalized) with internal control reference lines. Options to save as PDF.

sampleBoxplot(
  runs,
  metrics = c("unnormed", "normed", "all"),
  plateIDs = NULL,
  output_dir = NULL,
  plot_name = NULL,
  plot_title = NULL,
  horizontal = TRUE,
  internal_control_label = "Internal Control",
  plot_width = NULL,
  plot_height = NULL,
  title_cex = 0.65,
  axis_label_cex = 0.5,
  data_label_cex = 0.3,
  IC_line_width = 1,
  sample_subset_list = NULL,
  target_subset_list = NULL,
  sample_exclude_list = NULL,
  target_exclude_list = NULL
)

Arguments

runs

A named list of run data output from loadNULISAseq() function or a list of these outputs for multiple runs.

metrics

Character specifying which data to plot: "unnormed", "normed", or "all" (default: "normed").

plateIDs

Optional vector of plate names (default: extract from runs).

output_dir

Directory to save PDF files (default: NULL).

plot_name

Optional base name for output files, uses plateIDs automatically (default: NULL).

plot_title

Optional custom plot title in additional to plateIDs (default: NULL).

horizontal

Logical indicating horizontal (TRUE) or vertical (FALSE) orientation (default: TRUE).

internal_control_label

Label for internal control line (default: "Internal Control").

plot_width

Optional plot width in inches (default: NULL uses automatic sizing).

plot_height

Optional plot height in inches (default: NULL uses automatic sizing).

title_cex

Numeric value controlling title size (default: 0.65).

axis_label_cex

Numeric value controlling axis label size (default: 0.5).

data_label_cex

Numeric value controlling data label size (default: 0.3).

IC_line_width

Numeric value controlling internal control line width (default: 1).

sample_subset_list

Optional list of sample subsets for each plate. Can be either:

  • A list of character vectors - each vector contains sample names to include for the corresponding plate (e.g., `list(c('A_01_C001 P3', 'A_02_C044 P1'), c('A_01_C040 P1'))` for two plates)

  • A single character vector - only subsets samples from the first plate

Note: Control samples (IPC, NC, SC, Bridge) are always included regardless of subsetting. (default: NULL)

target_subset_list

Optional list of target subsets for each plate. Can be either:

  • A list of character vectors - each vector contains target names to include for the corresponding plate

  • A single character vector - only subsets targets from the first plate

(default: NULL)

sample_exclude_list

Optional list of samples to exclude for each plate. Can be either:

  • A list of character vectors - each vector contains sample names to exclude from the corresponding plate

  • A single character vector - only excludes samples from the first plate

Note: Control samples (IPC, NC, SC, Bridge) are never excluded. (default: NULL)

target_exclude_list

Optional list of targets to exclude for each plate. Can be either:

  • A list of character vectors - each vector contains target names to exclude from the corresponding plate

  • A single character vector - only excludes targets from the first plate

(default: NULL)

Value

A list of plot data and saved PDF files in the specified output directory.