Skip to contents

Density scatter plot with log10(fragment count) on the x-axis and TSS enrichment on the y-axis. Useful for selecting high-quality cell barcodes.

Usage

plot_tss_scatter(
  x,
  min_frags = 1000,
  min_tss = 10,
  style = c("ArchR", "BPCells"),
  bins = 100L,
  title = NULL,
  ...
)

# Default S3 method
plot_tss_scatter(
  x,
  min_frags = 1000,
  min_tss = 10,
  style = c("ArchR", "BPCells"),
  bins = 100L,
  xlim = c(2.5, 5),
  ylim = NULL,
  title = NULL,
  ...
)

# S3 method for class 'MarchRDataset'
plot_tss_scatter(
  x,
  frags_name = character(0),
  min_frags = 1000,
  min_tss = 10,
  style = c("ArchR", "BPCells"),
  bins = 100L,
  xlim = c(2.5, 5),
  ylim = NULL,
  title = NULL,
  ...
)

# S3 method for class 'MarchRProject'
plot_tss_scatter(
  x,
  dataset_name = character(0),
  frags_name = character(0),
  min_frags = 1000,
  min_tss = 10,
  style = c("ArchR", "BPCells"),
  bins = 100L,
  xlim = c(2.5, 5),
  ylim = NULL,
  title = NULL,
  ...
)

Arguments

x

(data.frame | MarchRDataset | MarchRProject) If a data frame, must have columns nFrags and TSSEnrichment.

min_frags

(numeric) Minimum fragment count threshold line. Default 1000.

min_tss

(numeric) Minimum TSS enrichment threshold line. Default 10.

style

(character) "ArchR" for KDE density scatter with ArchR aesthetics or "BPCells" for hex-binned scatter (BPCells default). Default "ArchR".

bins

(integer) Number of hex bins when style = "BPCells". Default 100.

...

Additional arguments passed to BPCells::plot_tss_scatter() when style = "BPCells".

frags_name

(character) Name of fragments to plot. Auto-selected if only one.

dataset_name

(character) Name of dataset. Auto-selected if only one.

Value

A ggplot2 object.