arrow-left

All pages
gitbookPowered by GitBook
1 of 1

Loading...

Accessing data through python

You can use the python API, xenaPythonarrow-up-right, to programmatically access data in the public Xena Data Hubs.

hashtag
Installation

hashtag
Usage

hashtag
Example

hashtag
Help

hashtag

hashtag
More Information

pip install 'git+https://github.com/ucscXena/xenaPython'
pip install --upgrade 'git+https://github.com/ucscXena/xenaPython'
Jupyter notebook examplearrow-up-right
https://github.com/ucscXena/xenaPythonarrow-up-right
import xenaPython as xena  
import xenaPython as xena

hub = "https://toil.xenahubs.net"
dataset = "tcga_RSEM_gene_tpm"
samples = xena.dataset_samples (hub, dataset, None)
samples = xena.dataset_samples (hub, dataset, 10)
samples = ["TCGA-02-0047-01","TCGA-02-0055-01","TCGA-02-2483-01"]
probes = ['ENSG00000282740.1', 'ENSG00000000005.5']
[position, [ENSG00000282740_1, ENSG00000000005_5]] = xena.dataset_probe_values (hub, dataset, samples, probes)
ENSG00000282740_1
[-9.9658, -2.8262, -9.9658]
import xenaPython
help(xenaPython)