Skip to contents

Per-peptide distribution of a single descriptor, coloured by Condition. This is the repertoire view: every unique sequence of a Condition contributes one value, so the spread is between-peptide, not between-replicate — read plot_property_sample_summary() alongside it for the replicate view.

Usage

plot_property_distribution(
  props,
  var,
  type = c("density", "violin"),
  title = NULL
)

Arguments

props

Output of pepchem_by_sample().

var

Name (string) of the descriptor column to draw.

type

"density" (default) or "violin".

title

Plot title. NULL (default) uses var.

Value

A ggplot object, or NULL when the column is absent or all missing.

Details

With type = "density", a descriptor that only takes whole-number values (peptide Length) is drawn as a histogram with one bar per value, scaled so each Condition's bars sum to 1. A kernel density would draw bumps between values that cannot occur. Continuous descriptors keep the density curve.

Examples

if (FALSE) { # \dontrun{
plot_property_distribution(props, "GRAVY")
} # }