Skip to contents

Plot the distribution of fragment lengths, with length in basepairs on the x-axis, and proportion of fragments on the y-axis. Typical plots will show 10-basepair periodicity, as well as humps spaced at multiples of a nucleosome width (about 150bp).

Usage

plot_fragment_length(
  fragments,
  max_length = 500,
  return_data = FALSE,
  apply_styling = TRUE
)

Arguments

fragments

Fragments object

max_length

Maximum length to show on the plot

return_data

If true, return data from just before plotting rather than a plot.

apply_styling

If false, return a plot without pretty styling applied

Value

Numeric vector where index i contans the number of length-i fragments