Coverage Status GitHub issues Closed issues

UCSCXenaTools is an R package for downloading and exploring data from UCSC Xena data hubs, 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.

Installation

Install stable release from CRAN with:

install.packages("UCSCXenaTools")

You can also install devel version of UCSCXenaTools from github with:

# install.packages("remotes")
remotes::install_github("ShixiangWang/UCSCXenaTools", build_vignettes = TRUE)

Data Hub List

All datasets are available at https://xenabrowser.net/datapages/.

Currently, UCSCXenaTools supports 10 data hubs of UCSC Xena.

If the url of data hub changed or new data hub online, please remind me by emailing to or opening an issue on GitHub.

Usage

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.

To show the basic usage of UCSCXenaTools, we download clinical data of LUNG, LUAD, LUSC from TCGA (hg19 version) data hub.

XenaData data.frame

Begin from version 0.2.0, 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.

You can load XenaData after loading UCSCXenaTools into R.

Browse datasets

Create two XenaHub objects:

  • to_browse - a XenaHub object contains a cohort and a dataset.
  • to_browse2 - a XenaHub object contains 2 cohorts and 2 datasets.

XenaBrowse() function can be used to browse dataset/cohort links using your default web browser. At default, this function limit one dataset/cohort for preventing user to open too many links at once.

# This will open you web browser
XenaBrowse(to_browse)

XenaBrowse(to_browse, type = "cohort")

When you make sure you want to open multiple links, you can set multiple option to TRUE.

XenaBrowse(to_browse2, multiple = TRUE)
XenaBrowse(to_browse2, type = "cohort", multiple = TRUE)

Documentation

More features and usages please read online documentation on CRAN or Github website.

APIs

API functions can be used to query specified data (e.g. expression of a few genes for a few samples) or information instead of downloading the entire dataset.

If you want to use APIs provided by UCSCXenaTools to access Xena Hubs, please read this vignette.

Citation

Wang, Shixiang, et al. "The predictive power of tumor mutational burden 
    in lung cancer immunotherapy response is influenced by patients' sex." 
    International journal of cancer (2019).

Acknowledgement

This package is based on XenaR, thanks Martin Morgan for his work.

LICENSE

GPL-3

Please note, code from XenaR package under Apache 2.0 license.

Code of conduct

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.