Skip to content

Commit

Permalink
Fix headings structure in vignettes
Browse files Browse the repository at this point in the history
  • Loading branch information
moosa-r committed Dec 24, 2024
1 parent dd80e4f commit 04cbeca
Show file tree
Hide file tree
Showing 9 changed files with 144 additions and 134 deletions.
35 changes: 18 additions & 17 deletions vignettes/rbioapi.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ knitr::opts_chunk$set(echo = TRUE,
comment = "#>")
```

# What does rbioapi do? {#what-does-rbioapi-do .heading2}

# What does rbioapi do? {#what-does-rbioapi-do}

Currently fully supports **Enrichr**, **JASPAR**, **miEAA**, **PANTHER**, **Reactome**, **STRING**, and **UniProt**!

Expand All @@ -41,7 +42,7 @@ With rbioapi, you do not need to have technical knowledge about web services API

------------------------------------------------------------------------

# What is Supported by rbioapi? {#what-is-supported-by-rbioapi .heading2}
# What is Supported by rbioapi? {#what-is-supported-by-rbioapi}

rbioapi is dedicated to **Biological or Medical** databases and web services. Currently, rbioapi supports and covers every API resources in the following services: (in alphabetical order):

Expand All @@ -65,7 +66,7 @@ Each of the services has its dedicated vignette article. However, In this articl

------------------------------------------------------------------------

# How to install? {#How-to-install .heading2}
# How to install? {#How-to-install}

You can install the stable release version of [rbioapi](rbioapi.html "rbioapi: User-Friendly R Interface to Biologic Web Services' API") from [CRAN](https://cran.r-project.org/package=rbioapi "rbioapi page on CRAN (The Comprehensive R Archive Network)") with:

Expand All @@ -92,7 +93,7 @@ rba_options(timeout = 30, skip_error = TRUE)

------------------------------------------------------------------------

# Naming conventions {#naming-conventions .heading2}
# Naming conventions {#naming-conventions}

To make the namespace more organized, functions has been named with the following pattern:

Expand Down Expand Up @@ -120,7 +121,7 @@ There are three exceptions: `rba_options()`, `rba_connection_test()`, and `rba_p

------------------------------------------------------------------------

# Changing the options {#changing-the-options .heading2}
# Changing the options {#changing-the-options}

To provide more control, multiple options have been implemented. See the manual of `rba_options()` function for a full description of available options. In short, some of the options will govern rbioapi's connection with servers (e.g. timeout, retry) and some of the options will modify your experience with rbioapi (e.g. verbose, diagnostics, save_file). There are two ways that you may use to change any option. Also, you can get table of available rbioapi options and their current values by calling `rba_options()`without any argument:

Expand All @@ -130,7 +131,7 @@ rba_options()

Now, let us consider the ways in which we can alter the settings:

## Change the option globally {#changing-the-options-change-the-option-globally .heading3}
## Change the option globally {#changing-the-options-change-the-option-globally}

Changing an option globally means that for the rest of your R session, any rbioapi function will respect the changed option. To do this, use `rba_options().` Each argument in this function corresponds to a certain option; Thus by running this function with your desired new values, you could globally alter that rbioapi option. for example:

