R/sampleQCplot.R
sampleQCplot.RdThis function generates QC plots for the following metrics:
Percentage of targets with reads above the Limit of Detection (LOD). Minimum thresholds vary by sample type.
Plasma: 90%
Serum: 90%
CSF: 70%
Urine: 65%
Cell culture: 30%
NHP plasma: 55%
NHP CSF: 35%
Dried blood spot: 75%
Control: 90%
Other: 0%
Number of Internal Control (IC) reads within a sample. Minimum threshold: 1,000 reads
Total number of reads within a sample. Minimum threshold: 500,000 reads
Sample IC reads relative to the plate median. Acceptable range: within +/-40% of plate median
sampleQCplot(
runs,
qc_metric = "Detectability",
plateIDs = NULL,
output_dir = NULL,
plot_name = NULL,
plot_title = NULL,
plot_width = ifelse(qc_metric == "all", 8, 14),
plot_height = ifelse(qc_metric == "all", 6, 7),
label_cex = 0.45,
point_cex = 0.75,
legend_cex = 0.75,
sample_subset_list = NULL,
target_subset_list = NULL,
sample_exclude_list = NULL,
target_exclude_list = NULL
)A named list of run data output from loadNULISAseq() function
or a list of these outputs for multiple runs.
The QC metric to plot (default: "Detectability"; select other QC metrics: "IC Reads", "Reads", "IC Median", "all" (showing all 4 metrics)).
Optional vector of plate names. (default: extract from runs).
Directory to save PDF files (NULL for no saving).
Optional name for the plot file (default: NULL).
Optional title for the plot (default: NULL).
PDF width in inches (default: 14 for single QC metric plot, 8 for all four QC metric plots).
PDF height in inches (default: 7 for single QC metric plot, 6 for all four QC metric plots).
Text size for labels (default: 0.45).
Point size (default: 0.75).
Legend text size (default: 0.75).
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)
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)
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)
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)
A list of plot data and saved PDF files in the specified output directory.
For "all" option, plots all four QC metrics in a consolidated view.