Stacked bar chart of peptide proportions by Length_range and Condition
Source: R/plots.R
plot_prop_length_condition.RdPlots the table produced by count_ids_condition_bylengthrange() as a
stacked proportion bar chart per condition, with percentage labels.
Usage
plot_prop_length_condition(
input,
level2plot = "Peptides",
label_size = 3,
palette = NULL,
x_var = "Condition"
)Arguments
- input
Output of
count_ids_condition_bylengthrange().- level2plot
Which
Levelto plot — one of"Peptides.Modified","Peptides","Proteins".- label_size
Text size for the percentage labels (
geom_text); mirrors the report'sPlotTextLabelSizeparam.- palette
Optional named character vector mapping
Length_rangevalues to fill colours. WhenNULL(default)scale_fill_viridis_d()is used.- x_var
Name of the column to map to the x-axis. Default
"Condition"; pass"Sample"for the sample-level proportion plot.
Examples
if (FALSE) { # \dontrun{
plot_prop_length_condition(count_ids_condition_bylengthrange(pep_all))
plot_prop_length_condition(count_ids_condition_bylengthrange(pep_all, "Sample"),
x_var = "Sample")
} # }