Giter Club home page Giter Club logo

scillus's Introduction

Scillus


Build Status Build status

Scillus is a Seurat and ggplot2 wrapper for enhanced processing and visualization of scRNA-seq data. For detailed usage, please visit the Scillus documentation website: scillus.netlify.com Netlify Status

Please use the following code to install and load the package:

if (!require(devtools)) {
  install.packages("devtools")
}

devtools::install_github("xmc811/Scillus", ref = "development")
library(Scillus)

Version History

  • April 17, 2021

    Version 0.5.0: Support of long palettes and customized colors

  • September 23, 2020

    Version 0.4.0: Additonal improvements for R Shiny applications

  • January 29, 2020

    Version 0.3.0

  • December 20, 2019

    Version 0.2.0: Optimized processing and plotting functions; simplified installation process

  • August 25, 2019

    Version 0.1.0: Initial release; essential functions for streamlined scRNA-seq analysis and visualization

scillus's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

scillus's Issues

Heatmap cluster separation lines[Feature]

Hi there,

Great package, I really appreciate the development of this tool for better visualization and figure building of scRNAseq data.

Is there a way to add vertical lines that separate clusters in the heatmap? Currently, they all blend together and the annotation bars are the only divider, I am wondering if this can be extended throughout the heatmap?

See images below for an example provided by seurat heatmap with vertical line divider versus scillus heatmap. thanks!

image

image

use metadata (or active ident) in plot_stat

Thanks for your useful project. When using plot_stat, I've noticed that the stacked barplot is fixed to the 'seurat_clusters' in the metadata. Would it be possible for an additional argument to be added so that we can use other metadata to label the stacked barplot?

Referring to these lines:

cluster = dataset[['seurat_clusters']][[1]])

length(unique(dataset[['seurat_clusters']][[1]]))

Failed to create Cairo backend!

Hi, thanks for the excellent package; I encounter following error and am struggling to handle this issue; are there any hints for solving this problem?

> HeatMap_plot <- plot_heatmap(
+   dataset = Sepsis_seurat, 
+   markers = Allmarkers,n=2,
+   sort_var = c("Cell_Type","Condition"),
+   anno_var = c("Cell_Type","Condition","percent.mt","S.Score","G2M.Score"),
+   anno_colors = list(
+     "Set2",# RColorBrewer palette
+     c("red","orange","yellow","purple","blue","green"), # color vector
+                      "Reds",
+     c("blue","white","red"), # Three-color gradient
+     "Greens"))
Warning in set_colors(anno_colors[[i]], length(l)) :
  Number of colors required exceeds palette capacity. RdYlBu spectrum will be used instead.
`use_raster` is automatically set to TRUE for a matrix with more than
2000 columns You can control `use_raster` argument by explicitly
setting TRUE/FALSE to it.

