get_overlay_df: get overlay data.frame

View source: R/get_overlay_df.R

get_overlay_dfR Documentation

get overlay data.frame

Description

Uses a ggplot and a reference data.frame to generate 'match' genes that are present in both the plot and the reference data. Subsequently, plot information for the individual points are extracted and can now be used as an overlay. See ?plot_overlay

Usage

get_overlay_df(
  p,
  reference,
  match = "gene",
  sig_text = NULL,
  insig_text = NULL,
  legend_nchar_max = NULL,
  nchar_max_collapse = NULL,
  dont_inherit = c("dataset", "color", "size", "size_gg", "shape", "group",
    "col_border")
)

Arguments

p

A ggplot object. Usually passed down from plot_volcano_basic or plot_scatter_basic.

reference

a list of data.frames that are preferably named. The name of the list will passed down to the data.frame as the column 'dataset'. Alternatively, the dataset can have a column name dataset.

match

by what string should the ggplot and overlay be merged? Default is 'gene'.

sig_text

string. text for enriched interactors to be displayed in legend.

insig_text

string. Text for non-enriched interactors to be displayed in legend.

legend_nchar_max

maximum amount of allowed characters in the legend.

nchar_max_collapse

what charcter should be used for line break? Default is HTML line break "<br>".

dont_inherit

the parameters/columns that should not be inherited from the plotting environment.


lagelab/Genoppi documentation built on Oct. 13, 2022, 2:36 p.m.