
Counts read classes found in a read_classes data frame produced by the ninetails pipeline.
Source:R/ninetails_data_postprocessing_functions.R
count_class.RdTabulates the prediction information contained in the read_classes
data frame. Counts can be computed at two levels of granularity
(detailed or crude) and optionally stratified by a grouping variable.
Arguments
- class_data
Data frame or tibble containing read_classes predictions produced by the ninetails pipeline.
- grouping_factor
Character string (default
NA). Name of a column inclass_datato use as a grouping variable (e.g."sample_name").- detailed
Logical
[TRUE]. IfTRUE, counts are provided based on thecommentscolumn (fine-grained). IfFALSE, counts are provided based on theclasscolumn (crude: decorated / blank / unclassified only).
Value
A tibble with columns for the grouping variable (if provided),
the classification label (comments or class), and
n (the count).
Details
When detailed = TRUE, counts are based on the comments
column, which carries fine-grained labels such as "YAY" (tail
with non-A residues detected). When detailed = FALSE, counts
are based on the class column with three broad categories:
"decorated", "blank", and "unclassified".
See also
read_class_single and
read_class_multiple for loading class data,
count_residues for the analogous residue-level counts,
merge_nonA_tables for combining class and residue
data.