Visualize a radial network of selected genes; edge weight reflects co-expression across cells.
Usage
VisGeneCoexpHive(
object,
genes,
reduction = "pca",
threshold = 0.2,
palette = "C",
point_size = 3,
point_alpha = 0.8,
label_size = 3,
curve_alpha = 0.5
)Arguments
- object
A
Seuratobject; required.- genes
Character vector of genes; must contain ≥3 present in the assay.
- reduction
Reduction used to position genes radially by loading (
'pca'). Default:'pca'.- threshold
Minimum absolute correlation to draw edges. Default:
0.2.- palette
Viridis palette option for color/fill. Default:
"C".- point_size
Node point size. Default:
3.- point_alpha
Node point alpha. Default:
0.8.- label_size
Label size. Default:
3.- curve_alpha
Edge curve alpha. Default:
0.5.
Examples
obj <- SeuratVisProExample(
n_cells = 300,
n_genes = 1000,
n_clusters = 10,
seed = 123,
genes_mt = "^MT-",
neighbor_dims = 10,
cluster_res = 0.5,
umap_dims = 10,
spatial = FALSE)
#> Modularity Optimizer version 1.3.0 by Ludo Waltman and Nees Jan van Eck
#>
#> Number of nodes: 300
#> Number of edges: 4508
#>
#> Running Louvain algorithm...
#> Maximum modularity in 10 random starts: 0.9485
#> Number of communities: 10
#> Elapsed time: 0 seconds
p <- VisGeneCoexpHive(
obj,
genes = paste0("G", 1:100),
reduction = "pca",
threshold = 0.2,
palette = "C",
point_size = 3,
point_alpha = 0.8,
label_size = 3,
curve_alpha = 0.5)
#> Warning: The `slot` argument of `GetAssayData()` is deprecated as of SeuratObject 5.0.0.
#> ℹ Please use the `layer` argument instead.
#> ℹ The deprecated feature was likely used in the SeuratVisPro package.
#> Please report the issue at
#> <https://github.com/benben-miao/SeuratVisPro/issues>.
#> Warning: Using `size` aesthetic for lines was deprecated in ggplot2 3.4.0.
#> ℹ Please use `linewidth` instead.
#> ℹ The deprecated feature was likely used in the SeuratVisPro package.
#> Please report the issue at
#> <https://github.com/benben-miao/SeuratVisPro/issues>.
p