Skip to content

Commit 85fe3d5

Browse files
committed
disable progress bar in vignette articles to avoid printing issues
1 parent 7c129ab commit 85fe3d5

2 files changed

Lines changed: 14 additions & 7 deletions

File tree

vignettes/rbioapi_do_enrich.Rmd

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,8 @@ While the only required argument of `rba_enrichr()` function is `gene_list`, her
131131
enrichr_enrich <- rba_enrichr(
132132
gene_list = covid_critical,
133133
organism = "human",
134-
gene_set_library = "KEGG_2021_Human"
134+
gene_set_library = "KEGG_2021_Human",
135+
progress_bar = FALSE # to avoid printing issues in the vignette
135136
)
136137
```
137138

@@ -162,7 +163,8 @@ In the `gene_set_library` parameter, you can also provide multiple gene set libr
162163
enrichr_enrich_kegg <- rba_enrichr(
163164
gene_list = covid_critical,
164165
gene_set_library = "kegg",
165-
regex_library_name = TRUE # default value
166+
regex_library_name = TRUE, # default value
167+
progress_bar = FALSE # to avoid printing issues in the vignette
166168
)
167169
```
168170

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

446448

447449
```{r string_enrichment_plot, fig.show='hide'}
448-
graph_3 <- rba_string_enrichment_image(
450+
enrich_plot <- rba_string_enrichment_image(
449451
ids = covid_critical,
450452
species = 9606,
451453
category = "KEGG",
@@ -456,8 +458,8 @@ graph_3 <- rba_string_enrichment_image(
456458
```
457459

458460
```{r string_enrichment_plot_image, echo=FALSE, fig.cap="Visualization of enrichment analysis results", fig.align='center', fig.width=7}
459-
if (is.array(graph_3)) {
460-
grid::grid.raster(graph_3, just = "center")
461+
if (is.array(enrich_plot)) {
462+
grid::grid.raster(enrich_plot, just = "center")
461463
} else {
462464
print("Vignette building failed. It is probably because the web service was down during the building.")
463465
}

vignettes/rbioapi_enrichr.Rmd

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,8 @@ Sys.sleep(3)
110110
# Request the enrichment analysis by a specific library
111111
results_msig_hallmark <- rba_enrichr(
112112
gene_list = genes,
113-
gene_set_library = "MSigDB_Hallmark_2020"
113+
gene_set_library = "MSigDB_Hallmark_2020",
114+
progress_bar = FALSE # to avoid printing issues in the vignette
114115
)
115116
```
116117

@@ -143,7 +144,8 @@ Sys.sleep(3)
143144
results_msig <- rba_enrichr(
144145
gene_list = genes,
145146
gene_set_library = "msig",
146-
regex_library_name = TRUE
147+
regex_library_name = TRUE,
148+
progress_bar = FALSE # to avoid printing issues in the vignette
147149
)
148150
149151
# You can drop `regex_library_name = TRUE`, as it is TRUE by default.
@@ -258,6 +260,9 @@ results_msig <- rba_enrichr(
258260
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.
259261

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

0 commit comments

Comments
 (0)