
Plot counts of nonadenosine residues found in ninetails output data
Source:R/ninetails_plotting_functions.R
plot_residue_counts.RdThis function may report the non-A occurrences in two flavours: by read or by residue. To illustrate this, let's have a look at the following example:
Arguments
- residue_data
A dataframe or tibble containig non-A residue predictions made by ninetails pipeline
- grouping_factor
grouping variable (e.g. "sample_name")
- by_read
logical [TRUE/FALSE]. If TRUE, the count/frequency data per reads with given residues will be plotted (i.e. how many reads contain given residue. If FALSE, the number of residues will be plotted). Set to FALSE by default.
- frequency
logical [TRUE/FALSE]. If TRUE, the frequency will be plotted. If FALSE, raw counts will be shown. This parameter is set to TRUE by default.
Details
read_1: contains 3xU residues
read_2: contains 2xC residue, 1xG residue, 1xU residue
function launched in by read mode (by_read==TRUE): read_1 - taken into account once, because it non-As of the same (single) type read_2 - taken into account thrice, because it has non-As of three types
function launched in by residue mode (by_read==FALSE): read_1 - taken into account thrice, because it has 3 non-A residues reported read_2 - taken into account fourfold, because it has 4 nonAs reported
The user can switch between those modes depending on the desired informations to be reported.