Mean ± SD barplot of ID counts per Condition, faceted by length range
Source:R/plots.R
plot_count_mean_sd.RdReplaces the inline ggbarplot body in the "Average +/- sd" loop of the main
report template. Filters out the "others" length range (only plots the
"All peptides" and the expected-length rows), then renders a faceted
barplot showing mean ± SD across BioReplicates per Condition.
Arguments
- df
A counts data frame shaped like
counts_size(one row per BioReplicate × Condition × Length_range, withn_Peptides,n_Sequences,n_Proteinscolumns).- level
One of
"Peptides","Sequences","Proteins".- lim_level
Upper y-axis limit (e.g. looked up from a
count_limtable byLevel/"Limit_mean").- group_var
Name of the column mapped to the x-axis (and fill), across which the mean ± SD is computed. Default
"Condition"(mean across the replicate samples per Condition); pass"BioReplicate"for a per- BioReplicate variant (mean across the TechReplicate samples per BioReplicate).