Expand All @@ -141,7 +142,7 @@ rba_options(verbose = FALSE)
## From now on, the package will be quiet.
```

## Change the option only within a function call {#changing-the-options-change-the-option-only-within-a-function-call .heading3}
## Change the option only within a function call {#changing-the-options-change-the-option-only-within-a-function-call}

You can pass additional arguments to any rbioapi function using "ellipsis" (the familiar `` or dot dot dot!). Meaning that you can call any function with additional arguments where each is 'option = value' pair. This way, any changes in options will be confined within that particular function call. For example:

Expand All @@ -163,7 +164,7 @@ x <- rba_uniprot_proteins_crossref(db_id = "CD40", db_name = "HGNC")

------------------------------------------------------------------------

# Connection test {#connection-test .heading2}
# Connection test {#connection-test}

The second exception in functions' naming schema is `rba_connection_test()`. Run this simple function to check your connection with the supported services/databases. If you encounter errors when using rbioapi, kindly run this function to make sure that your internet connection or the servers are fine.

Expand All @@ -173,7 +174,7 @@ rba_connection_test(print_output = TRUE)

------------------------------------------------------------------------

# Iterating over paginated results {#multi-pages .heading2}
# Iterating over paginated results {#multi-pages}

Some API resources will return paginated responses. This is particularly common in API resources which return potentially very large responses. In rbioapi, for these cases, there are arguments such as "page_number" (with default value of 1) and -if the API resource allows- "page_size". To save your time, you may use `rba_pages()`. This function will iterate over the pages you have specified.

Expand Down Expand Up @@ -204,15 +205,15 @@ As you can see, what we have done was:

------------------------------------------------------------------------

# How and what to cite? {#how-to-cite .heading2}
# How and what to cite? {#how-to-cite}

rbioapi is an interface between you and other databases and services. Thus, if you have used rbioapi in published research, **in addition to kindly citing rbioapi, [*make sure to fully and properly cite the databases/services you have used*]{.underline}**. Suggested citations have been added in the functions' manuals, under the "references" section; Nevertheless, it is the user's responsibility to check for proper citations and to properly cite the database/services that they have used.

## How to cite rbioapi {#how-to-cite-rbioapi .heading3}
## How to cite rbioapi {#how-to-cite-rbioapi}

- Moosa Rezwani, Ali Akbar Pourfathollah, Farshid Noorbakhsh, rbioapi: user-friendly R interface to biologic web services' API, Bioinformatics, Volume 38, Issue 10, 15 May 2022, Pages 2952--2953, <https://doi.org/10.1093/bioinformatics/btac172>

## How to cite the databases and web services {#how-to-cite-services .heading3}
## How to cite the databases and web services {#how-to-cite-services}

- [How to cite Enrichr](rbioapi_enrichr.html#citations "How to cite Enrichr"). (See on [Enrichr website](https://maayanlab.cloud/Enrichr/help#terms))

Expand All @@ -230,15 +231,15 @@ rbioapi is an interface between you and other databases and services. Thus, if y

------------------------------------------------------------------------

# Code of conduct {#code-of-conduct .heading2}
# Code of conduct {#code-of-conduct}

This package, rbioapi, is an unofficial interface implementation and is not associated, endorsed, or officially connected in any way with the original databases and web services. The creators and maintainers of rbioapi are independent entities and have no official relationship with those databases and web services.

When using rbioapi, remember that you are querying data from web services; So please be considerate. Never flood a server with requests, if you need to download *unreasonably* large volumes of data, directly downloading the databases supplied in those services may be a better alternative. If you see yourself being rate-limited from any server (HTTP **429 Too Many Requests** response status code), know that you are sending more requests than what the server interprets as normal behavior, so please seek other methods or use `Sys.sleep()` between your requests.

------------------------------------------------------------------------

# What next? {#what-next .heading2}
# What next? {#what-next}

Each supported service has a dedicated vignette article. Make sure to check those too.

Expand All @@ -256,21 +257,21 @@ We are also adding vignette articles focusing on tasks and workflows:

------------------------------------------------------------------------

# Design philosophy of rbioapi {#design-philosophy .heading2}
# Design philosophy of rbioapi {#design-philosophy}

To learn more about the design philosophy and the concepts behind developing rbioapi, please read [our paper in Bioinformatics](https://doi.org/10.1093/bioinformatics/btac172 "Rezwani, M., Pourfathollah, A. A., & Noorbakhsh, F. (2022). rbioapi: user-friendly R interface to biologic web services’ API. Bioinformatics, 38(10), 2952–2953. doi: 10.1093/bioinformatics/btac172").

------------------------------------------------------------------------

# Links {#links .heading2}
# Links {#links}

- [This article in rbioapi documentation site](https://rbioapi.moosa-r.com/articles/rbioapi.html "rbioapi: User-Friendly R Interface to Biologic Web Services' API")

- [Functions references in rbioapi documentation site](https://rbioapi.moosa-r.com/reference/index.html "rbioapi reference")

------------------------------------------------------------------------

# Session info {#session-info .heading2}
# Session info {#session-info}

```{r sessionInfo, echo=FALSE}
sessionInfo()
Expand Down
34 changes: 23 additions & 11 deletions vignettes/rbioapi_do_enrich.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,14 @@ knitr::opts_chunk$set(echo = TRUE,
comment = "#>")
```


Among the databases and web services currently supported by rbioapi [Enrichr](https://maayanlab.cloud/Enrichr/ "Enrichr"), [miEAA](https://ccb-compute2.cs.uni-saarland.de/mieaa2 "miRNA Enrichment Analysis and Annotation Tool (miEAA)"), [PANTHER](http://www.pantherdb.org "Protein Analysis THrough Evolutionary Relationships (PANTHER)"), [Reactome](https://reactome.org/), and [STRING](https://string-db.org/ "STRING: Protein-Protein Interaction Networks Functional Enrichment Analysis") offer Enrichment (Over-Representation) analysis API endpoints. In this article, after a brief introduction, we will demonstrate how to perform Enrichment (Over-Representation) analysis in R, consistently and easily, using the package rbioapi.

Before continuing, note that rbioapi is an interface to the databases and web services. Hence it is the user's responsibility to cite the services they have used. We provide suggested citations in each function's manual. However, it is the user's responsibility to fully and adequately cite the databases or web services used in their published research.

------------------------------------------------------------------------

# How to install? {#how-to-install .heading2}
# How to install? {#how-to-install}

You can install the stable release version of [rbioapi](rbioapi.html "rbioapi: User-Friendly R Interface to Biologic Web Services' API") from [CRAN](https://cran.r-project.org/package=rbioapi "rbioapi page on CRAN (The Comprehensive R Archive Network)") with:

Expand All @@ -63,7 +64,7 @@ rba_options(timeout = 30, skip_error = TRUE)

------------------------------------------------------------------------

# What is Over-representation analysis? {#what-is-over-representation-analysis .heading2}
# What is Over-representation analysis? {#what-is-over-representation-analysis}

Enrichment (Over-Representation) analysis is commonly performed when one's analysis yields a list of genes, proteins, or other entities. We will not delve into details here and refer you to [D. W. Huang et al.: Nucleic Acids Res. 37, 1 (2009)](https://doi.org/10.1093/nar/gkn923 "Bioinformatics enrichment tools: paths toward the comprehensive functional analysis of large gene lists") for a thorough review of the subject.

Expand All @@ -75,7 +76,9 @@ In short, to perform such analysis, in addition to some algorithms, two data are

With over-representation analysis, you can compare your gene list to find if the member of any gene set are over-represented, meaning that they are present in your list in a manner that can not be explained by chance alone.

# Enrichment (Over-Representation) analysis in R with rbioapi {#enrichment-analysis-in-R-with-rbioapi .heading2}
------------------------------------------------------------------------

# Setting up the data {#setting-up-data}

Many web services supported by rbioapi provide tools to perform over-representation analysis against the gene sets curated in their databases. Among the databases and web services currently supported by rbioapi, [Enrichr](https://maayanlab.cloud/Enrichr/ "Enrichr"), [miEAA](https://ccb-compute2.cs.uni-saarland.de/mieaa2 "miRNA Enrichment Analysis and Annotation Tool (miEAA)"), [PANTHER](https://www.pantherdb.org "Protein Analysis THrough Evolutionary Relationships (PANTHER)"), [Reactome](https://reactome.org/), and [STRING](https://string-db.org/ "STRING: Protein-Protein Interaction Networks Functional Enrichment Analysis") provide such services. Each service has a dedicated vignette article in rbioapi. Here we will focus on performing Enrichment (Over-Representation) analysis.

Expand All @@ -89,7 +92,9 @@ covid_critical <- c("TXNDC5", "GABRR2", "MGAM2", "LOC200772", "LYPD2", "IFI27",

***Please Note**: Over-representation services return large responses. To reduce the size of this vignette article, we will only display the first 10 rows of each Data Frame.*

## Enrichr {#enrichr .heading2}
------------------------------------------------------------------------

# Enrichr {#enrichr}

[Enrichr](https://maayanlab.cloud/Enrichr/ "Enrichr") , developed in the Ma'ayan Lab, is a service to perform enrichment analysis against a considerable number of curated gene set libraries across various species.

Expand Down Expand Up @@ -155,7 +160,9 @@ As you can see below, when than one library is selected, the results will be a l
str(enrichr_enrich_kegg, max.level = 1)
```

## Reactome Analysis services {#reactome-analysis-services .heading2}
------------------------------------------------------------------------

# Reactome Analysis services {#reactome-analysis-services}

Reactome curates extensive and top-quality cellular pathways data across various species. Given the fact that proteins operate in organized units, which are the pathways, analyzing your list against Reactome pathways gene sets can provide valuable insights into the functional trajectories of your results.

Expand Down Expand Up @@ -221,7 +228,9 @@ rba_reactome_analysis_pdf(token = reactome$summary$token,
save_to = "my_analysis.pdf")
```

## PANTHER {#panther .heading2}
------------------------------------------------------------------------

# PANTHER {#panther}

PANTHER (protein analysis through evolutionary relationships) is a project that provides classification systems of genes and proteins. PANTHER also provides an enrichment service. In fact, the enrichment tool available on the [Gene Ontology (GO) website](https://geneontology.org/ "Gene Ontology Resource - Unifying Biology") is powered by [PANTHER](https://pantherdb.org/). Just like the previous sections, we will only review the enrichment functionality here; for an in-depth review of PANTHER refer to the vignette article "[PANTHER & rbioapi](rbioapi_panther.html "2.D: PANTHER & rbioapi")".

Expand Down Expand Up @@ -281,7 +290,9 @@ if (utils::hasName(panther_enrich, "result") && is.data.frame(panther_enrich$res
}
```

## STRING {#string .heading2}
------------------------------------------------------------------------

# STRING {#string}

In addition to proteins interaction data, STRING also curates proteins/genes annotations and provides enrichment analysis services. You can perform the analysis against multiple gene sets. Some of the gene sets can be accessed using other services but two gene sets are exclusive to STRING. See "[D. Szklarczyk et al.: Nucleic Acids Res. 49, D1 (2021)](https://doi.org/10.1093/nar/gkaa1074 "The STRING database in 2021: customizable protein–protein networks, and functional characterization of user-uploaded gene/measurement sets")" for further information. Again. We will only review the enrichment functionality here; for an in-depth review of STRING refer to the vignette article "[STRING & rbioapi](rbioapi_string.html "2.F: STRING & rbioapi")".

Expand Down Expand Up @@ -398,8 +409,9 @@ if (is.array(graph_3)) {
}
```

------------------------------------------------------------------------

## miEAA {#mieaa .heading2}
# miEAA {#mieaa}

The miRNA Enrichment Analysis and Annotation Tool ([miEAA](https://ccb-compute2.cs.uni-saarland.de/mieaa2/ "https://ccb-compute2.cs.uni-saarland.de/mieaa2")) is a service provided by the [Chair for Clinical Bioinformatics at Saarland University](https://www.ccb.uni-saarland.de/). What makes miEAA unique among other services presented here is that miEAA curates miRNA sets. Hence you can directly perform miRNA enrichment analysis across various species with the services miEAA provides.

Expand Down Expand Up @@ -447,15 +459,15 @@ if (is.data.frame(mieaa_enrich)) {

------------------------------------------------------------------------

# How to cite? {#how-to-cite .heading2}
# How to cite? {#how-to-cite}

rbioapi is an interface between you and other databases and services. Thus, if you have used rbioapi in published research, kindly in addition to citing rbioapi, make sure to fully and properly cite the databases/services you have used. Suggested citations have been added in the functions' manuals, under the "references" section; Nevertheless, it is the user's responsibility to check for proper citations and to properly cite the database/services that they have used.

Please see the [rbioapi's main vignette article](rbioapi.html#how-to-cite) for more details.

------------------------------------------------------------------------

# Links {#links .heading2}
# Links {#links}

- [This article in rbioapi documentation site](https://rbioapi.moosa-r.com/articles/rbioapi_do_enrich.html "Over-Representation Analysis with rbioapi")

Expand All @@ -465,7 +477,7 @@ Please see the [rbioapi's main vignette article](rbioapi.html#how-to-cite) for m

------------------------------------------------------------------------

# Session info {#session-info .heading2}
# Session info {#session-info}

```{r sessionInfo, echo=FALSE}
sessionInfo()
Expand Down
Loading

0 comments on commit 04cbeca

Please sign in to comment.