Skip to content

Commit

Permalink
disable progress bar in vignette articles to avoid printing issues
Browse files Browse the repository at this point in the history
  • Loading branch information
moosa-r committed Feb 3, 2025
1 parent 7c129ab commit 85fe3d5
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
12 changes: 7 additions & 5 deletions vignettes/rbioapi_do_enrich.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,8 @@ While the only required argument of `rba_enrichr()` function is `gene_list`, her
enrichr_enrich <- rba_enrichr(
gene_list = covid_critical,
organism = "human",
gene_set_library = "KEGG_2021_Human"
gene_set_library = "KEGG_2021_Human",
progress_bar = FALSE # to avoid printing issues in the vignette
)
```

Expand Down Expand Up @@ -162,7 +163,8 @@ In the `gene_set_library` parameter, you can also provide multiple gene set libr
enrichr_enrich_kegg <- rba_enrichr(
gene_list = covid_critical,
gene_set_library = "kegg",
regex_library_name = TRUE # default value
regex_library_name = TRUE, # default value
progress_bar = FALSE # to avoid printing issues in the vignette
)
```

Expand Down Expand Up @@ -445,7 +447,7 @@ In addition to a data frame, you can also get a plot summarizing the enrichment


```{r string_enrichment_plot, fig.show='hide'}
graph_3 <- rba_string_enrichment_image(
enrich_plot <- rba_string_enrichment_image(
ids = covid_critical,
species = 9606,
category = "KEGG",
Expand All @@ -456,8 +458,8 @@ graph_3 <- rba_string_enrichment_image(
```

```{r string_enrichment_plot_image, echo=FALSE, fig.cap="Visualization of enrichment analysis results", fig.align='center', fig.width=7}
if (is.array(graph_3)) {
grid::grid.raster(graph_3, just = "center")
if (is.array(enrich_plot)) {
grid::grid.raster(enrich_plot, just = "center")
} else {
print("Vignette building failed. It is probably because the web service was down during the building.")
}
Expand Down
9 changes: 7 additions & 2 deletions vignettes/rbioapi_enrichr.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,8 @@ Sys.sleep(3)
# Request the enrichment analysis by a specific library
results_msig_hallmark <- rba_enrichr(
gene_list = genes,
gene_set_library = "MSigDB_Hallmark_2020"
gene_set_library = "MSigDB_Hallmark_2020",
progress_bar = FALSE # to avoid printing issues in the vignette
)
```

Expand Down Expand Up @@ -143,7 +144,8 @@ Sys.sleep(3)
results_msig <- rba_enrichr(
gene_list = genes,
gene_set_library = "msig",
regex_library_name = TRUE
regex_library_name = TRUE,
progress_bar = FALSE # to avoid printing issues in the vignette
)
# You can drop `regex_library_name = TRUE`, as it is TRUE by default.
Expand Down Expand Up @@ -258,6 +260,9 @@ results_msig <- rba_enrichr(
If you choose to follow the step-by-step approach, please note that Enrichr relies on an API back-end called [speedrichr](https://github.com/MaayanLab/speedrichr) to handle analysis with a background gene list. Therefore, when performing an analysis with background gene list, you must explicitly upload the target gene list to speedrichr. . Later steps will automatically interact with speedrichr as long as the relevant parameters for the background genes are specified.

```{r background_gene_list_approach2, eval=FALSE}
# Assume we have the background genes in the variable my_background_genes
# Create a vector with our genes' NCBI IDs
genes <- c(
"p53", "BRCA1", "cdk2", "Q99835", "CDC42","CDK1","KIF23","PLK1",
Expand Down

0 comments on commit 85fe3d5

Please sign in to comment.