egeulgen / pathfindR

pathfindR: Enrichment Analysis Utilizing Active Subnetworks
https://egeulgen.github.io/pathfindR/
Other
178 stars 25 forks source link

Error Unknown scale type #75

Closed kaizen89 closed 3 years ago

kaizen89 commented 3 years ago

Hi, I have installed pathfindR through cran, latest version. I ran this command

run_pathfindR(Markers_FibSmall_cssPCA_07_n[c("gene", "avg_logFC", "p_val_adj")], gene_sets = "GO-BP", plot_enrichment_chart = T, gaThread = 12)

I got this ggplot2 error

5.
abort("Unknown scale type")
4.
ggplot2::scale_color_continuous(low = "#f5efef", high = "red")

Do you have an idea what's the cause? Thank you

egeulgen commented 3 years ago

hello @kaizen89, can you please share the full error?

kaizen89 commented 3 years ago

Error: Unknown scale type Run rlang::last_error() to see where the error occurred. 7. stop(fallback) 6. signal_abort(cnd) 5. abort("Unknown scale type") 4. ggplot2::scale_color_continuous(low = "#f5efef", high = "red") 3. pathfindR::enrichment_chart(result_df = final_res) 2. graphics::plot(pathfindR::enrichment_chart(result_df = final_res)) 1. run_pathfindR(Markers_FibSmall_cssPCA_07_n[c("gene", "avg_logFC", "p_val_adj")], gene_sets = "GO-BP", plot_enrichment_chart = T, gaThread = 12)

egeulgen commented 3 years ago

hello again, I could not reproduce the issue on my end, but I changed scale_color_continuous() to scale_color_gradient() to explicitly use gradient, should work now. You can install the latest dev version (including this fix) via:

devtools::install_github("egeulgen/pathfindR")

Btw, argument to control the number of threads is n_processes, you might want to use that instead of gaThread, which is used for genetic algorithm only.