The dataset viewer is not available for this split.
Error code: StreamingRowsError
Exception: CastError
Message: Couldn't cast
sample_id: large_string
tissue: large_string
subject_id: large_string
sex: int64
age: large_string
death_time: int64
estimated_age: double
A1BG: double
A1CF: double
A2M: double
A2ML1: double
A3GALT2: double
A4GALT: double
A4GNT: double
AAAS: double
AACS: double
AADAC: double
AADACL2: double
AADACL3: double
AADACL4: double
AADAT: double
AAGAB: double
AAK1: double
AAMDC: double
AAMP: double
AANAT: double
AAR2: double
AARD: double
AARS2: double
AARSD1: double
AASDH: double
AASDHPPT: double
AASS: double
AATF: double
AATK: double
ABAT: double
ABCA1: double
ABCA10: double
ABCA12: double
ABCA13: double
ABCA2: double
ABCA3: double
ABCA4: double
ABCA5: double
ABCA6: double
ABCA7: double
ABCA8: double
ABCA9: double
ABCB1: double
ABCB10: double
ABCB11: double
ABCB4: double
ABCB5: double
ABCB6: double
ABCB7: double
ABCB8: double
ABCB9: double
ABCC1: double
ABCC10: double
ABCC11: double
ABCC12: double
ABCC2: double
ABCC3: double
ABCC4: double
ABCC5: double
ABCC6: double
ABCC8: double
ABCC9: double
ABCD1: double
ABCD2: double
ABCD3: double
ABCD4: double
ABCE1: double
ABCF1: double
ABCF2: double
ABCF3: double
ABCG1: double
ABCG2: double
ABCG4: double
ABCG5: double
ABCG8: double
ABHD1: double
ABHD10: double
ABHD11: double
ABHD12: double
ABHD12B: double
ABHD13: double
ABHD14A: double
ABHD14A-ACY1: double
ABHD14B: double
ABHD15: double
ABHD16A: double
ABHD16B: double
ABHD17A: double
ABHD17B: double
ABHD17C: double
ABHD18: double
ABHD2: double
ABHD3: double
ABHD4: double
ABHD5: double
ABHD6: do
...
4B: double
ZNF805: double
ZNF808: double
ZNF81: double
ZNF813: double
ZNF814: double
ZNF816: double
ZNF816-ZNF321P: double
ZNF821: double
ZNF823: double
ZNF827: double
ZNF829: double
ZNF83: double
ZNF830: double
ZNF831: double
ZNF835: double
ZNF836: double
ZNF837: double
ZNF839: double
ZNF84: double
ZNF841: double
ZNF843: double
ZNF844: double
ZNF845: double
ZNF846: double
ZNF85: double
ZNF850: double
ZNF852: double
ZNF853: double
ZNF860: double
ZNF862: double
ZNF865: double
ZNF878: double
ZNF879: double
ZNF880: double
ZNF891: double
ZNF90: double
ZNF91: double
ZNF92: double
ZNF93: double
ZNF98: double
ZNF99: double
ZNFX1: double
ZNHIT1: double
ZNHIT2: double
ZNHIT3: double
ZNHIT6: double
ZNRF1: double
ZNRF2: double
ZNRF3: double
ZNRF4: double
ZP1: double
ZP2: double
ZP3: double
ZP4: double
ZPBP: double
ZPBP2: double
ZPLD1: double
ZPR1: double
ZRANB1: double
ZRANB2: double
ZRANB3: double
ZRSR2: double
ZSCAN1: double
ZSCAN10: double
ZSCAN12: double
ZSCAN16: double
ZSCAN18: double
ZSCAN2: double
ZSCAN20: double
ZSCAN21: double
ZSCAN22: double
ZSCAN23: double
ZSCAN25: double
ZSCAN26: double
ZSCAN29: double
ZSCAN30: double
ZSCAN31: double
ZSCAN32: double
ZSCAN4: double
ZSCAN5A: double
ZSCAN5B: double
ZSCAN9: double
ZSWIM1: double
ZSWIM2: double
ZSWIM3: double
ZSWIM4: double
ZSWIM5: double
ZSWIM6: double
ZSWIM7: double
ZSWIM8: double
ZW10: double
ZWILCH: double
ZWINT: double
ZXDA: double
ZXDB: double
ZXDC: double
ZYG11A: double
ZYG11B: double
ZYX: double
ZZEF1: double
ZZZ3: double
to
{'sample_id': Value('string'), 'tissue': Value('string'), 'subject_id': Value('string'), 'sex': Value('int64'), 'age': Value('string'), 'death_time': Value('string'), 'estimated_age': Value('float64')}
because column names don't match
Traceback: Traceback (most recent call last):
File "/src/services/worker/src/worker/utils.py", line 99, in get_rows_or_raise
return get_rows(
^^^^^^^^^
File "/src/libs/libcommon/src/libcommon/utils.py", line 272, in decorator
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/src/services/worker/src/worker/utils.py", line 77, in get_rows
rows_plus_one = list(itertools.islice(ds, rows_max_number + 1))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/src/services/worker/.venv/lib/python3.12/site-packages/datasets/iterable_dataset.py", line 2431, in __iter__
for key, example in ex_iterable:
^^^^^^^^^^^
File "/src/services/worker/.venv/lib/python3.12/site-packages/datasets/iterable_dataset.py", line 1952, in __iter__
for key, pa_table in self._iter_arrow():
^^^^^^^^^^^^^^^^^^
File "/src/services/worker/.venv/lib/python3.12/site-packages/datasets/iterable_dataset.py", line 1975, in _iter_arrow
for key, pa_table in self.ex_iterable._iter_arrow():
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/src/services/worker/.venv/lib/python3.12/site-packages/datasets/iterable_dataset.py", line 503, in _iter_arrow
for key, pa_table in iterator:
^^^^^^^^
File "/src/services/worker/.venv/lib/python3.12/site-packages/datasets/iterable_dataset.py", line 350, in _iter_arrow
for key, pa_table in self.generate_tables_fn(**gen_kwags):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/src/services/worker/.venv/lib/python3.12/site-packages/datasets/packaged_modules/parquet/parquet.py", line 106, in _generate_tables
yield f"{file_idx}_{batch_idx}", self._cast_table(pa_table)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/src/services/worker/.venv/lib/python3.12/site-packages/datasets/packaged_modules/parquet/parquet.py", line 73, in _cast_table
pa_table = table_cast(pa_table, self.info.features.arrow_schema)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/src/services/worker/.venv/lib/python3.12/site-packages/datasets/table.py", line 2272, in table_cast
return cast_table_to_schema(table, schema)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/src/services/worker/.venv/lib/python3.12/site-packages/datasets/table.py", line 2218, in cast_table_to_schema
raise CastError(
datasets.table.CastError: Couldn't cast
sample_id: large_string
tissue: large_string
subject_id: large_string
sex: int64
age: large_string
death_time: int64
estimated_age: double
A1BG: double
A1CF: double
A2M: double
A2ML1: double
A3GALT2: double
A4GALT: double
A4GNT: double
AAAS: double
AACS: double
AADAC: double
AADACL2: double
AADACL3: double
AADACL4: double
AADAT: double
AAGAB: double
AAK1: double
AAMDC: double
AAMP: double
AANAT: double
AAR2: double
AARD: double
AARS2: double
AARSD1: double
AASDH: double
AASDHPPT: double
AASS: double
AATF: double
AATK: double
ABAT: double
ABCA1: double
ABCA10: double
ABCA12: double
ABCA13: double
ABCA2: double
ABCA3: double
ABCA4: double
ABCA5: double
ABCA6: double
ABCA7: double
ABCA8: double
ABCA9: double
ABCB1: double
ABCB10: double
ABCB11: double
ABCB4: double
ABCB5: double
ABCB6: double
ABCB7: double
ABCB8: double
ABCB9: double
ABCC1: double
ABCC10: double
ABCC11: double
ABCC12: double
ABCC2: double
ABCC3: double
ABCC4: double
ABCC5: double
ABCC6: double
ABCC8: double
ABCC9: double
ABCD1: double
ABCD2: double
ABCD3: double
ABCD4: double
ABCE1: double
ABCF1: double
ABCF2: double
ABCF3: double
ABCG1: double
ABCG2: double
ABCG4: double
ABCG5: double
ABCG8: double
ABHD1: double
ABHD10: double
ABHD11: double
ABHD12: double
ABHD12B: double
ABHD13: double
ABHD14A: double
ABHD14A-ACY1: double
ABHD14B: double
ABHD15: double
ABHD16A: double
ABHD16B: double
ABHD17A: double
ABHD17B: double
ABHD17C: double
ABHD18: double
ABHD2: double
ABHD3: double
ABHD4: double
ABHD5: double
ABHD6: do
...
4B: double
ZNF805: double
ZNF808: double
ZNF81: double
ZNF813: double
ZNF814: double
ZNF816: double
ZNF816-ZNF321P: double
ZNF821: double
ZNF823: double
ZNF827: double
ZNF829: double
ZNF83: double
ZNF830: double
ZNF831: double
ZNF835: double
ZNF836: double
ZNF837: double
ZNF839: double
ZNF84: double
ZNF841: double
ZNF843: double
ZNF844: double
ZNF845: double
ZNF846: double
ZNF85: double
ZNF850: double
ZNF852: double
ZNF853: double
ZNF860: double
ZNF862: double
ZNF865: double
ZNF878: double
ZNF879: double
ZNF880: double
ZNF891: double
ZNF90: double
ZNF91: double
ZNF92: double
ZNF93: double
ZNF98: double
ZNF99: double
ZNFX1: double
ZNHIT1: double
ZNHIT2: double
ZNHIT3: double
ZNHIT6: double
ZNRF1: double
ZNRF2: double
ZNRF3: double
ZNRF4: double
ZP1: double
ZP2: double
ZP3: double
ZP4: double
ZPBP: double
ZPBP2: double
ZPLD1: double
ZPR1: double
ZRANB1: double
ZRANB2: double
ZRANB3: double
ZRSR2: double
ZSCAN1: double
ZSCAN10: double
ZSCAN12: double
ZSCAN16: double
ZSCAN18: double
ZSCAN2: double
ZSCAN20: double
ZSCAN21: double
ZSCAN22: double
ZSCAN23: double
ZSCAN25: double
ZSCAN26: double
ZSCAN29: double
ZSCAN30: double
ZSCAN31: double
ZSCAN32: double
ZSCAN4: double
ZSCAN5A: double
ZSCAN5B: double
ZSCAN9: double
ZSWIM1: double
ZSWIM2: double
ZSWIM3: double
ZSWIM4: double
ZSWIM5: double
ZSWIM6: double
ZSWIM7: double
ZSWIM8: double
ZW10: double
ZWILCH: double
ZWINT: double
ZXDA: double
ZXDB: double
ZXDC: double
ZYG11A: double
ZYG11B: double
ZYX: double
ZZEF1: double
ZZZ3: double
to
{'sample_id': Value('string'), 'tissue': Value('string'), 'subject_id': Value('string'), 'sex': Value('int64'), 'age': Value('string'), 'death_time': Value('string'), 'estimated_age': Value('float64')}
because column names don't matchNeed help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
aging-expressions: Age-Stratified Gene Expression Dataset
Dataset Description
This dataset provides age-stratified gene expression data derived from ARCHS4 and GTEx databases, specifically curated for fine-tuning BulkFormer and other bulk RNA-seq deep learning models. The dataset contains TPM-normalized expression values for protein-coding genes, enriched with comprehensive demographic metadata including precise age information.
Key Features:
- 🎯 Optimized for BulkFormer: Uses the same ~20,000 protein-coding gene subset as BulkFormer training data
- 📊 TPM Normalization: Expression values normalized using BulkFormer gene lengths for consistency
- 👥 Age-Filtered: Only samples with numeric age in years (excludes gestational age, non-numeric values)
- 🧬 Ensembl IDs: Genes identified by stable Ensembl IDs for cross-dataset compatibility
- 🔬 Rich Metadata: Age, sex, tissue, disease, and treatment information extracted from sample characteristics
This dataset enables:
- Fine-tuning BulkFormer for age prediction tasks
- Training age-related gene expression models
- Comparative analysis across tissues and demographics
- Transfer learning for bulk RNA-seq applications
Dataset Summary
Sources:
- GTEx Analysis v10 (Release v10, RNASeQCv2.4.2): 9,662 samples across 54 tissue types
- ARCHS4 v2.2+: 111,000+ age-filtered samples across 62+ tissue types (human)
Gene Selection:
- Total Genes: ~20,000 protein-coding genes (BulkFormer subset)
- Gene IDs: Ensembl gene identifiers for consistency
- Normalization: TPM using BulkFormer gene length information
- Source:
bulkformer_gene_info.csvcontaining curated protein-coding genes
Sample Characteristics:
- Age Information: Numeric age in years (filtered from ARCHS4 characteristics)
- GTEx Age Range: 20-79 years (6 age brackets: 20-29, 30-39, 40-49, 50-59, 60-69, 70-79)
- ARCHS4 Age Range: 1-122 years (actual numeric ages from sample metadata)
- Tissues: Blood, brain, liver, lung, skin, muscle, and 50+ other tissue types
- Format: Parquet files (optimized for fast loading with Polars/Pandas)
Key Features
Optimized for BulkFormer Fine-Tuning:
- Same ~20,000 protein-coding gene subset used in BulkFormer pre-training
- TPM normalization using identical gene lengths as BulkFormer
- Ensembl IDs matching BulkFormer's expected input format
- Ready for fine-tuning age prediction, tissue classification, or disease detection models
- Compatible with other bulk RNA-seq deep learning architectures
Rich Demographic Metadata:
- GTEx samples: Sample/Subject IDs, tissue type, sex (1=male, 2=female), age brackets, estimated age, death circumstances
- ARCHS4 samples: Sample IDs, numeric age in years, sex (male/female), tissue type, disease status, treatment information
- All metadata automatically extracted and validated from sample characteristics
- Age filtering ensures only samples with reliable numeric age values
TPM-Normalized Expression:
- Raw counts converted to TPM (Transcripts Per Million) for comparability
- Normalization formula: TPM = (counts / gene_length) * 1e6 / sum(counts / gene_length)
- Uses BulkFormer's curated gene lengths for consistency
- Ready for log1p transformation:
log(TPM + 1)for deep learning
Protein-Coding Gene Focus:
- Filtered to ~20,000 high-confidence protein-coding genes
- Excludes pseudogenes, lncRNAs, and other non-coding RNAs
- Gene set matches BulkFormer's training data for transfer learning
- Ensembl IDs provide stable identifiers across datasets
Quality Assurance:
- GTEx: Analysis v10 with rigorous QC from GTEx consortium
- ARCHS4: Uniformly processed using STAR alignment and Kallisto quantification
- Age validation: Excludes gestational age, age in weeks/months/days
- Memory-optimized processing with 50% reduction in RAM usage
Dataset Structure
Data Files
| File Name | Rows | Columns | Size | Description |
|---|---|---|---|---|
gtex_bulkformer_estimated_age_tpm.parquet |
9,662 | 18,255 | ~350 MB | GTEx samples with TPM-normalized gene expression |
Data Fields
Metadata Columns (7 columns)
| Column | Type | Description | Example Values |
|---|---|---|---|
sample_id |
string | GTEx sample identifier | "GTEX-QMFR-1926-SM-32PL9" |
tissue |
string | Tissue type | "Blood", "Brain", "Muscle" |
subject_id |
string | GTEx subject/donor identifier | "GTEX-QMFR" |
sex |
int64 | Biological sex (1=male, 2=female) | 1, 2 |
age |
string | Age bracket from GTEx | "20-29", "50-59", "70-79" |
death_time |
string | Hardy scale death circumstances | "Ventilator Case", "Fast death" |
estimated_age |
float64 | Midpoint of age bracket | 24.5, 54.5, 74.5 |
Gene Expression Columns (18,248 columns)
- Column Names: Gene symbols (e.g.,
TP53,BRCA1,APOE) - Data Type: float64
- Values: TPM-normalized gene expression (0 to ~1,000,000)
- Transformation: Ready for log1p transformation:
log(TPM + 1)
Data Splits
This dataset does not have predefined train/test splits. Users should create their own splits based on their research needs:
- Age-stratified splits: Ensure balanced age distribution across splits
- Tissue-stratified splits: For tissue-specific analyses
- Subject-level splits: Avoid data leakage by splitting at subject level (not sample level)
Example Record
{
"sample_id": "GTEX-QCQG-0006-SM-5SI8M",
"tissue": "Blood",
"subject_id": "GTEX-QCQG",
"sex": 2,
"age": "50-59",
"death_time": "Ventilator Case",
"estimated_age": 54.5,
"TP53": 125.34,
"BRCA1": 12.56,
"APOE": 234.78,
# ... 18,245 more genes
}
Data Processing Pipeline
This dataset is created from ARCHS4 and GTEx raw data using the aging-expressions package. The processing pipeline extracts age information, normalizes expression to TPM using BulkFormer gene lengths, and filters to protein-coding genes for optimal compatibility with deep learning models.
Source Data
ARCHS4 Data (for tissue-specific parquet files):
ARCHS4 Human Gene Expression:
human_gene_v2.latest.h5(~50GB)- 67,000+ genes × 500,000+ samples
- Raw counts from GEO/SRA uniformly processed with Kallisto
- Source: https://maayanlab.cloud/archs4/
ARCHS4 Sample Metadata: Embedded in HDF5 file
- Sample characteristics from GEO
- Contains age, sex, tissue, disease, and treatment information
- Extracted using metadata enrichment algorithms
GTEx Data (for consolidated parquet file):
GTEx Expression Data:
GTEx_Analysis_v10_RNASeQCv2.4.2_gene_tpm.gct.gz- Raw TPM values from GTEx portal
- 25,150 genes × 9,662 samples
GTEx Phenotype Data:
GTEx_Analysis_v10_Annotations_SubjectPhenotypesDS.txt- Subject-level demographic information
- Age brackets, sex, death circumstances
GTEx Sample Attributes:
GTEx_Analysis_v10_Annotations_SampleAttributesDS.txt- Sample-level tissue annotations
BulkFormer Gene Information:
- BulkFormer Gene Info:
bulkformer_gene_info.csv- ~20,000 protein-coding genes with Ensembl IDs
- Gene lengths for TPM normalization
- Source: BulkFormer model repository
Processing Steps
The complete pipeline: Download → Prepare → Upload
# 1. Download raw data
uv run download archs4 human
uv run download gtex all
uv run download bulkformer data
# 2. Prepare TPM-normalized parquet files
uv run prepare archs4 # Creates tissue-specific files
uv run prepare gtex # Creates consolidated file
# 3. Upload to HuggingFace (optional)
uv run upload
Detailed Processing Steps:
Age Filtering (ARCHS4):
- Extract age from sample characteristics (
characteristics_ch1field) - Filter to samples with numeric age in years (exclude gestational age, age in months/weeks)
- Validate age range (1-122 years, oldest verified human)
- Result: 111,000+ samples with reliable age information
- Extract age from sample characteristics (
Metadata Extraction:
- ARCHS4: Extract age, sex, tissue, disease, treatment from GEO characteristics
- GTEx: Join phenotype and sample attributes, compute estimated age from brackets
- Normalize tissue names (e.g., "whole blood" → "blood", "pbmc" variations → "pbmc")
- Encode categorical variables consistently
Gene Filtering:
- Filter to genes present in BulkFormer gene list (~20,000 protein-coding genes)
- Map gene symbols to Ensembl IDs using BulkFormer gene info
- Remove genes without valid Ensembl IDs or gene length information
- ARCHS4: 67,000 → ~20,000 genes retained
- GTEx: 25,150 → ~18,000 genes retained
TPM Normalization:
- ARCHS4: Convert raw counts to TPM using formula:
TPM = (counts / gene_length_kb) * 1e6 / sum(counts / gene_length_kb) - GTEx: Data already in TPM format, validate consistency
- Use BulkFormer gene lengths for normalization (identical to BulkFormer training)
- Memory-optimized implementation (50% RAM reduction via inline calculations)
- ARCHS4: Convert raw counts to TPM using formula:
Ensembl ID Mapping:
- Replace gene symbols with Ensembl IDs as column names
- Ensures compatibility across datasets and model versions
- Genes without Ensembl mappings are dropped with warnings
Quality Control:
- Validate sample IDs match between expression and metadata
- Check for missing values in critical columns
- Ensure data type consistency (float64 for expression, proper types for metadata)
- Tissue-level validation (minimum sample counts, unique tissue names)
Output Generation:
- Save to Parquet format using streaming mode (memory efficient)
- ARCHS4: One file per tissue (e.g.,
blood_bulkformer_age_tpm.parquet) - GTEx: Single consolidated file (
gtex_bulkformer_estimated_age_tpm.parquet) - Lazy evaluation ensures minimal memory footprint during writes
Age Bracket Mapping
| GTEx Age Range | Estimated Age | Count (approx) |
|---|---|---|
| 20-29 | 24.5 | ~500 |
| 30-39 | 34.5 | ~1,000 |
| 40-49 | 44.5 | ~1,800 |
| 50-59 | 54.5 | ~2,800 |
| 60-69 | 64.5 | ~2,500 |
| 70-79 | 74.5 | ~1,000 |
Usage
Loading the Dataset
Using Polars (Recommended)
import polars as pl
# Load the full dataset
df = pl.read_parquet("hf://datasets/longevity-genie/aging-expressions/data/gtex_bulkformer_estimated_age_tpm.parquet")
print(f"Shape: {df.shape}")
print(f"Columns: {df.columns[:10]}")
Using Pandas
import pandas as pd
# Load the full dataset
df = pd.read_parquet("hf://datasets/longevity-genie/aging-expressions/data/gtex_bulkformer_estimated_age_tpm.parquet")
print(f"Shape: {df.shape}")
print(df.head())
Using HuggingFace Datasets
from datasets import load_dataset
dataset = load_dataset("longevity-genie/aging-expressions", split="train")
df = dataset.to_pandas()
Example Analyses
1. Age-Stratified Gene Expression
import polars as pl
df = pl.read_parquet("hf://datasets/longevity-genie/aging-expressions/data/gtex_bulkformer_estimated_age_tpm.parquet")
# Analyze TP53 expression across age groups
age_analysis = df.group_by("age").agg([
pl.count().alias("n_samples"),
pl.col("TP53").mean().alias("tp53_mean"),
pl.col("TP53").std().alias("tp53_std"),
pl.col("BRCA1").mean().alias("brca1_mean"),
])
print(age_analysis.sort("age"))
2. Tissue-Specific Expression
import polars as pl
df = pl.read_parquet("hf://datasets/longevity-genie/aging-expressions/data/gtex_bulkformer_estimated_age_tpm.parquet")
# Get blood samples only
blood_samples = df.filter(pl.col("tissue") == "Blood")
# Analyze aging genes in blood
aging_genes = ["CDKN2A", "TP53", "TERT", "SIRT1", "FOXO3"]
blood_aging = blood_samples.select(["estimated_age", "sex"] + aging_genes)
print(blood_aging.describe())
3. Sex-Stratified Analysis
import polars as pl
df = pl.read_parquet("hf://datasets/longevity-genie/aging-expressions/data/gtex_bulkformer_estimated_age_tpm.parquet")
# Compare gene expression between sexes
sex_comparison = df.group_by("sex").agg([
pl.count().alias("n_samples"),
pl.col("XIST").mean().alias("xist_mean"), # X-inactivation gene
pl.col("DDX3Y").mean().alias("ddx3y_mean"), # Y chromosome gene
])
print(sex_comparison)
4. Prepare for Machine Learning
import polars as pl
import numpy as np
df = pl.read_parquet("hf://datasets/longevity-genie/aging-expressions/data/gtex_bulkformer_estimated_age_tpm.parquet")
# Separate metadata from expression
metadata_cols = ["sample_id", "tissue", "subject_id", "sex", "age", "death_time", "estimated_age"]
gene_cols = [c for c in df.columns if c not in metadata_cols]
# Log-transform expression data
df_log = df.with_columns([
(pl.col(gene).log1p().alias(gene)) for gene in gene_cols
])
# Create train/test split (stratified by age)
from sklearn.model_selection import train_test_split
train_df, test_df = train_test_split(
df_log,
test_size=0.2,
stratify=df_log["age"],
random_state=42
)
print(f"Train: {len(train_df)}, Test: {len(test_df)}")
5. Integration with BulkFormer
import polars as pl
from bulkformer import BulkFormer, extract_features
df = pl.read_parquet("hf://datasets/longevity-genie/aging-expressions/data/gtex_bulkformer_estimated_age_tpm.parquet")
# Prepare expression matrix for BulkFormer
metadata_cols = ["sample_id", "tissue", "subject_id", "sex", "age", "death_time", "estimated_age"]
gene_cols = [c for c in df.columns if c not in metadata_cols]
# Extract expression matrix
expr_df = df.select(gene_cols)
# Use BulkFormer for feature extraction or downstream tasks
# (See BulkFormer documentation for details)
Dataset Statistics
Sample Distribution
- Total Samples: 9,662
- Total Subjects: ~800 (each subject contributes multiple tissue samples)
- Sex Distribution:
- Male (sex=1): ~60%
- Female (sex=2): ~40%
Tissue Coverage
54 GTEx tissues including:
- Blood: Whole blood samples
- Brain: Multiple brain regions (cortex, cerebellum, etc.)
- Heart: Atrial and ventricular tissue
- Liver: Hepatic tissue
- Muscle: Skeletal muscle
- Adipose: Subcutaneous and visceral fat
- Skin: Sun-exposed and not sun-exposed
- And 47 more tissues
Gene Coverage
- Total Genes: 18,248 protein-coding genes
- Gene ID Type: Ensembl gene IDs (via gene symbols)
- Expression Range: 0 to ~1,000,000 TPM
- Median Genes Detected per Sample: ~15,000 (TPM > 0)
Data Source & Citation
GTEx Project
This dataset is derived from ARCHS4 and the GTEx (Genotype-Tissue Expression) Project.
ARCHS4
ARCHS4 (All RNA-seq and ChIP-seq Sample and Signature Search) provides uniformly processed gene expression data from GEO and SRA.
ARCHS4 Citation:
@article{lachmann2018massive,
title={Massive mining of publicly available RNA-seq data from human and mouse},
author={Lachmann, Alexander and Torre, Denis and Keenan, Alexandra B and Jagodnik, Kathleen M and Lee, Hoyjin J and Wang, Lily and Silverstein, Moshe C and Ma'ayan, Avi},
journal={Nature communications},
volume={9},
number={1},
pages={1366},
year={2018},
publisher={Nature Publishing Group}
}
ARCHS4 Portal: https://maayanlab.cloud/archs4/
Data Version: ARCHS4 v2.2+ (continuously updated)
GTEx
The GTEx Project is supported by the Common Fund of the Office of the Director of the National Institutes of Health, and by NCI, NHGRI, NHLBI, NIDA, NIMH, and NINDS.
GTEx Citation:
@article{gtex2020,
title={The GTEx Consortium atlas of genetic regulatory effects across human tissues},
author={GTEx Consortium},
journal={Science},
volume={369},
number={6509},
pages={1318--1330},
year={2020},
publisher={American Association for the Advancement of Science}
}
GTEx Portal: https://gtexportal.org/
Data Version: GTEx Analysis Release v10 (2022-06-06)
aging-expressions Package
This dataset was processed using the aging-expressions Python library:
GitHub: https://github.com/longevity-genie/aging-expressions
Citation:
@software{aging_expressions,
title={aging-expressions: Age-stratified gene expression analysis toolkit},
author={Longevity Genie Team},
year={2025},
url={https://github.com/longevity-genie/aging-expressions}
}
BulkFormer Model
Gene filtering and compatibility are based on the BulkFormer foundation model:
BulkFormer Citation:
@article{bulkformer2025,
title={BulkFormer: A large-scale foundation model for human bulk transcriptomes},
author={[Authors]},
journal={bioRxiv},
year={2025},
doi={10.1101/2025.06.11.659222}
}
GitHub: https://github.com/your-org/BulkFormer
License
This dataset is released under CC BY 4.0 License (Creative Commons Attribution 4.0 International).
Conditions
- ✅ Share: Copy and redistribute the material in any medium or format
- ✅ Adapt: Remix, transform, and build upon the material for any purpose
- ✅ Attribution: You must give appropriate credit to both:
- The GTEx Project (original data source)
- The aging-expressions package (data processing)
GTEx Data Use Agreement
Users of this dataset must also comply with the GTEx Data Use Certification Agreement:
- Data is for research purposes only
- Do not attempt to identify individual participants
- Acknowledge GTEx in publications
For full terms, see: https://gtexportal.org/home/dataUseAgreement
Limitations & Considerations
Age Limitations
- Age Brackets: GTEx provides age as 10-year ranges, not exact ages
- Age Range: Limited to 20-79 years (no samples < 20 or > 79)
- Estimated Age: Midpoints are used (e.g., 54.5 for "50-59"), which introduces uncertainty
Sample Considerations
- Post-mortem Tissue: All GTEx samples are from deceased donors
- Death Circumstances: Variable (recorded in
death_timecolumn) - Tissue Quality: Quality varies by death circumstances and preservation
- Multiple Samples per Subject: Same individual contributes multiple tissues (avoid subject leakage in train/test splits)
Gene Expression Limitations
- Gene Coverage: 18,248 genes (not all human genes)
- Gene Filtering: Limited to BulkFormer gene set
- TPM Normalization: Assumes gene length and library size corrections are accurate
- Batch Effects: Potential batch effects across collection sites and dates
Demographic Limitations
- Sex Only: No gender identity information
- Limited Diversity: GTEx v10 is primarily from donors of European ancestry
- No Disease Status: Donors are generally healthy (post-mortem collection)
Ethical Considerations
Privacy
- De-identified Data: All GTEx data is de-identified
- No Protected Health Information (PHI): Sample IDs are not linkable to individuals
- IRB Approved: GTEx project has IRB approval from all participating sites
Bias & Fairness
- Demographic Bias: Dataset skews toward European ancestry, male donors, and middle-aged individuals
- Tissue Availability Bias: Some tissues are underrepresented due to collection feasibility
- Research Use Only: Not suitable for clinical decision-making
Responsible Use
- Research Purposes: This data is for research only, not clinical diagnostics
- Model Validation: Models trained on this data should be validated on independent cohorts
- Transparency: Report dataset characteristics when publishing results
Updates & Maintenance
Version History
- v1.0 (2025-01): Initial release with GTEx v10 data
- 9,662 samples, 18,248 genes
- TPM-normalized expression
- Age-stratified metadata
Future Plans
- ARCHS4 Integration: Add ARCHS4 human and mouse samples
- DEE2 Metadata: Incorporate SRA metadata for cross-dataset analysis
- Tissue Subsets: Create tissue-specific subsets for faster loading
- Age Prediction Features: Add BulkFormer-derived age predictions
Contact & Support
Questions & Issues
- GitHub Issues: https://github.com/longevity-genie/aging-expressions/issues
- Discussions: https://github.com/longevity-genie/aging-expressions/discussions
Contributing
Contributions are welcome! See the GitHub repository for:
- Bug reports
- Feature requests
- Documentation improvements
- Additional analyses
Acknowledgments
This dataset was created by the Longevity Genie team as part of our mission to accelerate aging research through open data and reproducible analysis.
Special thanks to:
- GTEx Consortium for making this invaluable resource available
- BulkFormer team for the foundation model and gene annotations
- Open-source community for tools like Polars, Pandas, and HuggingFace
Last Updated: January 2025
Dataset Version: 1.0
Curator: Longevity Genie Team
- Downloads last month
- 250