supercell_GeneGenePlot: Gene-gene correlation plot

View source: R/supercell_GeneGenePlot.R

supercell_GeneGenePlotR Documentation

Gene-gene correlation plot

Description

Plots gene-gene expression and computes their correaltion

Usage

supercell_GeneGenePlot(
  ge,
  gene_x,
  gene_y,
  supercell_size = NULL,
  clusters = NULL,
  color.use = NULL,
  idents = NULL,
  pt.size = 1,
  alpha = 0.9,
  x.max = NULL,
  y.max = NULL,
  same.x.lims = FALSE,
  same.y.lims = FALSE,
  ncol = NULL,
  combine = TRUE,
  sort.by.corr = TRUE
)

Arguments

ge

a gene expression matrix of super-cells (ncol same as number of super-cells)

gene_x

gene or vector of genes (if vector, has to be the same lenght as gene_y)

gene_y

gene or vector of genes (if vector, has to be the same lenght as gene_x)

supercell_size

a vector with supercell size (ordered the same way as in ge)

clusters

a vector with clustering information (ordered the same way as in ge)

color.use

colors for idents

idents

idents (clusters) to plot (default all)

pt.size

point size (if supercells have identical sizes)

alpha

transparency

x.max

max of x axis

y.max

max of y axis

same.x.lims

same x axis for all plots

same.y.lims

same y axis for all plots

ncol

number of colums in combined plot

combine

combine plots into a single patchworked ggplot object. If FALSE, return a list of ggplot

sort.by.corr

whether to sort plots by absolute value of correlation (fist plot genes with largest (anti-)correlation)

Value

a list with components

  • p - is a combined ggplot or list of ggplots if combine = TRUE

  • w.cor - weighted correlation between genes

a list, where


SuperCell documentation built on Oct. 25, 2024, 5:07 p.m.