
Plot 3D graph layouts
Plot3DGraph.Rd
Plot a 3D component graph layout computed with ComputeLayout
and
color nodes by a marker.
Arguments
- object
A
Seurat
object- cell_id
ID of component to visualize
- marker
Name of marker to color the nodes by
- assay
Name of assay to pull data from
- layout_method
Select appropriate layout previously computed with
ComputeLayout
- project
Project the nodes onto a sphere. Default FALSE
- aspectmode
Set aspect ratio to one of "data" or "cube". If "cube", this scene's axes are drawn as a cube, regardless of the axes' ranges. If "data", this scene's axes are drawn in proportion with the axes' ranges.
Default "data"
- colors
Color the nodes expressing a marker. Must be a character vector with at least two color names.
- showgrid
Show the grid lines. Default TRUE
- log_scale
Convert node counts to log-scale with
logp
- node_size
Size of nodes
- show_Bnodes
Should B nodes be included in the visualization? This option is only applicable to bipartite graphs.
- ...
Additional parameters passed to
plot_ly
Examples
library(pixelatorR)
# MPX
pxl_file <- minimal_mpx_pxl_file()
seur <- ReadMPX_Seurat(pxl_file)
#> ! Failed to remove temporary dir C:/Users/Max/AppData/Local/Temp/RtmpewNZPy/dir1f2cc6b5f97
#> ! Failed to remove temporary dir C:/Users/Max/AppData/Local/Temp/RtmpewNZPy/dir1f2c49986bbc
#> ! Failed to remove temporary file C:/Users/Max/AppData/Local/Temp/RtmpewNZPy/file1f2c1b7a7398.h5ad
seur <- LoadCellGraphs(seur, cells = colnames(seur)[5])
#> ! Failed to delete temporary edge list parquet file C:/Users/Max/AppData/Local/Temp/RtmpewNZPy/file1f2c4ca1b61.parquet.
#> ! Failed to delete temporary edge list parquet file C:/Users/Max/AppData/Local/Temp/RtmpewNZPy/file1f2c4ca1b61.parquet.
seur <- ComputeLayout(seur, layout_method = "wpmds", dim = 3, pivots = 50)
Plot3DGraph(seur, cell_id = colnames(seur)[5], marker = "CD50", layout_method = "wpmds_3d")
# PNA
pxl_file <- minimal_pna_pxl_file()
seur <- ReadPNA_Seurat(pxl_file)
seur <- LoadCellGraphs(seur, cells = colnames(seur)[1], add_layouts = TRUE)
Plot3DGraph(seur, cell_id = colnames(seur)[1], marker = "CD16", layout_method = "wpmds_3d")