Skip to contents

Function to visualize genes based on number of significant gene-peak correlations (per gene), used to define DORCs

Usage

dorcJPlot(
  dorcTab,
  cutoff = 7,
  labelTop = 25,
  returnGeneList = FALSE,
  cleanLabels = TRUE,
  labelSize = 4,
  ...
)

Arguments

dorcTab

data.frame object containing significant peak-gene pairs using which DORC scores will be computed. Must be a filtered set returned from runGenePeakcorr. IMPORTANT: Make sure the exact same scATAC SE (peak set) was used when determining DORCs that is used here to get corresponding DORC peak counts

cutoff

numeric indicating cut-off to use for number of significant peaks per gene to call it a DORC. Default is 7 significant peaks per gene.

labelTop

numeric indicating the number of top genes to add labels for. Setting this to a very high number can lead to plot rendering difficulties (since labels get crowded).

returnGeneList

boolean indicating whether to also return the DORCs passing the provided filter. Default is FALSE (will just plot and nothing else)

cleanLabels

boolean indicating whether or not to try to have cleaner DORC gene labels. If TRUE, uses geom_text_repel, if FALSE, will use regular geom_text

labelSize

numeric indicating what to set label size to. Default is 4.

...

additional parameters passed to either geom_text_repel (if cleanLabels is set to TRUE) or geom_text. For example, set size to control font size, or segment.length or segment.color to control call-out segment length and color etc.

Value

a ggplot object of the DORC J plot. If returnGeneList is set to TRUE, then also returns the vector of DORC genes passing the specified threshold

Author

Vinay Kartha