Description Usage Arguments Details Value Examples
View source: R/plot_hexbin_interact.R
Plot of interaction of expression of single cells in bivariate hexagon cells.
1 2 3 4 5 6 7 8 9 10 |
sce |
A |
mod |
A vector of strings referring to the names of the modularities.
For |
type |
A vector of strings referring to the types of assays in the
|
feature |
A vector of strings referring to the names of one features in the same order as the vector of modularities. |
interact |
A string specifying how interaction between features is
calculated. Possible interaction measures are
|
title |
A string containing the title of the plot. |
xlab |
A string containing the title of the x axis. |
ylab |
A string containing the title of the y axis. |
This function plots the interaction between any features in the
hexagon cell representation calculated with make_hexbin
. The
interaction between the chosen features is calculated by one of two
measurers corr_spearman
, ratio
and mi
:
mi
Returns the mutual information coefficient.
corr_spearman
Returns the Spearman correlation.
fc
Return the log fold change between the features.
Note that fc
should be applied to log normalized values.
A ggplot2{ggplot}
object.
1 2 3 4 5 6 7 8 9 10 | # For Seurat object
library(Seurat)
data("pbmc_small")
pbmc_small <- make_hexbin(pbmc_small, 10, dimension_reduction = "PCA")
protein <- matrix(rnorm(10 * ncol(pbmc_small)), ncol = ncol(pbmc_small))
rownames(protein) <- paste0("A", seq(1, 10, 1))
colnames(protein) <- colnames(pbmc_small)
pbmc_small[["ADT"]] <- CreateAssayObject(counts = protein)
plot_hexbin_interact(pbmc_small, type=c("counts", "counts"),
mod=c("RNA", "ADT"), feature=c("CD7", "A1"), interact="mi")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.