saeyslab / multinichenetr

MultiNicheNet: a flexible framework for differential cell-cell communication analysis from multi-sample multi-condition single-cell transcriptomics data
GNU General Public License v3.0
107 stars 14 forks source link

Intercellular regulatory network systems view-graph_plot errored #56

Closed Chenium123 closed 6 months ago

Chenium123 commented 7 months ago

Happy New Year! The R package you provided is very useful! However, I encountered an error in the final step while generating images using code similar to threewise_analysis_MISC.md. The error message is as follows:

graph_plot$plot Error in ggraph::geom_edge_loop(): ! Problem while computing stat. ℹ Error occurred in the 2nd layer. Caused by error in seq_len(): ! argument must be coercible to non-negative integer Run rlang::last_trace() to see where the error occurred. Warning message: In max(f) : no non-missing arguments to max; returning -Inf

rlang::last_trace(drop = FALSE) <error/rlang_error> Error in ggraph::geom_edge_loop(): ! Problem while computing stat. ℹ Error occurred in the 2nd layer. Caused by error in seq_len(): ! argument must be coercible to non-negative integer

Backtrace: ▆

  1. ├─base (local) <fn>(x)
  2. ├─ggplot2:::print.ggplot(x)
  3. │ ├─ggplot2::ggplot_build(x)
  4. │ ├─ggraph:::ggplot_build.ggraph(x)
  5. │ ├─base::NextMethod()
  6. │ └─ggplot2:::ggplot_build.ggplot(x)
  7. │ └─ggplot2:::by_layer(...)
  8. │ ├─rlang::try_fetch(...)
  9. │ │ ├─base::tryCatch(...)
  10. │ │ │ └─base (local) tryCatchList(expr, classes, parentenv, handlers)
  11. │ │ │ └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]])
  12. │ │ │ └─base (local) doTryCatch(return(expr), name, parentenv, handler)
  13. │ │ └─base::withCallingHandlers(...)
  14. │ └─ggplot2 (local) f(l = layers[[i]], d = data[[i]])
  15. │ └─l$compute_statistic(d, layout)
  16. │ └─ggplot2 (local) compute_statistic(..., self = self)
  17. │ └─self$stat$compute_layer(data, self$computed_stat_params, layout)
  18. │ └─ggplot2 (local) compute_layer(..., self = self)
  19. │ └─ggplot2:::dapply(...)
  20. │ └─ggplot2:::split_with_index(seq_len(nrow(df)), ids)
  21. └─base::.handleSimpleError(...)
  22. └─rlang (local) h(simpleError(msg, call))
  23. └─handlers[1L]
  24. └─cli::cli_abort(...)
  25. └─rlang::abort(...)

The above is the error message I received. Do I need to check my data? There were no errors in the previous processing steps. If you need any additional information, please let me know. Thank you for your help!

browaeysrobin commented 6 months ago

Hi @Chenium123

Can you check #10 and let me know whether that fix fixed your issue?