|
a |
|
b/README.Rmd |
|
|
1 |
--- |
|
|
2 |
output: github_document |
|
|
3 |
--- |
|
|
4 |
|
|
|
5 |
<!-- README.md is generated from README.Rmd. Please edit that file --> |
|
|
6 |
|
|
|
7 |
```{r, echo = FALSE} |
|
|
8 |
knitr::opts_chunk$set( |
|
|
9 |
collapse = TRUE, |
|
|
10 |
comment = "#>", |
|
|
11 |
fig.path = "README-" |
|
|
12 |
) |
|
|
13 |
``` |
|
|
14 |
|
|
|
15 |
# UCSCXenaTools <img src='man/figures/logo.png' align="right" height="200" alt="logo"/> |
|
|
16 |
|
|
|
17 |
<!-- badges: start --> |
|
|
18 |
|
|
|
19 |
[](https://cran.r-project.org/package=UCSCXenaTools) |
|
|
20 |
[](https://lifecycle.r-lib.org/articles/stages.html) |
|
|
21 |
[](https://github.com/ropensci/UCSCXenaTools/actions/workflows/main.yml) |
|
|
22 |
[](https://cran.r-project.org/package=UCSCXenaTools) |
|
|
23 |
[](https://github.com/ropensci/software-review/issues/315) |
|
|
24 |
[](https://doi.org/10.21105/joss.01627) |
|
|
25 |
|
|
|
26 |
<!-- badges: end --> |
|
|
27 |
|
|
|
28 |
**UCSCXenaTools** is an R package for accessing genomics data from UCSC Xena platform, from cancer multi-omics to single-cell RNA-seq. |
|
|
29 |
Public omics data from UCSC Xena are supported through [**multiple turn-key Xena Hubs**](https://xenabrowser.net/datapages/), which are a collection of UCSC-hosted public databases such as TCGA, ICGC, TARGET, GTEx, CCLE, and others. Databases are normalized so they can be combined, linked, filtered, explored and downloaded. |
|
|
30 |
|
|
|
31 |
**Who is the target audience and what are scientific applications of this package?** |
|
|
32 |
|
|
|
33 |
* Target Audience: cancer and clinical researchers, bioinformaticians |
|
|
34 |
* Applications: genomic and clinical analyses |
|
|
35 |
|
|
|
36 |
## Table of Contents |
|
|
37 |
|
|
|
38 |
* [Installation](#installation) |
|
|
39 |
* [Data Hub List](#data-hub-list) |
|
|
40 |
* [Basic usage](#basic-usage) |
|
|
41 |
* [Citation](#citation) |
|
|
42 |
* [How to contribute](#how-to-contribute) |
|
|
43 |
* [Acknowledgment](#acknowledgment) |
|
|
44 |
|
|
|
45 |
## Installation |
|
|
46 |
|
|
|
47 |
Install stable release from r-universe/CRAN with: |
|
|
48 |
|
|
|
49 |
```{r, eval=FALSE} |
|
|
50 |
install.packages('UCSCXenaTools', repos = c('https://ropensci.r-universe.dev', 'https://cloud.r-project.org')) |
|
|
51 |
#install.packages("UCSCXenaTools") |
|
|
52 |
``` |
|
|
53 |
|
|
|
54 |
You can also install devel version of **UCSCXenaTools** from github with: |
|
|
55 |
|
|
|
56 |
```{r gh-installation, eval = FALSE} |
|
|
57 |
# install.packages("remotes") |
|
|
58 |
remotes::install_github("ropensci/UCSCXenaTools") |
|
|
59 |
``` |
|
|
60 |
|
|
|
61 |
If you want to build vignette in local, please add two options: |
|
|
62 |
|
|
|
63 |
```{r, eval=FALSE} |
|
|
64 |
remotes::install_github("ropensci/UCSCXenaTools", build_vignettes = TRUE, dependencies = TRUE) |
|
|
65 |
``` |
|
|
66 |
|
|
|
67 |
## Data Hub List |
|
|
68 |
|
|
|
69 |
All datasets are available at <https://xenabrowser.net/datapages/>. |
|
|
70 |
|
|
|
71 |
Currently, **UCSCXenaTools** supports the following data hubs of UCSC Xena. |
|
|
72 |
|
|
|
73 |
* UCSC Public Hub: <https://ucscpublic.xenahubs.net/> |
|
|
74 |
* TCGA Hub: <https://tcga.xenahubs.net/> |
|
|
75 |
* GDC Xena Hub (new): <https://gdc.xenahubs.net/> |
|
|
76 |
* GDC v18.0 Xena Hub (old): <https://gdcV18.xenahubs.net/> |
|
|
77 |
* ICGC Xena Hub: <https://icgc.xenahubs.net/> |
|
|
78 |
* Pan-Cancer Atlas Hub: <https://pancanatlas.xenahubs.net/> |
|
|
79 |
* UCSC Toil RNAseq Recompute Compendium Hub: <https://toil.xenahubs.net/> |
|
|
80 |
* PCAWG Xena Hub: <https://pcawg.xenahubs.net/> |
|
|
81 |
* ATAC-seq Hub: <https://atacseq.xenahubs.net/> |
|
|
82 |
* Singel Cell Xena Hub: <https://singlecellnew.xenahubs.net/> (**Disabled by UCSCXena**) |
|
|
83 |
* Kids First Xena Hub: <https://kidsfirst.xenahubs.net/> |
|
|
84 |
* Treehouse Xena Hub: <https://xena.treehouse.gi.ucsc.edu:443/> |
|
|
85 |
|
|
|
86 |
Users can update dataset list from the newest version of UCSC Xena by hand with `XenaDataUpdate()` function, followed |
|
|
87 |
by restarting R and `library(UCSCXenaTools)`. |
|
|
88 |
|
|
|
89 |
If any url of data hub is changed or a new data hub is online, please remind me by emailing to <w_shixiang@163.com> or [opening an issue on GitHub](https://github.com/ropensci/UCSCXenaTools/issues). |
|
|
90 |
|
|
|
91 |
|
|
|
92 |
## Basic usage |
|
|
93 |
|
|
|
94 |
Download UCSC Xena datasets and load them into R by **UCSCXenaTools** is a workflow with `generate`, `filter`, `query`, `download` and `prepare` 5 steps, which are implemented as `XenaGenerate`, `XenaFilter`, `XenaQuery`, `XenaDownload` and `XenaPrepare` functions, respectively. They are very clear and easy to use and combine with other packages like `dplyr`. |
|
|
95 |
|
|
|
96 |
To show the basic usage of **UCSCXenaTools**, we will download clinical data of LUNG, LUAD, LUSC from TCGA (hg19 version) data hub. Users can learn more about **UCSCXenaTools** by running `browseVignettes("UCSCXenaTools")` to read vignette. |
|
|
97 |
|
|
|
98 |
### XenaData data.frame |
|
|
99 |
|
|
|
100 |
**UCSCXenaTools** uses a `data.frame` object (built in package) `XenaData` to generate an instance of `XenaHub` class, which records information of all datasets of UCSC Xena Data Hubs. |
|
|
101 |
|
|
|
102 |
You can load `XenaData` after loading `UCSCXenaTools` into R. |
|
|
103 |
|
|
|
104 |
```{r} |
|
|
105 |
library(UCSCXenaTools) |
|
|
106 |
data(XenaData) |
|
|
107 |
|
|
|
108 |
head(XenaData) |
|
|
109 |
``` |
|
|
110 |
|
|
|
111 |
### Workflow |
|
|
112 |
|
|
|
113 |
Select datasets. |
|
|
114 |
|
|
|
115 |
```{r} |
|
|
116 |
# The options in XenaFilter function support Regular Expression |
|
|
117 |
XenaGenerate(subset = XenaHostNames=="tcgaHub") %>% |
|
|
118 |
XenaFilter(filterDatasets = "clinical") %>% |
|
|
119 |
XenaFilter(filterDatasets = "LUAD|LUSC|LUNG") -> df_todo |
|
|
120 |
|
|
|
121 |
df_todo |
|
|
122 |
``` |
|
|
123 |
|
|
|
124 |
Query and download. |
|
|
125 |
|
|
|
126 |
```{r} |
|
|
127 |
XenaQuery(df_todo) %>% |
|
|
128 |
XenaDownload() -> xe_download |
|
|
129 |
``` |
|
|
130 |
|
|
|
131 |
Prepare data into R for analysis. |
|
|
132 |
|
|
|
133 |
```{r} |
|
|
134 |
cli = XenaPrepare(xe_download) |
|
|
135 |
class(cli) |
|
|
136 |
names(cli) |
|
|
137 |
``` |
|
|
138 |
|
|
|
139 |
## More to read |
|
|
140 |
|
|
|
141 |
- [Introduction and basic usage of UCSCXenaTools](https://shixiangwang.github.io/home/en/tools/ucscxenatools-intro/) |
|
|
142 |
- [UCSCXenaTools: Retrieve Gene Expression and Clinical Information from UCSC Xena for Survival Analysis](https://shixiangwang.github.io/home/en/post/ucscxenatools-201908/) |
|
|
143 |
- [Obtain RNAseq Values for a Specific Gene in Xena Database](https://shixiangwang.github.io/home/en/post/2020-07-22-ucscxenatools-single-gene/) |
|
|
144 |
- [UCSC Xena Access APIs in UCSCXenaTools](https://shixiangwang.github.io/home/en/tools/ucscxenatools-api/) |
|
|
145 |
|
|
|
146 |
## Citation |
|
|
147 |
|
|
|
148 |
Cite me by the following paper. |
|
|
149 |
|
|
|
150 |
``` |
|
|
151 |
Wang et al., (2019). The UCSCXenaTools R package: a toolkit for accessing genomics data |
|
|
152 |
from UCSC Xena platform, from cancer multi-omics to single-cell RNA-seq. |
|
|
153 |
Journal of Open Source Software, 4(40), 1627, https://doi.org/10.21105/joss.01627 |
|
|
154 |
|
|
|
155 |
# For BibTex |
|
|
156 |
|
|
|
157 |
@article{Wang2019UCSCXenaTools, |
|
|
158 |
journal = {Journal of Open Source Software}, |
|
|
159 |
doi = {10.21105/joss.01627}, |
|
|
160 |
issn = {2475-9066}, |
|
|
161 |
number = {40}, |
|
|
162 |
publisher = {The Open Journal}, |
|
|
163 |
title = {The UCSCXenaTools R package: a toolkit for accessing genomics data from UCSC Xena platform, from cancer multi-omics to single-cell RNA-seq}, |
|
|
164 |
url = {https://dx.doi.org/10.21105/joss.01627}, |
|
|
165 |
volume = {4}, |
|
|
166 |
author = {Wang, Shixiang and Liu, Xuesong}, |
|
|
167 |
pages = {1627}, |
|
|
168 |
date = {2019-08-05}, |
|
|
169 |
year = {2019}, |
|
|
170 |
month = {8}, |
|
|
171 |
day = {5}, |
|
|
172 |
} |
|
|
173 |
``` |
|
|
174 |
|
|
|
175 |
Cite UCSC Xena by the following paper. |
|
|
176 |
|
|
|
177 |
``` |
|
|
178 |
Goldman, Mary, et al. "The UCSC Xena Platform for cancer genomics data |
|
|
179 |
visualization and interpretation." BioRxiv (2019): 326470. |
|
|
180 |
``` |
|
|
181 |
|
|
|
182 |
## How to contribute |
|
|
183 |
|
|
|
184 |
For anyone who wants to contribute, please follow the guideline: |
|
|
185 |
|
|
|
186 |
* Clone project from GitHub |
|
|
187 |
* Open `UCSCXenaTools.Rproj` with RStudio |
|
|
188 |
* Modify source code |
|
|
189 |
* Run `devtools::check()`, and fix all errors, warnings and notes |
|
|
190 |
* Create a pull request |
|
|
191 |
|
|
|
192 |
## Acknowledgment |
|
|
193 |
|
|
|
194 |
This package is based on [XenaR](https://github.com/mtmorgan/XenaR), thanks [Martin Morgan](https://github.com/mtmorgan) for his work. |
|
|
195 |
|
|
|
196 |
[](https://ropensci.org) |