ktplots
ktplots copied to clipboard
plot_cpdb() error
Hi,
Many thanks for the amazing tool. I'm using ktplots and cellphoneDB for the first time. I've used cpdb_statistical_analysis_method from latest cellphoneDB v5 to run statistical analysis. plot_cpdb_heatmap() works fine on the results, unfortunately dot plot plot_cpdb() is showing error. Please could you help to solve the following error from plot_cpdb().
Dot plot
plot_cpdb(
-
scdata=sce,
-
cell_type1="Pericyte",
-
cell_type2=".",
-
celltype_key="Cell_type",
-
means=means_stat,
-
pvals=pvals_stat,
-
genes=c("TNFRSF13B", "STAT5A"),
-
title="interacting interactions!",
- )
Error in
dplyr::left_join()
: ! Can't joinx$Var2
withy$Var2
due to incompatible types. ℹx$Var2
is a. ℹ y$Var2
is a <factor<4887b>>. Runrlang::last_trace()
to see where the error occurred.
rlang::last_trace() <error/dplyr_error_join_incompatible_type> Error in
dplyr::left_join()
: ! Can't joinx$Var2
withy$Var2
due to incompatible types. ℹx$Var2
is a. ℹ y$Var2
is a <factor<4887b>>.
Backtrace: ▆
- └─ktplots::plot_cpdb(...)
- ├─dplyr::left_join(df_means, df_pvals, by = c("Var1", "Var2"))
- └─dplyr:::left_join.data.frame(df_means, df_pvals, by = c("Var1", "Var2")) Run rlang::last_trace(drop = FALSE) to see 22 hidden frames.
rlang::last_trace(drop = FALSE) <error/dplyr_error_join_incompatible_type> Error in
dplyr::left_join()
: ! Can't joinx$Var2
withy$Var2
due to incompatible types. ℹx$Var2
is a. ℹ y$Var2
is a <factor<4887b>>.
Backtrace: ▆
- ├─ktplots::plot_cpdb(...)
- │ ├─dplyr::left_join(df_means, df_pvals, by = c("Var1", "Var2"))
- │ └─dplyr:::left_join.data.frame(df_means, df_pvals, by = c("Var1", "Var2"))
- │ └─dplyr:::join_mutate(...)
- │ └─dplyr:::join_cast_common(x_key, y_key, vars, error_call = error_call)
- │ ├─rlang::try_fetch(...)
- │ │ └─base::withCallingHandlers(...)
- │ └─vctrs::vec_ptype2(x, y, x_arg = "", y_arg = "", call = error_call)
- ├─vctrs (local)
<fn>
() - │ └─vctrs::vec_default_ptype2(...)
- │ ├─base::withRestarts(...)
- │ │ └─base (local) withOneRestart(expr, restarts[[1L]])
- │ │ └─base (local) doWithOneRestart(return(expr), restart)
- │ └─vctrs::stop_incompatible_type(...)
- │ └─vctrs:::stop_incompatible(...)
- │ └─vctrs:::stop_vctrs(...)
- │ └─rlang::abort(message, class = c(class, "vctrs_error"), ..., call = call)
- │ └─rlang:::signal_abort(cnd, .file)
- │ └─base::signalCondition(cnd)
- └─rlang (local)
<fn>
(<vctrs__2>
) - └─handlers[1L]
-
└─dplyr:::rethrow_error_join_incompatible_type(cnd, vars, error_call)
-
└─dplyr:::stop_join(...)
-
└─dplyr:::stop_dplyr(...)
-
└─rlang::abort(...)
Kind regards, RB