junjunlab / scRNAtoolVis

Useful functions to make your scRNA-seq plot more cool!
Other
258 stars 27 forks source link

jjVolcano Error #22

Open ZJU-TingYun opened 1 year ago

ZJU-TingYun commented 1 year ago

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 ()

HZXlovesJACK commented 1 year ago

same here I want to know why

ufys1994 commented 1 year ago

Same here! Thanks for your efforts!

junjunlab commented 1 year ago

try re-install scRNAtoolVis.

ufys1994 commented 1 year ago

try re-install scRNAtoolVis.

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 (1470) ✖ 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))

I am sorry I think the problem still there even I tried re-install

junjunlab commented 1 year ago

重新安装试试,刚看了一下代码,源码好像是有点问题

ufys1994 commented 1 year ago

Thanks a ton. It works now! Few things I noticed:

  1. the expand = c(-1,1) parameter doesn't work; this was a problem before and I had to use +ylim() to change the y-axis range.
  2. i see in the source code that it should only color plots that pass the adjusted p-value (default is 0.01). Maybe I'm wrong, but I don't think this works, the plots that are colored are all of my input data (not filtered by the code).