Skip to contents

Tabulates the prediction column of the nonadenosine_residues data frame, counting occurrences of each non-A nucleotide type (C, G, U). Counts represent total hits across all reads, not per-read summaries (a single read may contribute multiple hits).

Usage

count_residues(residue_data, grouping_factor = NA)

Arguments

residue_data

Data frame or tibble containing non-A residue predictions produced by the ninetails pipeline.

grouping_factor

Character string (default NA). Name of a column in residue_data to use as a grouping variable (e.g. "sample_name").

Value

A tibble with columns for the grouping variable (if provided), prediction (nucleotide type), and n (the count).

See also

count_class for counting read-level classes, read_residue_single and read_residue_multiple for loading residue data, summarize_nonA for transcript-level summaries.

Examples

if (FALSE) { # \dontrun{

residue_counted <- ninetails::count_residues(
  residue_data = out[[2]],
  grouping_factor = NA)

} # }