Skip to content

Generate masks for scRNA-seq clusters on t-SNE or UMAP plots

License

Notifications You must be signed in to change notification settings

alserglab/mascarade

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mascarade

mascarade package implements a procedure to automatically generate 2D masks for clusters on single-cell dimensional reduction plots like t-SNE or UMAP.

Installation

The package can be installed from GitHub:

remotes::install_github("alserglab/mascarade")

Quick run

Here is quick example. See the vignette for more details.

Loading neccessary libraries:

library(mascarade)
library(ggplot2)
library(data.table)

Loading example data:

data("exampleMascarade")

Generating masks:

maskTable <- generateMask(dims=exampleMascarade$dims, 
                          clusters=exampleMascarade$clusters)

Plotting with ggplot2:

data <- data.table(exampleMascarade$dims, 
                   cluster=exampleMascarade$clusters,
                   exampleMascarade$features)

ggplot(data, aes(x=UMAP_1, y=UMAP_2)) + 
    geom_point(aes(color=cluster)) + 
    geom_path(data=maskTable, aes(group=group)) +
    coord_fixed() + 
    theme_classic()

About

Generate masks for scRNA-seq clusters on t-SNE or UMAP plots

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages