Summarizes detectability across multiple runs and if applicable broken down by sample groups based on the sample_group_covar input to loadNULISAseq. When format = TRUE, returns formatted summary and target tables ready for rendering, similar to quantifiability()$summary_tables.

detectability_summary(
  runs,
  exclude_targets = NULL,
  exclude_noDetect_targets = TRUE,
  format = TRUE
)

Arguments

runs

A named list of run data output from loadNULISAseq() function or a list of these outputs for multiple runs. To make output more interpretable, it is recommended to name each run according to the plate ID for that run.

exclude_targets

Optional targets to exclude from the aggregation. Either a character vector (applied to all plates) or a list of character vectors (one per plate, matching the order of runs).

exclude_noDetect_targets

Logical. When TRUE (default), auto-detects reverse curve targets (excluded from computation entirely) and non-RC noDetectability targets (excluded from summary statistics only, kept in target tables). Emits message() listing affected targets.

format

Logical. When TRUE (default), returns additional run_summary and run_targets fields containing formatted tables ready for rendering. When FALSE, returns only the original raw fields for backward compatibility.

Value

A list with items "all", optionally "sample_group", "run_detectability", and when format = TRUE, additional formatted output fields. The structure matches detectability() output:

all

A list with sampleNumber (integer), detectability (named numeric vector of percentages), and detectable (named logical vector, TRUE when detectability > 50%).

sample_group

If applicable, a list with sampleNumber (named list of integers), detectability (named list of named numeric vectors), and detectable (named list of named logical vectors).

run_detectability

A list of the original individual run detectability objects from loadNULISAseq().

reverse_curve_targets

Character vector of reverse curve target names detected across all runs (when exclude_noDetect_targets = TRUE).

noDetect_nonRC_targets

Character vector of non-RC noDetectability target names detected across all runs (when exclude_noDetect_targets = TRUE).

run_summary

Named list of formatted summary matrices per plate (and "Overall" for multi-plate), with columns: type, \# samples, mean, sd, median, min, max, \# of detectable targets (%). Only when format = TRUE.

run_targets

Named list of formatted target matrices per plate (and "Overall" for multi-plate), with rows = targets and columns = "all" + sample groups. Only when format = TRUE.