Title: | An 'Shiny' App for Exploring scRNA-seq Data Processed in 'Seurat' |
---|---|
Description: | A simple, one-command package which runs an interactive dashboard capable of common visualizations for single cell RNA-seq. 'SeuratExplorer' requires a processed 'Seurat' object, which is saved as 'rds' or 'qs2' file. |
Authors: | Yongchao Zhang [aut, cre] (https://github.com/fentouxungui) |
Maintainer: | Yongchao Zhang <[email protected]> |
License: | GPL (>= 3) |
Version: | 0.1.0 |
Built: | 2025-03-14 04:50:36 UTC |
Source: | https://github.com/fentouxungui/seuratexplorer |
support facet, codes refer to: https://github.com/junjunlab/scRNAtoolVis/blob/master/R/cellRatioPlot.R, with modification
cellRatioPlot( object = NULL, sample.name = NULL, sample.order = NULL, celltype.name = NULL, celltype.order = NULL, facet.name = NULL, facet.order = NULL, col.width = 0.7, flow.alpha = 0.25, flow.curve = 0, color.choice = NULL )
cellRatioPlot( object = NULL, sample.name = NULL, sample.order = NULL, celltype.name = NULL, celltype.order = NULL, facet.name = NULL, facet.order = NULL, col.width = 0.7, flow.alpha = 0.25, flow.curve = 0, color.choice = NULL )
object |
an Seurat object |
sample.name |
x axis |
sample.order |
order for x axis |
celltype.name |
column fill by |
celltype.order |
order for fill by |
facet.name |
column name for facet |
facet.order |
the order for facet |
col.width |
column width, from 0-1 |
flow.alpha |
transparency for flow |
flow.curve |
curve for flow |
color.choice |
color choice for fill |
a ggplot2 object
#NULL
#NULL
explorer_sidebar_ui
generate the body UI for each menu item specified in explorer_sidebar_ui
explorer_body_ui(tab_list)
explorer_body_ui(tab_list)
tab_list |
a tag list for the body UI of shiny dashboard |
a filled tag list for body UI
tab_list <- list() tab_list <- explorer_body_ui(tab_list = tab_list)
tab_list <- list() tab_list <- explorer_body_ui(tab_list = tab_list)
explorer_sidebar_ui
server side functions related to explorer_sidebar_ui
explorer_server(input, output, session, data, verbose = FALSE)
explorer_server(input, output, session, data, verbose = FALSE)
input |
server input |
output |
server output |
session |
server session |
data |
the Seurat object and related parameters |
verbose |
for debug use |
server side functions related to explorer_sidebar_ui
to generate some menu items for the dashboard, which can be integrated to other packages, such as 'fentouxungui/SeuratExplorerServer' from github.
explorer_sidebar_ui()
explorer_sidebar_ui()
return some menu items for the dashboard
explorer_sidebar_ui()
explorer_sidebar_ui()
getColors
getColors(color.platte = NULL, choice = NULL, n = NULL)
getColors(color.platte = NULL, choice = NULL, n = NULL)
color.platte |
predefined color list |
choice |
color name |
n |
how many colors to return |
a color list
# null
# null
Launch shiny app
launchSeuratExplorer(verbose = FALSE)
launchSeuratExplorer(verbose = FALSE)
verbose |
for debug use |
In-browser Shiny Application launch
if(interactive()){launchSeuratExplorer()}
if(interactive()){launchSeuratExplorer()}
Server
server(input, output, session)
server(input, output, session)
input |
Input from the UI |
output |
Output to send back to UI |
session |
from shiny server function |
the server functions of shiny app
for each cell, find genes that has high UMI percentage, for example, if a cell has 10000 UMIs, and the UMI percentage cutoff is set to 0.01, then all genes that has more than 10000 * 0.01 = 100 UMIs is thought to be the highly expressed genes for this cell.summary those genes for each cluster, firstly get all highly expressed genes in a cluster, some genes may has less cells, then for each gene, count cells in which this genes is highly expressed, and also calculate the mean and median UMI percentage in those highly expressed cells.
top_genes(SeuratObj, expr.cut = 0.01, group.by)
top_genes(SeuratObj, expr.cut = 0.01, group.by)
SeuratObj |
Seurat object |
expr.cut |
UMI percentage cutoff, in a cell, if a gene with UMIs ratio more than this cutoff, this gene will be assigned to highly expressed gene for this cell |
group.by |
how to group cells |
a data frame