Skip to contents

Plots read count rank vs. number of reads on a log-log scale.

Usage

plot_read_count_knee(
  read_counts,
  cutoff = NULL,
  return_data = FALSE,
  apply_styling = TRUE
)

Arguments

read_counts

Vector of read counts per cell

cutoff

(optional) Read cutoff to mark 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

ggplot2 plot object

Details

Performs logarithmic downsampling to reduce the number of points plotted

Examples

## Prep data
mat <- get_demo_mat(filter_qc = FALSE, subset = FALSE)
reads_per_cell <- colSums(mat)

# Render knee plot
plot_read_count_knee(reads_per_cell, cutoff = 1e3)