Set `ht_opt$message = FALSE` to turn off this message.
Error in Cairo(width, height, type = "png", file = filename, pointsize = pointsize,  : 
  Failed to create Cairo backend!

Decrease height of column annotation

Hi,
I am trying to decrease the height of column annotation using annotation_height but this does not seem to work.
image
Any idea how to do this? Thanks

[Feature]

Thanks for this really nice package !
It is a bit annoying that plot_heatmaps uses assay = "integrated" as the default assay, It would more convenient if it defaults to assay =DefaultAssay(dataset). for ex, my seurat object does not have an integrated assay so I would have to duplicate the RNA assay and rename it as Integrated which will increase memory.
Thanks !

Unique barcode

Hi, Looks like a great package! I just wanted to let you know I've encountered an issue with using the plot_heatmap function with a Seurat object that I've appended V(D)J data to with scRepertoire. It throws the error:

Error:
! Column name barcode must not be duplicated.
Caused by error in stop_vctrs():
! Names must be unique.
x These names are duplicated:

  • "barcode" at locations 5 and 41.
    Run rlang::last_error() to see where the error occurred.

I had a look back at traceback and the plot_heat map function and confirmed that all barcodes were unique. The function works when I delete the barcode metadata completely. Let me know if you want/need any more info. Thanks!

Display legend top annotation the same way as in Seurat

Would it be possible to display the clusters annotation (or ideally the first annotation variable) the same way as in Seurat? Clusters on top of the annotation bar with 45 degree angle.
Sorry if it's too much to ask, but this could also save space on the right of the heatmap for more annotations without overlapping them.

[Feature]

I really liked a lot of the plots generated with Scillus, but I couldn't seem to change the point size when using plot_scdata. This is a bit of an issue as I cannot compare how dense/sparse the clusters are across different samples. I also couldn't seem to plot continuous features like gene levels.
I am wondering if you might have solutions for my problems or if they are features that can be implemented.

Thank you

Barbara

plot_GSEA did not pop up

halo anyone......

I used my seurat object to generate 1. heatmap, to analyze 2. GO and 3. GSEA using this package. For point 1 and 2, I have no issue when used codes provided in the vignette. However, for point 3, when I want to generate GSEA plot using plot_GSEA the plot did not pop up.

Any help I really appreciate in advance.

best regards,

Bugie

Scale.data not found in Seurat object

I am trying to generate a heatmap from the plot_heatmap function but I am running into this error of ERROR in rownames(dataset@assays$[email protected]): "Trying to get slot "scale.data" from an object of a basic class ("NULL") with no slots, although there is a slot named scale.data in my seurat object. How can I solve this issue?

pass the reduction to plot_scdata?

Please have a detailed description regarding the questions about package development
Thanks for the development of the Scillus package. It is easy to use and generate elegant figures.
However, I would like to plot tsne plot, and the plot_scdata plots umap in default. In seurat, I can plot tsne with DimPlot(seu.obj,reduction="tsne",split.by="sample"). I have tried to input DimReduc="tsne" or eductions="tsne" in the plot_scdata, it showed unused argument (DimReduc = "tsne") or unused argument (reductions = "tsne"). Is there a way I can plot tsne using scillus ?

Order of enrichment in the gsea plot

Hi,

Thank you for the wonderful package.
I have got this plot for two conditions that I am comparing (untreated and treated). I wonder what is the order of this enrichment? It shows that different pathways are enriched in different clusters but when we are trying to look at the effects of treatment, I expect different pathways if the drug is causing any change. Any thoughts?

Screenshot 2023-08-23 at 10 41 22 AM

Thank you!

elements in `col` should be named vectors

Hi,
I have a strange error when I input specific colors in anno_colors .

if : anno_colors = list(c("Set1","Set3","Set2"), "Set2",pal1),  # works fine
if:  anno_colors = list(c("Set1","Set3","Set2"),pal1, "Set2") # error: Error: elements in `col` should be named vectors.

Any suggestion?
Thanks

Update to work with Seurat V5 data structure and to work with SCTransform'd objects

Hey,

This is a nice visualization package you have made. I was hoping you could update it to work with the new Seurat V5 data structure and to work with SCTransformed objects.

This is especially important because they have also changed the way integrated objects behave and one of the key features of your package was making heatmaps of integrated objects.

Hope you can update this package to work with those changes.

Thank you.

plot_measure_dim error

Hi, I recently found your package and love it but I ran into an error when trying to call plot_measure_dim. Example below uses the tutorial data.

> plot_measure_dim(dataset = scRNA_int, 
+          measures = c("nFeature_RNA","nCount_RNA","percent.mt","KRT14"))
Error in `plot_measure_dim()`:
! Can't subset `.data` outside of a data mask context.
Run `rlang::last_error()` to see where the error occurred.
> rlang::last_error()
<error/rlang_error>
Error in `plot_measure_dim()`:
! Can't subset `.data` outside of a data mask context.
---
Backtrace:
 1. Scillus::plot_measure_dim(...)
Run `rlang::last_trace()` to see the full context.
> rlang::last_trace()
<error/rlang_error>
Error in `plot_measure_dim()`:
! Can't subset `.data` outside of a data mask context.
---
Backtrace:
    ▆
 1. └─**Scillus**::plot_measure_dim(...)
 2.   ├─ggplot2::scale_color_viridis_c(...)
 3.   │ └─ggplot2::continuous_scale(...)
 4.   ├─**stats**::quantile(.data[[measures[i]]], probs = 0.1)
 5.   ├─<unknown>
 6.   └─**rlang**:::`[[.rlang_fake_data_pronoun`(.data, measures[i])
 7.     └─rlang:::stop_fake_data_subset(call)
 8.       └─rlang::abort(...)

Here's my sessionInfo

> sessionInfo()
R version 4.1.3 (2022-03-10)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Monterey 12.3

Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.1/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] magrittr_2.0.3     SeuratObject_4.0.4 Seurat_4.1.0       forcats_0.5.1     
 [5] stringr_1.4.0      dplyr_1.0.8        purrr_0.3.4        readr_2.1.2       
 [9] tidyr_1.2.0        tibble_3.1.6       ggplot2_3.3.5      tidyverse_1.3.1   
