Commit c2584825 authored by liiskolb's avatar liiskolb
Browse files

vignette update

parent 483350b2
---
title: "Gene list functional enrichment analysis and namespace conversion with gprofiler2"
#rmarkdown::html_vignette
date: "`r Sys.Date()`"
output:
prettydoc::html_pretty:
theme: cayman
highlight: github
toc: true
mathjax: null
bibliography: extdata/references.bib
link-citations: yes
csl: extdata/biomed-central.csl
......@@ -126,7 +126,7 @@ names(gostres)
```
```{r}
head(gostres$result)
head(gostres$result, 3)
```
The result `data.frame` contains the following columns:
......@@ -169,7 +169,7 @@ gostres2 <- gost(query = c("X:1000:1000000", "rs17396340", "GO:0005005", "ENSG00
```
```{r}
head(gostres2$result)
head(gostres2$result, 3)
```
The result `data.frame` will include additional columns:
......@@ -199,7 +199,7 @@ multi_gostres1 <- gost(query = list("chromX" = c("X:1000:1000000", "rs17396340",
```
```{r}
head(multi_gostres1$result)
head(multi_gostres1$result, 3)
```
The column **"query"** in the result `data.frame` will now contain the corresponding name for the query. If no name is specified, then the query name is defined as the order of query with the prefix "query\_".
......@@ -215,7 +215,7 @@ multi_gostres2 <- gost(query = list("chromX" = c("X:1000:1000000", "rs17396340",
```
```{r}
head(multi_gostres2$result)
head(multi_gostres2$result, 3)
```
The result `data.frame` contains the following columns:
......@@ -273,7 +273,7 @@ The `gost` results can also be visualized with a table. The `publish_gosttable`
The `highlight_terms` can be a vector of term IDs or a subset of the results.
```{r fig.width = 9.5, fig.height = 3}
publish_gosttable(gostres, highlight_terms = gostres$result[c(1:2,10,100:102,120,124,125),],
publish_gosttable(gostres, highlight_terms = gostres$result[c(1:2,10,120),],
use_colors = TRUE,
show_columns = c("source", "term_name", "term_size", "intersection_size"),
filename = NULL)
......@@ -291,7 +291,7 @@ Note that if a term is clicked on one of the Manhattan plots, it is also highlig
```{r fig.width = 10, fig.height = 2, warning = F}
publish_gosttable(multi_gostres1,
highlight_terms = multi_gostres1$result[c(1, 24, 82, 176, 204, 234),],
highlight_terms = multi_gostres1$result[c(1, 82, 176),],
use_colors = TRUE,
show_columns = c("source", "term_name", "term_size"),
filename = NULL)
......@@ -328,7 +328,7 @@ download.file(url = "http://software.broadinstitute.org/gsea/resources/msigdb/7.
upload_GMT_file(gmtfile = "extdata/biocarta.gmt")
```
The result is a string that denotes the unique ID of the uploaded data source in the [g:Profiler](https://biit.cs.ut.ee/gprofiler) database. In this examaple, the ID is **gp\_\_TEXF\_hZLM\_d18**.
The result is a string that denotes the unique ID of the uploaded data source in the [g:Profiler](https://biit.cs.ut.ee/gprofiler) database. In this examaple, the ID is **gp\_ \_TEXF\_hZLM\_d18**.
After the upload, this ID can be used as a value for the parameter `organism` in the `gost` function. The input `query` should consist of identifiers that are available in the GMT file. Note that all the genes in the GMT file define the domain size and therefore it is not sufficient to include only the selection of interesting terms to the file.
......@@ -336,7 +336,7 @@ After the upload, this ID can be used as a value for the parameter `organism` in
custom_gostres <- gost(query = c("MAPK3", "PIK3C2G", "HRAS", "PIK3R1", "MAP2K1",
"RAF1", "PLCG1", "GNAQ", "MAPK1", "PRKCB", "CRK", "BCAR1", "NFKB1"),
organism = "gp__TEXF_hZLM_d18")
head(custom_gostres$result)
head(custom_gostres$result, 3)
```
There is no need to repeatedly upload the same GMT file(s) every time before the enrichment analysis. This can only be uploaded once and then the ID can be used in any further enrichment analyses that are based on that custom source. The same ID can also be used in the [web tool](https://biit.cs.ut.ee/gprofiler) as a token under the Custom GMT options.
......@@ -360,7 +360,7 @@ colnames(gem) <- c("GO.ID", "Description", "p.Val", "Genes")
gem$FDR <- gem$p.Val
gem$Phenotype = "+1"
gem <- gem[,c("GO.ID", "Description", "p.Val", "FDR", "Phenotype", "Genes")]
head(gem)
head(gem, 3)
```
Here you can replace the `query` parameter with your own input. The parameter `evcodes = TRUE` is necessary as it returns the column **intersection** with corresponding gene IDs that are annotated to the term.
......@@ -415,7 +415,7 @@ gem %>% group_by(query) %>%
`gconvert` enables to map between genes, proteins, microarray probes, common names, various database identifiers, etc, from numerous [databases](https://biit.cs.ut.ee/gprofiler/page/namespaces-list) and for many [species](https://biit.cs.ut.ee/gprofiler/page/organism-list).
```{r}
gconvert(query = c("REAC:R-HSA-3928664", "rs17396340", "NLRP1"), organism = "hsapiens",
gconvert(query = c("GO:0005030", "rs17396340", "NLRP1"), organism = "hsapiens",
target="ENSG", mthreshold = Inf, filter_na = TRUE)
```
......@@ -526,7 +526,13 @@ The full list of namespaces that g:Profiler recognizes is available [here](https
If you use the R package gprofiler2 in published research, please cite:
Uku Raudvere, Liis Kolberg, Ivan Kuzmin, Tambet Arak, Priit Adler, Hedi Peterson, Jaak Vilo: **g:Profiler: a web server for functional enrichment analysis and conversions of gene lists (2019 update)** Nucleic Acids Research 2019; [doi:10.1093/nar/gkz369](https://doi.org/10.1093/nar/gkz369)
1. Kolberg, L., Raudvere, U., Kuzmin, I., Vilo, J. and Peterson, H., 2020.
**gprofiler2--an R package for gene list functional enrichment analysis and namespace conversion toolset g: Profiler.** F1000Research, 9(ELIXIR):709.; [doi:10.12688/f1000research.24956.2](https://doi.org/10.12688/f1000research.24956.2)
and
2. Raudvere, U., Kolberg, L., Kuzmin, I., Arak, T., Adler, P., Peterson, H. and Vilo, J., 2019.
**g: Profiler: a web server for functional enrichment analysis and conversions of gene lists (2019 update).** Nucleic Acids Research, 47(W1), pp.W191-W198.; [doi:10.1093/nar/gkz369](https://doi.org/10.1093/nar/gkz369)
## Need help?
......
This diff is collapsed.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment