p.caption { font-size: 0.8em; }
scCustomize is an R package with collection of functions created and/or curated to aid in the visualization and analysis of single-cell data using R.
Please see Installation page for full installation instructions.
See Vignettes for detailed tutorials of all aspects of scCustomize functionality.
The goals of scCustomize are to:
1. Customize visualizations for aid in ease of use and create more aesthetic visuals. 2. Improve speed/reproducibility of common tasks/pieces of code in scRNA-seq analysis with a single or group of functions.
scCustomize aims to achieve these goals through:
FeaturePlot(..., order = TRUE)
. plot + scale_color_continuous(...) + ggtitle(...) + theme(plot.title = element_text(...), legend.position = ...) + guides(...)
QC_Plot_Genes()
)
or 2. create new plots (e.g., Seq_QC_Plot_Reads_per_Cell()
or
Plot_Median_Genes()
) or 3. both (e.g.,
QC_Plot_UMIvsGene(..., combination = TRUE)
). QC_Plot_UMIvsGene()
)Example of adding new parameters: Adding the percentage of counts
aligning to mitochondrial (and/or ribosomal) genes is common early
step in analysis. scCustomize provides Add_Mito_Ribo()
to simplify
this. Basic use requires only one line of code and two parameters.
Add_Mito_Ribo(object = obj_name, species = "Human")
Example of wrapping many lines to one: Extracting the top 10 (or
15, 20, 25, etc) genes per identity after running
Seurat::FindAllMarkers()
is very common and scCustomize provides
Extract_Top_Markers()
function to simplify process.
Using scCustomize function:
markers_df <- FindAllMarkers(object = obj_name)
# Get vector/string
top10_list <- Extract_Top_Markers(marker_dataframe = markers_df)
# or for data.frame
top10_df <- Extract_Top_Markers(marker_dataframe = markers_df, dataframe = TRUE)
Instead of tidyverse/base R:
markers_df <- FindAllMarkers(object = obj_name)
# Get vector/string
top10_list <- markers_df %>%
rownames_to_column("rownames") %>%
group_by(cluster) %>%
slice_max(n = 10, order_by = avg_log2FC) %>%
pull("gene")
# or for data.frame
top10_df <- markers_df %>%
rownames_to_column("rownames") %>%
group_by(cluster) %>%
slice_max(n = 10, order_by = avg_log2FC) %>%
column_to_rownames("rownames")
Add_Mito_Ribo()
will warn you if no mitochondrial or ribosomal
features are found and won’t create new metadata column. Rename_Clusters()
will check and make sure the right number of
unique new names are provided and provide one of two error messages
if not before attempting to rename the object idents.Currently the package is primarily centered around interactivity with Seurat Objects with some functionality with LIGER objects and support for CellBender outputs. If users are interested in adapting functions (or creating separate functions) to provide comparable functionality with SCE or other object formats I would be happy to add them. See below for more info on PRs.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.