[13] Scillus_0.5.0     

loaded via a namespace (and not attached):
  [1] readxl_1.4.0          backports_1.4.1       circlize_0.4.14      
  [4] plyr_1.8.7            igraph_1.3.0          lazyeval_0.2.2       
  [7] splines_4.1.3         listenv_0.8.0         scattermore_0.8      
 [10] digest_0.6.29         foreach_1.5.2         htmltools_0.5.2      
 [13] formattable_0.2.1     fansi_1.0.3           tensor_1.5           
 [16] cluster_2.1.3         doParallel_1.0.17     ROCR_1.0-11          
 [19] tzdb_0.3.0            ComplexHeatmap_2.10.0 globals_0.14.0       
 [22] modelr_0.1.8          matrixStats_0.61.0    R.utils_2.11.0       
 [25] spatstat.sparse_2.1-0 colorspace_2.0-3      rvest_1.0.2          
 [28] ggrepel_0.9.1         haven_2.4.3           xfun_0.30            
 [31] crayon_1.5.1          jsonlite_1.8.0        spatstat.data_2.1-4  
 [34] survival_3.3-1        zoo_1.8-9             iterators_1.0.14     
 [37] glue_1.6.2            polyclip_1.10-0       gtable_0.3.0         
 [40] leiden_0.3.9          GetoptLong_1.0.5      future.apply_1.8.1   
 [43] shape_1.4.6           BiocGenerics_0.40.0   abind_1.4-5          
 [46] scales_1.1.1          DBI_1.1.2             spatstat.random_2.2-0
 [49] miniUI_0.1.1.1        Rcpp_1.0.8.3          viridisLite_0.4.0    
 [52] xtable_1.8-4          clue_0.3-60           reticulate_1.24      
 [55] spatstat.core_2.4-2   stats4_4.1.3          htmlwidgets_1.5.4    
 [58] httr_1.4.2            RColorBrewer_1.1-3    ellipsis_0.3.2       
 [61] ica_1.0-2             farver_2.1.0          R.methodsS3_1.8.1    
 [64] pkgconfig_2.0.3       uwot_0.1.11           dbplyr_2.1.1         
 [67] deldir_1.0-6          utf8_1.2.2            labeling_0.4.2       
 [70] tidyselect_1.1.2      rlang_1.0.2           reshape2_1.4.4       
 [73] later_1.3.0           cellranger_1.1.0      munsell_0.5.0        
 [76] tools_4.1.3           cli_3.2.0             generics_0.1.2       
 [79] broom_0.8.0           ggridges_0.5.3        evaluate_0.15        
 [82] fastmap_1.1.0         goftest_1.2-3         fs_1.5.2             
 [85] knitr_1.38            fitdistrplus_1.1-8    RANN_2.6.1           
 [88] pbapply_1.5-0         future_1.24.0         nlme_3.1-157         
 [91] mime_0.12             R.oo_1.24.0           xml2_1.3.3           
 [94] rstudioapi_0.13       compiler_4.1.3        plotly_4.10.0        
 [97] png_0.1-7             spatstat.utils_2.3-0  reprex_2.0.1         
