Usage Release Development
Licence CRAN Travis
minimal R version cran-checks AppVeyor
rOpenSci Codecov
downloads DOI [![Closed issues](https://img.shields.io/github/issues-closed/ropensci/UCSCXenaTools.svg)](https://github.com/ropensci/UCSCXenaTools/issues?q=is%3Aissue+is%3Aclosed)
month-downloads JOSS Project Status: Active – The project has reached a stable, usable state and is being actively developed.


UCSCXenaTools is an R package for accessing genomics data from UCSC Xena platform, from cancer multi-omics to single-cell RNA-seq. Public omics data from UCSC Xena are supported through multiple turn-key Xena 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.

Who is the target audience and what are scientific applications of this package?

  • Target Audience: cancer and clinical researchers, bioinformaticians
  • Applications: genomic and clinical analyses

Installation

Install stable release from CRAN with:

install.packages("UCSCXenaTools")

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

If you want to build vignette in local, please add two options:

remotes::install_github("ropensci/UCSCXenaTools", build_vignettes = TRUE, dependencies = TRUE)

Data Hub List

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

Currently, UCSCXenaTools supports 10 data hubs of UCSC Xena.

If any url of data hub is changed or a new data hub is online, please remind me by emailing to [email protected] or opening an issue on GitHub.

Basic 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 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.

XenaData data.frame

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.

library(UCSCXenaTools)
#> =========================================================================================
#> UCSCXenaTools version 1.2.6
#> Project URL: https://github.com/ropensci/UCSCXenaTools
#> Usages: https://cran.r-project.org/web/packages/UCSCXenaTools/vignettes/USCSXenaTools.html
#> 
#> If you use it in published research, please cite:
#> Wang et al., (2019). The UCSCXenaTools R package: a toolkit for accessing genomics data
#>   from UCSC Xena platform, from cancer multi-omics to single-cell RNA-seq.
#>   Journal of Open Source Software, 4(40), 1627, https://doi.org/10.21105/joss.01627
#> =========================================================================================
#>                               -- Enjoy it--
data(XenaData)

head(XenaData)
#> # A tibble: 6 x 17
#>   XenaHosts XenaHostNames XenaCohorts XenaDatasets SampleCount DataSubtype
#>   <chr>     <chr>         <chr>       <chr>        <chr>       <chr>      
#> 1 https://… publicHub     Acute lymp… mullighan20… 30          copy number
#> 2 https://… publicHub     Acute lymp… mullighan20… 159         phenotype  
#> 3 https://… publicHub     Acute lymp… mullighan20… 129         copy number
#> 4 https://… publicHub     Breast Can… Caldas2007/… 242         phenotype  
#> 5 https://… publicHub     Breast Can… Caldas2007/… 220         copy number
#> 6 https://… publicHub     Breast Can… Caldas2007/… 135         gene expre…
#> # … with 11 more variables: Label <chr>, Type <chr>,
#> #   AnatomicalOrigin <chr>, SampleType <chr>, Tags <chr>, ProbeMap <chr>,
#> #   LongTitle <chr>, Citation <chr>, Version <chr>, Unit <chr>,
#> #   Platform <chr>

How to contribute

For anyone who wants to contribute, please follow the guideline:

  • Clone project from GitHub
  • Open UCSCXenaTools.Rproj with RStudio
  • Modify source code
  • Run devtools::check(), and fix all errors, warnings and notes
  • Create a pull request

Acknowledgment

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

ropensci_footer