R/quantifiability.R
quantifiability.RdCalculates quantifiability for each target for a single AQ run or a set of AQ runs. Quantifiability is the percent of samples within the dynamic range for that target. Function input is the output of loadNULISAseq or a list of loadNULISAseq outputs. Includes option to calculate quantifiability for sample subsets using a column in the samples data frame.
quantifiability(
runs,
sampleGroupCovar = "SAMPLE_MATRIX",
sample_subset = NULL,
exclude_targets = NULL
)A named list of run data output from laodNULISAseq() 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.
Character string. Optional name of column in the
samples data frame
of runs which represents subgroups for which to calculate
quantifiability. Default is 'SAMPLE_MATRIX'.
A list of vectors in the same order as runs specifying column names or numeric column indices that represent the sample subset that quantifiability will be calculated for each run. If a vector is provided instead of a list, it will be applied to all plates in runs list. The list length must equal to the number of runs. Default uses all sample columns. SCs, NCs and IPCs are excluded.
A list of vectors of row names or numeric row indices
representing the targets that should be excluded from quantifiability calculation for each run.
For example, one might want to exclude internal controls. If a vector is provided instead
of a list, it will be applied to all plates in the run. The list length must equal to the number of runs.
Default is NULL, which includes all targets in the AQ data matrix.
A nested list containing quantifiability information. List elements include:
A list with the same names as runs. Each run
has a sublist that includes a quant data frame with targets
in rows and overall sample quantifibility as
well as any subgroups as columns, and n_samples vector which gives
number of samples corresponding to each column in quant.
Combines quantifiability across runs.
This sublist also includes a quant data frame with targets
in rows and overall sample quantifibility as
well as any subgroups as columns, and n_samples vector which gives
number of samples corresponding to each column in quant. If only a
single run is input, combined_quantifiability will be identical
to run_quantifiability.
A table or tables with quantifiability summary statistics
for all samples and by sample group, if sampleGroupCovar is defined.