sample_index int32 0 11.5k | aliquot_id stringlengths 36 36 | case_submitter_id stringlengths 12 12 | project_id stringclasses 33
values | sample_type stringclasses 7
values | values listlengths 60.7k 60.7k |
|---|---|---|---|---|---|
0 | 49e3ffbc-f75f-4f3d-99de-12c29ef69154 | TCGA-OR-A5JP | TCGA-ACC | Primary Tumor | [7.86460018157959,0.06989999860525131,44.7776985168457,1.3062000274658203,0.5665000081062317,0.36579(...TRUNCATED) |
1 | 3e28c232-4f00-446e-8e2c-13b7ce533442 | TCGA-OR-A5JL | TCGA-ACC | Primary Tumor | [16.466299057006836,0.17520000040531158,29.244600296020508,1.5121999979019165,0.2563000023365021,1.1(...TRUNCATED) |
2 | 180a84c1-99c0-4014-b42e-8e01f88980aa | TCGA-OR-A5KX | TCGA-ACC | Primary Tumor | [10.435799598693848,0.029899999499320984,46.55009841918945,1.0741000175476074,0.7799999713897705,0.6(...TRUNCATED) |
3 | ebc120e7-d75d-425a-b9af-aa0e76520642 | TCGA-OR-A5JO | TCGA-ACC | Primary Tumor | [10.193499565124512,0.4318999946117401,20.210100173950195,2.425600051879883,0.44350001215934753,3.68(...TRUNCATED) |
4 | eeda9161-2cf5-4ae2-b8ca-99bd13c053e4 | TCGA-OR-A5K6 | TCGA-ACC | Primary Tumor | [14.335000038146973,0.06300000101327896,59.43659973144531,1.7353999614715576,0.3192000091075897,1.62(...TRUNCATED) |
5 | 379e288c-fa30-460c-bb57-d3b6f09b1483 | TCGA-PA-A5YG | TCGA-ACC | Primary Tumor | [12.435700416564941,0.06159999966621399,38.05630111694336,1.0647000074386597,0.6335999965667725,1.29(...TRUNCATED) |
6 | 68b2e310-e0a0-4867-b9cf-69b43cbdabce | TCGA-OR-A5JS | TCGA-ACC | Primary Tumor | [14.09850025177002,0.03819999843835831,50.166900634765625,1.5226000547409058,0.7958999872207642,0.37(...TRUNCATED) |
7 | 207683b6-6a60-44ef-8eb2-d26ed9a7de76 | TCGA-PK-A5H9 | TCGA-ACC | Primary Tumor | [8.520099639892578,0.18170000612735748,22.140899658203125,4.220200061798096,0.4251999855041504,1.501(...TRUNCATED) |
8 | efd8ce67-122c-4502-8713-2f4dd768c33d | TCGA-OR-A5JZ | TCGA-ACC | Primary Tumor | [11.251899719238281,0.0,52.93870162963867,1.1720000505447388,0.7874000072479248,0.9057000279426575,1(...TRUNCATED) |
9 | 7d3369ab-b556-45c5-aaaf-e7cd9ac0d454 | TCGA-OU-A5PI | TCGA-ACC | Primary Tumor | [5.563899993896484,0.09679999947547913,57.897701263427734,0.7972999811172485,0.35429999232292175,0.7(...TRUNCATED) |
TCGA Gene Expression Quantification — Open Access
Cohort-wide gene expression matrices for the open-access TCGA RNA-Seq data distributed by the NCI Genomic Data Commons. GDC serves these measurements one file per aliquot; here they are arranged as one row per sample, with each quantification carried as its own matrix over identical axes.
- GDC data release: Data Release 46.0 - August 10, 2026
- Built: 2026-09-12 03:16:09 UTC
- Shape: 11,505 samples x 60,660 genes
- Projects: 33
Other modalities for the same cases — clinical, survival, mutation, methylation, copy number — are published per project as tcga-<project>-tabular-open, where this expression data also appears, in its gene_expression_quantification config, as one row per (aliquot, gene).
Structure
A value config holds one row per sample, and each row's values list runs in the order given by genes. Both axes have their own config:
| config | rows | what a row is |
|---|---|---|
genes |
60,660 | one gene from GDC's GENCODE v36 model, in array order |
samples |
11,505 | one aliquot, in row order |
Each quantification forms a separate config, named for the column it occupies in the source TSV, so an analysis retrieves only the measure it uses. The value configs repeat sample_index, aliquot_id, case_submitter_id, project_id and sample_type inline, which removes the axis join from a training loop.
| config | dtype | size |
|---|---|---|
unstranded |
int32 |
755 MB |
stranded_first |
int32 |
734 MB |
stranded_second |
int32 |
741 MB |
tpm_unstranded |
float32 |
1,554 MB |
fpkm_unstranded |
float32 |
1,326 MB |
fpkm_uq_unstranded |
float32 |
1,349 MB |
Usage
from datasets import load_dataset
REPO = "gabrielaltay/tcga-gene-expression-quantification-open"
ds = load_dataset(REPO, "tpm_unstranded", split="train")
Each row's values is a list of 60,660 floats in genes order. The samples and genes configs are returned in matrix order, so they serve directly as an AnnData's obs and var:
import anndata as ad
import numpy as np
obs = load_dataset(REPO, "samples", split="train").to_pandas().set_index("aliquot_id")
var = load_dataset(REPO, "genes", split="train").to_pandas().set_index("gene_id")
X = np.stack(ds.with_format("numpy")["values"]) # (11,505, 60,660) float32
adata = ad.AnnData(X=X, obs=obs, var=var)
Notes on the data
The examples below continue from the adata assembled above.
Carried and computed. Three columns are computed here; everything else is GDC's. sample_index and gene_index number the rows so the two axes can be addressed by position, and strand_balance is defined under Strandedness below.
Everything else is carried through as GDC records it: the quantification values, the GENCODE v36 gene model, the identifiers, sample_type, and the four read tallies. The values are stored as int32 for the counts and float32 for the normalized measures — narrower than the source TSV's text, and wide enough for every digit GDC prints.
Gene coverage. All 60,660 GENCODE v36 features are retained; no expression threshold or biotype filter is applied. gene_type on genes supports restriction by biotype where an analysis calls for it.
adata[:, adata.var.gene_type == "protein_coding"]
Strandedness. Three count columns are published — unstranded, stranded_first and stranded_second. GDC resolves the choice between them at the pipeline level:
To facilitate harmonization across samples, all RNA-Seq reads are treated as unstranded during analyses.
— mRNA Analysis Pipeline, Introduction
The normalized quantifications therefore exist only in *_unstranded form. All three count columns are published as GDC distributes them, and samples.strand_balance — stranded_first / (stranded_first + stranded_second) over the library — is provided for anyone wishing to examine the underlying protocol.
adata[adata.obs.strand_balance.between(0.4, 0.6)] # libraries that are not strand-specific
Repeated sampling. A case may contribute more than one aliquot, so samples are not independent within a patient. case_submitter_id appears on every value config.
adata.obs.case_submitter_id.value_counts().gt(1).sum() # cases contributing more than one
Sample types. Primary tumours, solid tissue normals, metastatic and recurrent samples are all present, distinguished by sample_type (Sample Type codes).
adata.obs.sample_type.value_counts()
Library composition. Each sample carries STAR's four unassigned-read tallies — n_unmapped, n_multimapping, n_nofeature, n_ambiguous — which together with the gene counts account for every read in the library. The proportion assigned to genes varies from roughly 25% to 81% across the cohort and covaries with project.
The proportion is computed from a count column. TPM and FPKM are normalized per library — tpm_unstranded sums to 1e6 for every sample — so they cannot express it.
counts = load_dataset(REPO, "unstranded", split="train").with_format("numpy")
assigned = np.stack(counts["values"]).sum(axis=1)
unassigned = adata.obs[["n_unmapped", "n_multimapping", "n_nofeature", "n_ambiguous"]].sum(axis=1)
fraction = assigned / (assigned + unassigned.to_numpy())
GDC references
- mRNA analysis pipeline (STAR counts, TPM / FPKM / FPKM-UQ, GENCODE v36)
- Sample Type codes
- TCGA Barcode reference
- Data dictionary (every entity + field definition)
License & redistribution
Per the NCI GDC Data Analysis Policy:
The GDC itself places no restrictions (other than attempts at reidentification) on analysis or publication of open access data provided through the GDC Data Portal.
Per the NCI TCGA citation page:
Moratoria on all cancer types are now lifted and all TCGA data are available without restrictions on their use in publications or presentations.
Per the GDC Data Access Processes and Tools page:
Open access data generally includes high level genomic data that is not individually identifiable, as well as most clinical and all biospecimen data elements.
Restrictions on use
Users of any data provided by GDC, whether open or controlled access, agree not to attempt to reidentify any individual participant in any study represented by GDC data, for any purpose whatever. (source)
Required acknowledgement
If you publish or present results derived from this dataset, include the NCI-required TCGA acknowledgement:
The results here are in whole or part based upon data generated by the TCGA Research Network: https://www.cancer.gov/tcga.
Suggested citations:
- Grossman, R. L., et al. (2016). Toward a Shared Vision for Cancer Genomic Data. NEJM, 375(12), 1109-1112.
- The Cancer Genome Atlas Research Network. https://www.cancer.gov/tcga
- NCI Genomic Data Commons. https://gdc.cancer.gov
Policy references: GDC Policies, GDC Encyclopedia — Controlled Access (defines what is not in this dataset), NIH Genomic Data Sharing Policy.
Disclaimer
This project is not affiliated with the NCI, GDC, or the TCGA Research Network. It is an experimental open-source pipeline that may change significantly between versions. Pipeline source: galtay/tcga2hf.
- Downloads last month
- 74