[100] stringi_1.7.6         RSpectra_0.16-0       lattice_0.20-45      
[103] Matrix_1.4-1          vctrs_0.4.1           pillar_1.7.0         
[106] lifecycle_1.0.1       spatstat.geom_2.4-0   lmtest_0.9-40        
[109] GlobalOptions_0.1.2   RcppAnnoy_0.0.19      data.table_1.14.2    
[112] cowplot_1.1.1         irlba_2.3.5           httpuv_1.6.5         
[115] patchwork_1.1.1       R6_2.5.1              promises_1.2.0.1     
[118] KernSmooth_2.23-20    gridExtra_2.3         IRanges_2.28.0       
[121] parallelly_1.31.0     codetools_0.2-18      MASS_7.3-56          
[124] assertthat_0.2.1      rjson_0.2.21          withr_2.5.0          
[127] sctransform_0.3.3     S4Vectors_0.32.4      mgcv_1.8-40          
[130] parallel_4.1.3        hms_1.1.1             grid_4.1.3           
[133] rpart_4.1.16          rmarkdown_2.13        Rtsne_0.15           
[136] shiny_1.7.1           lubridate_1.8.0

Numbers for clusters and white bar separation in plot_heatmap

Hi,

Thank you for such a great tool - it allows visualization of lots of interesting metadata on a heatmap.

One slightly annoying feature is that it is sometimes difficult to differentiate columns between different clusters when there is a lot of them (10+ clusters). The default of plot_heatmap starts using continuous color palettes such as RdYlBu which makes it difficult to find where one cluster starts and another ends. Moreover, since there is no number at the top of the heatmap, I have to count the columns each time I am analyzing the columns in the middle of the heatmap.

Here is an example:
forgithub

Solution:
Would it be possible to add additional parameters that allow for separation of clusters with a white/black line and numbering of clusters? I am attaching an example from DoHeatmap that has those features by default:
DoHeatmap-1

Alternatively: could you suggest how I could modify your code to make the ComplexHeatmap object have these features?

Regards,
Matas

Issue with large heatmaps and cairo

Hello

Using plot_heatmap I'm getting several 'too huge' errors with the PNG rastering via Cairo. I was wondering if it would be possible to add ... to the functions so arguments can be passed to underlying complex heatmap functions so things like rastering can be switched off or tweaked easily?

(not just rastering but example case! Would like to be able to tweak complexheatmap function options)

Could the helper functions also be exported to make this a tad easier?

Thank you !

problem with plot_measure

I hope this package will let me display violin plots the way I want to. But I am getting a weird error with plot_measure: "Error in dataset[[group_by]]: subscript out of bounds. Here is my code:

plot_measure(dataset = oligosnew2@assays$[email protected],
measures = "Neat1", group_by = "seurat_clusters")

negative values of -log10(Adj. p)

Hi, thank you for your excellent package and I really enjoying many downstream analysis with the package. However, I found in the GSEA plot, the -log10(Adj. p) values can take negative values which is not feasible to me. p value is always less than 1, and -log10(p) should always > 0.

add gene annotation for Heatmap

Thank you for your excellent package for single cell visualization, However I encounter a feature that is not included in the package for plot_heatmap function. Is that possible to added annotation bar for genes (row annotation).

Screen Shot 2021-08-09 at 8 18 19 AM

[Bug]

Describe the bug
I get some genes out of the marker genes as NA
image

thank you!

Julio

[Feature]

Hi, thanks a lot for this package.

I am working with multiomic data sc-ATACseq + sc-RNAseq.

The package worked great for the RNAseq part of the data.

I am now trying to display the data from the peaks assays calculated from ATACseq data.
Using seurat function: DoHeatmap(seurat_object, features = features, assay = 'peaks', slot = 'data'), I can access the data that I want to display.

Is there a way to use these data with your function ?

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.