Giter VIP home page Giter VIP logo

scrnatoolvis's Introduction

👨 Hi, I am Jun Zhang. 💻 👋

  • 🔭 I’m currently working on NGS data analysis.
  • 🌱 I’m currently learning R/linux/python/julia languages and bioinformatic skills.
  • 😄 I’m looking forward to developing some R packgaes for visualization.

wechat planet

Shiny tools

R packages

Python packages

What I am doing?

scrnatoolvis's People

Contributors

junjunlab avatar totoro-chen avatar

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  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  avatar  avatar

Watchers

 avatar  avatar

scrnatoolvis's Issues

jjVolcano Error

Error in ggplot2::geom_text():
! Problem while setting up geom aesthetics.
ℹ Error occurred in the 6th layer.
Caused by error in check_aesthetics():
! Aesthetics must be either length 1 or the same as the data ()

Object p2 cannot be found

jjVolcano(diffData = sc.markers,

  •       log2FC.cutoff = 0.5,
    
  •       col.type = "p_value_adj",
    
  •       topGeneN = 3)
    

Error in jjVolcano(diffData = sc.markers, log2FC.cutoff = 0.5, col.type = "p_value_adj", :
Object p2 cannot be found

Error in utils::download.file(url, path, method = method, quiet = quiet, : download from 'https://api.github.com/repos/junjunlab/scRNAtoolVis/tarball/HEAD' failed

devtools::install_github('junjunlab/scRNAtoolVis')
Using github PAT from envvar GITHUB_TOKEN
Downloading GitHub repo junjunlab/scRNAtoolVis@HEAD
Error in utils::download.file(url, path, method = method, quiet = quiet, :
download from 'https://api.github.com/repos/junjunlab/scRNAtoolVis/tarball/HEAD' failed.

I have a good Internet connection and can access github normally. How can I solve this problem?

Error in eval(`_inherit`, env, NULL) : object 'RangeContinuous' not found

jjDotPlot(sce,id = 'cell_type',x.text.angle=0,x.text.hjust=0.5,
gene ="PTPRC")

Error in eval(_inherit, env, NULL) : object 'RangeContinuous' not found.

sessionInfo()

R version 4.2.1 (2022-06-23)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 20.04.4 LTS

Matrix products: default
BLAS: /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.9.0
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.9.0

locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8
[4] LC_COLLATE=en_US.UTF-8 LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C LC_ADDRESS=C
[10] LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

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

other attached packages:
[1] scRNAtoolVis_0.0.6 forcats_0.5.1 stringr_1.5.0 purrr_1.0.1
[5] readr_2.1.2 tidyr_1.3.0 tibble_3.2.1 tidyverse_1.3.2
[9] ggsci_3.0.0 glmGamPoi_1.8.0 future_1.27.0 sctransform_0.3.5
[13] harmony_0.1.0 Rcpp_1.0.10 ggplot2_3.4.2 dplyr_1.1.2
[17] patchwork_1.1.2 SeuratData_0.2.2 SeuratObject_4.1.3 Seurat_4.2.1

loaded via a namespace (and not attached):
[1] readxl_1.4.0 backports_1.4.1 plyr_1.8.8
[4] igraph_1.5.0 lazyeval_0.2.2 sp_1.5-0
[7] splines_4.2.1 listenv_0.8.0 scattermore_0.8
[10] usethis_2.1.6 GenomeInfoDb_1.34.9 digest_0.6.32
[13] htmltools_0.5.5 fansi_1.0.4 memoise_2.0.1
[16] magrittr_2.0.3 tensor_1.5 googlesheets4_1.0.0
[19] cluster_2.1.3 ROCR_1.0-11 remotes_2.4.2
[22] tzdb_0.3.0 globals_0.15.1 modelr_0.1.8
[25] matrixStats_0.62.0 spatstat.sparse_3.0-0 prettyunits_1.1.1
[28] ggh4x_0.2.3 colorspace_2.1-0 rvest_1.0.2
[31] rappdirs_0.3.3 ggrepel_0.9.1 haven_2.5.0
[34] callr_3.7.1 crayon_1.5.2 RCurl_1.98-1.12
[37] jsonlite_1.8.7 progressr_0.10.1 spatstat.data_3.0-0
[40] survival_3.2-13 zoo_1.8-10 glue_1.6.2
[43] polyclip_1.10-4 gtable_0.3.3 gargle_1.2.0
[46] zlibbioc_1.44.0 XVector_0.38.0 leiden_0.4.2
[49] DelayedArray_0.22.0 pkgbuild_1.3.1 future.apply_1.9.0
[52] BiocGenerics_0.44.0 abind_1.4-5 scales_1.2.1
[55] DBI_1.1.3 spatstat.random_3.0-1 miniUI_0.1.1.1
[58] viridisLite_0.4.2 xtable_1.8-4 reticulate_1.25
[61] stats4_4.2.1 profvis_0.3.7 htmlwidgets_1.5.4
[64] httr_1.4.6 RColorBrewer_1.1-3 ellipsis_0.3.2
[67] ica_1.0-3 urlchecker_1.0.1 pkgconfig_2.0.3
[70] farver_2.1.1 uwot_0.1.14 dbplyr_2.2.1
[73] deldir_1.0-6 utf8_1.2.3 tidyselect_1.2.0
[76] rlang_1.1.1 reshape2_1.4.4 later_1.3.0
[79] cachem_1.0.8 munsell_0.5.0 cellranger_1.1.0
[82] tools_4.2.1 cli_3.6.1 generics_0.1.3
[85] devtools_2.4.5 broom_1.0.0 ggridges_0.5.3
[88] ggdendro_0.1.23 fastmap_1.1.1 goftest_1.2-3
[91] processx_3.7.0 fs_1.6.2 fitdistrplus_1.1-8
[94] RANN_2.6.1 pbapply_1.5-0 nlme_3.1-157
[97] mime_0.12 xml2_1.3.3 compiler_4.2.1
[100] rstudioapi_0.13 curl_5.0.1 plotly_4.10.0
[103] png_0.1-8 spatstat.utils_3.0-1 reprex_2.0.1
[106] stringi_1.7.12 ps_1.7.1 lattice_0.20-45
[109] Matrix_1.5-1 vctrs_0.6.3 pillar_1.9.0
[112] lifecycle_1.0.3 spatstat.geom_3.0-3 lmtest_0.9-40
[115] RcppAnnoy_0.0.19 data.table_1.14.8 cowplot_1.1.1
[118] bitops_1.0-7 irlba_2.3.5 httpuv_1.6.5
[121] GenomicRanges_1.48.0 R6_2.5.1 promises_1.2.0.1
[124] KernSmooth_2.23-20 gridExtra_2.3 IRanges_2.32.0
[127] parallelly_1.32.1 sessioninfo_1.2.2 codetools_0.2-18
[130] pkgload_1.3.0 MASS_7.3-58 assertthat_0.2.1
[133] SummarizedExperiment_1.26.1 withr_2.5.0 S4Vectors_0.36.2
[136] GenomeInfoDbData_1.2.9 parallel_4.2.1 hms_1.1.1
[139] grid_4.2.1 MatrixGenerics_1.8.1 googledrive_2.0.0
[142] Rtsne_0.16 spatstat.explore_3.0-3 lubridate_1.8.0
[145] Biobase_2.58.0 shiny_1.7.4

myMarkers labels point

Thank you for the tools you developed.
I ran into a problem while running the “jjVolcano”

I want to show myMarkers.
some gene labels can point to points, but some labels can not point to points.
This makes directivity unclear.
1

I found that in the "markerVocalno", all gene labels can point to points, which is more clear.
2

I wonder if “jjVolcano” has such a function.

Average Heatmap for duplicated genes

I am trying to make an average heatmap of multiple gene lists. When I use unlist(gene_list) it works fine, but when I try to split the rows based on the gene list, it fails. The function does not seem to keep duplicate genes as rows and remove duplicate rows, so it is not possible to split rows based on gene list name. Is it possible for you to update this to allow duplicate genes to be used as rows in genome comparisons?

Thanks!

col front size in AverageHeatmap

The program "scRNAtoolVis" do helps me a lot. Thanks for your sharing!
I have meet an problem when I using "AverageHeatmap". I notice that "fontsize" could adjust the size of genenames in AverageHeatmap. How could I adjust the col size of the cell cluster?
Could you please offer some help?

Best Wishes!
Wei Liu

Ask for enhancement.

Dear Mr.JUN,what a wonderful function of jjDotPlot,i wanna use your code to repeat the blog,but there is an error.i google it,but didn't find the answer. The following is the running log:
1.jjDotPlot(object = scRNA,
gene = unique(top10$gene),
id = 'celltype',
split.by = 'group',
dot.col = color3,
split.by.aesGroup = T,
point.geom = F,
tile.geom = T)
Erro:object 'pbmc' not found
2. Are the image size parameters adjustable? I didn't find the relevant parameters, resulting in a large canvas but little change in the image.
Thanks.

jjVolcano' not found

Hi, I installed scRNAtoolVis using "devtools::install_github('junjunlab/scRNAtoolVis')" and it went smoothly with no errors. However, when I use it, it says "object 'jjVolcano' not found". Why is that?

average log2foldchange 值全为正数

您好:
我使用findallmarkers发现出来的markers 中average log2foldchange 是全为正值,导致图中基因全部在X轴上方。我看到您的图有负值,我想问这是需要什么设置吗?

cellRatioPlot can not print ggplot2 image

Error in .standalone_types_check_dot_call(ffi_standalone_check_number_1.0.7, :
object 'ffi_standalone_check_number_1.0.7' not found

In addition: Warning message:
Computation failed in stat_flow()
Caused by error in summarise():
ℹ In argument: lode = (function (x, order_by = NULL, default = default_missing(x)) ....
ℹ In group 1: alluvium = 1, x = 1, yneg = FALSE, stratum = "Treg",
deposit = 1, fissure = 1, link = 1, flow = from, adj_deposit = 1.1.18, adj_fissure = 1.1.1.
Caused by error in default_missing():
! could not find function "default_missing"

jjDotPlot anno=T

Thank you for this powerful tool! Regarding 'anno=T', is the annotation the top3pbmc.markers$cluster column? Or the metadata$celltype column?

Error in dimnames(x) <- dn : 'dimnames'的长度[2]必需与陈列范围相等(不是gsea结果也发生)

你好,上次我以为是只出现在IrGSEA结果,现在发现全部seurat都是如此。。

heatmap_gene <- c("Snhg9", "Ecm1")

 DotPlot(sce,features = heatmap_gene,assay = 'RNA',group.by = 'celltype',cols = 'Spectral')+
  theme(axis.text.x = element_text(angle = 45, vjust = 1, hjust=1))+
  labs(title = "Markers of cell type")+
  theme(plot.title = element_text(hjust = 0.5)) (可以正常出图)


AverageHeatmap(object = sce,group.by = 'celltype',assays = 'RNA',slot = 'data',
               markerGene = heatmap_gene)

Error in dimnames(x) <- dn : 'dimnames'的长度[2]必需与陈列范围相等

error in installing package

i used the code devtools::install_github('junjunlab/scRNAtoolVis') also used <devtools::install_github("sajuukLyu/ggunchull",force = TRUE)>

it turned out that the installation failed:
ERROR: unable to collate and parse R files for package ‘scRNAtoolVis’

  • removing ‘/home/chenzhenzhen/R/x86_64-pc-linux-gnu-library/4.0/scRNAtoolVis’
    Warning message:
    In i.p(...) :
    installation of package ‘/home2/chenzhenzhen/tmp/Rtmpn9xMVi/file192dab5168adcc/scRNAtoolVis_0.0.7.tar.gz’ had non-zero exit status

looking forward to solution,thank you

jjDotPlot Error

你好,感谢开发了这么棒的工具。
我在使用jjDotPlot进行排序绘图时一直报错,请问可能是什么问题呢。
`

table(all.inte$temp)
11 7 Bcells cancer DC Endothelials Epi Fibroblasts Macrophages Monocytes Neutrophils
NKT Tcells

ma <- c('Ptprc', 'Itgam', 'Lyz2', 'C1qc', 'Hmga2', 'Anxa1', 'Myc')
cr <- c('cancer', 7, 1, 'Macrophages', 'Monocytes', 'DC', 'Tcells', 'NKT', 'Bcells', 'Neutrophils', 'Endothelials', 'Fibroblasts', 'Epi')
Idents(all.inte) <- all.inte$temp
jjDotPlot(object = all.inte,
gene = ma,
cluster.order = cr,
ytree = F,
assay = 'RNA')
Aggregation function missing: defaulting to length
Error in .rowNamesDF<-(x, value = value) : 'row.names'里不允许有遗漏值
`

ask for new function ~

Dear JunJun~I don't want to show the rownames in the heatmap,Can you set a parameter to achieve this function?Anyway, your aesthetics are really great! Crazy Obsessed!!When I use the FeatureCornerAxes() function, it always automatically splits by orig.ident and the axes are shown on the far right, I don't know what's wrong. Maybe there is something wrong with my operation?Finally, I am very grateful to the author for writing such a great package.
image
image

Install errors

Hi, I got the following errors when installing using devtools::install_github('junjunlab/scRNAtoolVis'), could you give me some suggestions? Thanks!

  • installing source package 'scRNAtoolVis' ...
    ** using staged installation
    ** R
    Error in parse(outFile) :
    /tmp/RtmpbmOAIH/R.INSTALL1db9667304131/scRNAtoolVis/R/featurePlot.R:145:19: unexpected '>'
    144: quantile_val <- quantile(mer[,gene_mtx[i,j]],probs = quantile.val)
    145: mer <- mer |>
    ^
    ERROR: unable to collate and parse R files for package 'scRNAtoolVis'

if AverageHeatmap function could use features in metadata?

Good job! jun!
I want to plot a heatmap use some features in metadata which not a gene in RNA assay, it is a pathways score. I can get a FeaturePlot use seurat FeaturePlot function, i wonder if we could make it available in the AverageHeatmap funtion?
Thank you! have a good day!

Error in names(x) <- value.

What a great jobs of jjDotPlot.Today,i wanna use my data to repeat the blog.When i conduct my code:
jjDotPlot(scRNA1,gene=top10$gene)
there is an error as follow:
Error in names(x) <- value :
'names' attribute [101] must be the same length as the vector [99].
I would appreciate if anyone have an idea about it.

jjVolcano and markerVocalno only provided 9 manual scale

I have got 15 clusters in sce. When I applied jjVolcano and markerVocalno to draw a volcano, I got follow errors.

jjvol <- jjVolcano(diffData =markers )
[1] "This palatte have 12 colors!"
Scale for y is already present.
Adding another scale for y, which will replace the existing scale.
jjvol
Error in palette():
! Insufficient values in manual scale. 15 needed but only 9 provided.
marker_vol
Error in palette():
! Insufficient values in manual scale. 15 needed but only 0 provided.

Error in UseMethod("filter")

Hello, author. I encountered the following issue while using the R package you developed.
Could you please advise on how to resolve it?

jjVolcano(diffData = ppp,
          log2FC.cutoff = 0.25,
          size  = 4, 
          fontface = 'italic', 
          #aesCol = c('purple','orange'), 
          tile.col = colour, 
          #col.type = "adjustP", 
          topGeneN = 10
         )
Error in UseMethod("filter") :
  no applicable method for 'filter' applied to an object of class "Seurat"

Error in dimnames(x) <- dn : 'dimnames'的长度[2]必需与陈列范围相等

hi, great job!
I get a seurat object with GSVA result by irGSVA.

ht1 <- AverageHeatmap(object = seurat,assays = 'UCell',group.by = 'celltype',slot = 'data',
                      markerGene = c("GOBP-.....-PROCESS",      
                                     "GOBP-....-PROCESS",           
                                     "GOBP-....-PATHWAY"))
Error in dimnames(x) <- dn : 'dimnames'的长度[2]必需与陈列范围相等

I search and can't get a solve. Could you give some ideas? THANKS

set the color seed in AverageHeatmap

Hi, I have one question: how to set the color seed of AverageHeatmap to ggplot2 default color? Thanks so much. I think it is a very nice tool for some functions on scRNA-seq.

jjVolcano: This palatte have 12 colors!

Dear @junjunlab thanks for your great package. When I used jjVolcano function with demo pbmc data, it encountered the following error, could you give some suggestions to fix the problem, thanks a lot.

jjVolcano(diffData = pbmc.markers)

This palatte have 12 colors!

Scale for y is already present.
Adding another scale for y, which will replace the existing scale.
ERROR while rich displaying an object: Error in palette():
! Insufficient values in manual scale. 15 needed but only 9 provided.

Traceback:

  1. tryCatch(withCallingHandlers({
    . if (!mime %in% names(repr::mime2repr))
    . stop("No repr_* for mimetype ", mime, " in repr::mime2repr")
    . rpr <- repr::mime2repr[mime]
    . if (is.null(rpr))
    . return(NULL)
    . prepare_content(is.raw(rpr), rpr)
    . }, error = error_handler), error = outer_handler)
  2. tryCatchList(expr, classes, parentenv, handlers)
  3. tryCatchOne(expr, names, parentenv, handlers[[1L]])
  4. doTryCatch(return(expr), name, parentenv, handler)
  5. withCallingHandlers({
    . if (!mime %in% names(repr::mime2repr))
    . stop("No repr_* for mimetype ", mime, " in repr::mime2repr")
    . rpr <- repr::mime2repr[mime]
    . if (is.null(rpr))
    . return(NULL)
    . prepare_content(is.raw(rpr), rpr)
    . }, error = error_handler)
  6. repr::mime2repr[mime]
  7. repr_text.default(obj)
  8. paste(capture.output(print(obj)), collapse = "\n")
  9. capture.output(print(obj))
  10. withVisible(...elt(i))
  11. print(obj)
  12. print.ggplot(obj)
  13. ggplot_build(x)
  14. ggplot_build.ggplot(x)
  15. lapply(data, scales_map_df, scales = npscales)
  16. FUN(X[[i]], ...)
  17. unlist(lapply(scales$scales, function(scale) scale$map_df(df = df)),
    . recursive = FALSE)
  18. lapply(scales$scales, function(scale) scale$map_df(df = df))
  19. FUN(X[[i]], ...)
  20. scale$map_df(df = df)
  21. map_df(..., self = self)
  22. lapply(aesthetics, function(j) self$map(df[[j]]))
  23. FUN(X[[i]], ...)
  24. self$map(df[[j]])
  25. map(..., self = self)
  26. self$palette(n)
  27. palette(...)
  28. cli::cli_abort("Insufficient values in manual scale. {n} needed but only {length(values)} provided.")
  29. rlang::abort(message, ..., call = call, use_cli_format = TRUE,
    . .frame = .frame)
  30. signal_abort(cnd, .file)

sessionInfo()
R version 4.1.3 (2022-03-10)
Platform: x86_64-conda-linux-gnu (64-bit)
Running under: CentOS Linux 7 (Core)

Matrix products: default
BLAS/LAPACK: /opt/conda/lib/libopenblasp-r0.3.21.so

locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

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

other attached packages:
[1] ComplexHeatmap_2.10.0 ggalluvial_0.12.5 corrplot_0.92
[4] scRNAtoolVis_0.0.7 lubridate_1.9.3 forcats_1.0.0
[7] stringr_1.5.1 purrr_1.0.2 readr_2.1.4
[10] tidyr_1.3.0 tibble_3.2.1 tidyverse_2.0.0
[13] RColorBrewer_1.1-3 repr_1.1.4 dplyr_1.1.4
[16] ggplot2_3.4.4 Seurat_5.0.1 SeuratObject_5.0.1
[19] sp_2.1-2

loaded via a namespace (and not attached):
[1] circlize_0.4.15 uuid_1.1-1 spam_2.10-0
[4] plyr_1.8.9 igraph_1.6.0 jjAnno_0.0.3
[7] lazyeval_0.2.2 splines_4.1.3 RcppHNSW_0.5.0
[10] listenv_0.9.0 scattermore_1.2 digest_0.6.33
[13] foreach_1.5.2 htmltools_0.5.7 fansi_1.0.6
[16] magrittr_2.0.3 tensor_1.5 cluster_2.1.4
[19] doParallel_1.0.17 ROCR_1.0-11 tzdb_0.4.0
[22] globals_0.16.2 matrixStats_1.2.0 timechange_0.2.0
[25] spatstat.sparse_3.0-3 colorspace_2.1-0 ggrepel_0.9.4
[28] crayon_1.5.2 jsonlite_1.8.8 progressr_0.14.0
[31] spatstat.data_3.0-3 survival_3.4-0 zoo_1.8-12
[34] iterators_1.0.14 glue_1.6.2 polyclip_1.10-4
[37] gtable_0.3.4 leiden_0.4.3.1 GetoptLong_1.0.5
[40] shape_1.4.6 future.apply_1.11.0 BiocGenerics_0.40.0
[43] abind_1.4-5 scales_1.3.0 spatstat.random_3.2-2
[46] miniUI_0.1.1.1 Rcpp_1.0.11 viridisLite_0.4.2
[49] xtable_1.8-4 clue_0.3-64 reticulate_1.34.0
[52] dotCall64_1.1-1 stats4_4.1.3 htmlwidgets_1.6.4
[55] httr_1.4.7 ellipsis_0.3.2 ica_1.0-3
[58] farver_2.1.1 pkgconfig_2.0.3 uwot_0.1.16
[61] deldir_2.0-2 utf8_1.2.4 labeling_0.4.3
[64] tidyselect_1.2.0 rlang_1.1.2 reshape2_1.4.4
[67] later_1.3.2 munsell_0.5.0 tools_4.1.3
[70] cli_3.6.2 generics_0.1.3 ggridges_0.5.4
[73] evaluate_0.23 fastmap_1.1.1 ggdendro_0.1.23
[76] goftest_1.2-3 fitdistrplus_1.1-11 RANN_2.6.1
[79] pbapply_1.7-2 future_1.33.0 nlme_3.1-160
[82] mime_0.12 compiler_4.1.3 plotly_4.10.3
[85] png_0.1-8 spatstat.utils_3.0-4 stringi_1.8.3
[88] RSpectra_0.16-1 lattice_0.20-45 IRdisplay_1.1
[91] Matrix_1.6-4 ggsci_3.0.0 vctrs_0.6.5
[94] pillar_1.9.0 lifecycle_1.0.4 spatstat.geom_3.2-7
[97] lmtest_0.9-40 GlobalOptions_0.1.2 RcppAnnoy_0.0.21
[100] data.table_1.14.10 cowplot_1.1.1 irlba_2.3.5.1
[103] httpuv_1.6.13 patchwork_1.1.3 R6_2.5.1
[106] promises_1.2.1 KernSmooth_2.23-20 gridExtra_2.3
[109] IRanges_2.28.0 parallelly_1.36.0 codetools_0.2-18
[112] fastDummies_1.7.3 MASS_7.3-58.1 rjson_0.2.21
[115] withr_2.5.2 sctransform_0.4.1 S4Vectors_0.32.4
[118] parallel_4.1.3 hms_1.1.3 IRkernel_1.3.1
[121] Rtsne_0.17 pbdZMQ_0.3-8 spatstat.explore_3.2-5
[124] shiny_1.8.0 base64enc_0.1-3

the problem of jjDotPlot

Dear Mr.JUN,what a wonderful function of jjDotPlot,the plot is very amazing.Today,i wanna use your code to repeat the blog,but there is an error.i google it,but didn't find the answer. The following is the running log:

library(scRNAtoolVis)
httest <- system.file("extdata", "htdata.RDS", package = "scRNAtoolVis")
pbmc <- readRDS(httest)

add groups

pbmc$groups <- rep(c('stim','control'),each = 1319)

add celltype

pbmc$celltype <- Seurat::Idents(pbmc)

load markergene

data("top3pbmc.markers")

check

head(top3pbmc.markers,3)

A tibble: 3 x 7

Groups: cluster [1]

  p_val avg_log2FC pct.1 pct.2 p_val_adj cluster     gene 
  <dbl>      <dbl> <dbl> <dbl>     <dbl> <fct>       <chr>

1 1.74e-109 1.07 0.897 0.593 2.39e-105 Naive CD4 T LDHB
2 1.17e- 83 1.33 0.435 0.108 1.60e- 79 Naive CD4 T CCR7
3 3.28e- 49 1.05 0.333 0.103 4.50e- 45 Naive CD4 T LEF1

jjDotPlot(object = pbmc,
gene = top3pbmc.markers$gene)
Error: 'PercentAbove' is not an exported object from 'namespace:Seurat'

At last,thanks for you write this function,I can't wait to give you the little star!!!

Error occurred in the 6th layer. Caused by error in `check_aesthetics()`

jjVolcano(diffData = pbmc.markers) I ran this but got an error. I checked my pbmc.markers 。 The error reads as follows
This palatte have 12 colors!
Scale for y is already present.
Adding another scale for y, which will replace the existing scale.
Error in ggplot2::geom_text():
! Problem while setting up geom aesthetics.
ℹ Error occurred in the 6th layer.
Caused by error in check_aesthetics():
! Aesthetics must be either length 1 or the same as the data (6848)
✖ Fix the following mappings: size
Run rlang::last_trace() to see where the error occurred. rlang::last_trace()
<error/rlang_error>
Error in ggplot2::geom_text():
! Problem while setting up geom aesthetics.
ℹ Error occurred in the 6th layer.
Caused by error in check_aesthetics():
! Aesthetics must be either length 1 or the same as the data (11483)
✖ Fix the following mappings: size

Backtrace:

  1. ├─base (local) <fn>(x)
  2. └─ggplot2:::print.ggplot(x)
  3. ├─ggplot2::ggplot_build(x)
  4. └─ggplot2:::ggplot_build.ggplot(x)
  5. └─ggplot2:::by_layer(...)
    
  6.   ├─rlang::try_fetch(...)
    
  7.   │ ├─base::tryCatch(...)
    
  8.   │ │ └─base (local) tryCatchList(expr, classes, parentenv, handlers)
    
  9.   │ │   └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
    
  10.   │ │     └─base (local) doTryCatch(return(expr), name, parentenv, handler)
    
  11.   │ └─base::withCallingHandlers(...)
    
  12.   └─ggplot2 (local) f(l = layers[[i]], d = data[[i]])
    
  13.     └─l$compute_geom_2(d)
    
  14.       └─ggplot2 (local) compute_geom_2(..., self = self)
    
  15.         └─self$geom$use_defaults(data, self$aes_params, modifiers)
    
  16.           └─ggplot2 (local) use_defaults(..., self = self)
    
  17.             └─ggplot2:::check_aesthetics(params[aes_params], nrow(data))
    

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.