Regroup samples by condition and calculate mean for each condition
Source:R/mean_samples_by_condition.R
mean_samples_by_conditon.Rd
An helper function that will give the mean by condition of the cscore or count, for each position. The standard deviation is also given. this can be used to create a boxplot with ggplot.
Arguments
- ribo
a RiboClass object
- value
name or index of the column containing the values on which mean by condition is calculated. (Either "cscore" or "count")
- metadata_condition
name or index of the column in metadata containing the condition
- only_annotated
use annotation site name instead of default
Examples
data("ribo_toy")
mean_df <- mean_samples_by_conditon(ribo_toy,"count","condition")