egeulgen / pathfindR

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

Running run_pathfindr on multiple gene_sets #210

Closed CDSchuster closed 2 months ago

CDSchuster commented 3 months ago

Hello!

I tried to run this line:

run_pathfindR(input, adj_method = "fdr", iterations = 10, n_processes = 4, gene_sets = c("KEGG", "Reactome","GO-BP", "GO-MF"))

But it returns an error:

Error in if (!gene_sets %in% all_gs_opts) {: the condition has length > 1 Traceback:

  1. run_pathfindR(input, adj_method = "fdr", iterations = 10, n_processes = 4, . gene_sets = c("KEGG", "Reactome", "GO-BP", "GO-MF"))
  2. fetch_gene_set(gene_sets = gene_sets, min_gset_size = min_gset_size, . max_gset_size = max_gset_size, custom_genes = custom_genes, . custom_descriptions = custom_descriptions)

Am I writing the arguments wrong or is it that run_pathfindr() works with one database at a time(kegg, go, reactome...)?

Thanks a lot in advance! Best regards,

Claudio

egeulgen commented 3 months ago

Hello. The function can handle only one gene set at a time. If you’d like to merge them (wouldn’t recommend) you can do so manually and use the custom gene set arguments.-EOn 24 Jun 2024, at 20:51, CDSchuster @.***> wrote: Hello! I tried to run this line: run_pathfindR(input, adj_method = "fdr", iterations = 10, n_processes = 4, gene_sets = c("KEGG", "Reactome","GO-BP", "GO-MF")) But it returns an error: Error in if (!gene_sets %in% all_gs_opts) {: the condition has length > 1 Traceback:

run_pathfindR(input, adj_method = "fdr", iterations = 10, n_processes = 4, . gene_sets = c("KEGG", "Reactome", "GO-BP", "GO-MF")) fetch_gene_set(gene_sets = gene_sets, min_gset_size = min_gset_size, . max_gset_size = max_gset_size, custom_genes = custom_genes, . custom_descriptions = custom_descriptions)

Am I writing the arguments wrong or is it that run_pathfindr() works with one database at a time(kegg, go, reactome...)? Thanks a lot in advance! Best regards, Claudio

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: @.***>

CDSchuster commented 3 months ago

Why would you not recommend merging results?

In addition to that. Is there a way to change node labels when plotting the graphs with term_gene_graph(). Thanks for your answers!

Best regards,

Claudio

egeulgen commented 2 months ago

Apologies for the late reply. I wouldn’t recommend combining gene sets for enrichment analysis. Performing enrichment analysis for each and then filtering/combining these should work fine.You may change the node labels for terms_gene_graph() via setting use_description=TRUE, https://egeulgen.github.io/pathfindR/reference/term_gene_graph.htmlThe output is a ggplot object so it will allow you alter other aesthetic options. Best,-EOn 25 Jun 2024, at 21:50, CDSchuster @.***> wrote: Why would you not recommend merging results? In addition to that. Is there a way to change node labels when plotting the graphs with term_gene_graph(). Thanks for your answers! Best regards, Claudio

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>