Convert the output of g:Profiler for straightforward use in GeneTonic()

shake_gprofilerResult(gprofiler_output_file, gprofiler_output = NULL)

Arguments

gprofiler_output_file

The location of the text file output, as exported from g:Profiler

gprofiler_output

A data.frame with the output of gost() in gprofiler2. Usually it is one of the members of the list returned by the initial call to gost.

Value

A data.frame compatible for use in GeneTonic() as res_enrich

Examples

# degenes <- (mosdef::deresult_to_df(res_macrophage_IFNg_vs_naive, FDR = 0.01)$SYMBOL)
# if called directly withín R...
# enrichr_output_macrophage <- enrichr(degenes, dbs)
# or alternatively, if downloaded from the website in tabular format
gprofiler_output_file <- system.file(
  "extdata",
  "gProfiler_hsapiens_5-25-2020_tblexport_IFNg_vs_naive.csv",
  package = "GeneTonic"
)
res_from_gprofiler <- shake_gprofilerResult(gprofiler_output_file = gprofiler_output_file)
#> Found 5593 gene sets in the file output from Enrichr of which 179 are significant (p-value <= 0.05).
#> Converting for usage in GeneTonic...

data(gostres_macrophage, package = "GeneTonic")
res_from_gprofiler_2 <- shake_gprofilerResult(
  gprofiler_output = gostres_macrophage$result
)
#> Found 5593 gene sets in the file output from Enrichr of which 179 are significant (p-value <= 0.05).
#> Converting for usage in GeneTonic...