The dataset viewer is not available for this split.
Error code: TooManyColumnsError
Need 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 Fly Cell Atlas (AFCA) - Complete Dataset
Comprehensive single-nucleus transcriptomic atlas of aging in Drosophila melanogaster covering both head and body tissues for longevity research and machine learning applications
π Dataset Overview
Original Study: Lu et al., Science 2023
Interactive Atlas: hongjielilab.org/afca
GEO Repository: GSE218661
Processing Repository: github.com/winternewt/aging-fly-cell-atlas - Complete data processing pipeline
This dataset provides the most comprehensive single-nucleus transcriptomic atlas of aging in Drosophila melanogaster, covering the entire organism across the lifespan. The Aging Fly Cell Atlas (AFCA) enables unprecedented insights into cellular aging, longevity mechanisms, and age-related disease processes.
Key Features (Complete Dataset)
- 566,273 single nuclei from both head and body tissues
- 78 distinct cell types with detailed annotations (40 head + 38 body types)
- Multiple age timepoints: 5, 30, 50, 70 days across lifespan
- Sex-stratified data: Male and female flies analyzed separately
- Rich annotations: AFCA, FCA, and broad cell type classifications
- Pre-computed embeddings: PCA, t-SNE, and UMAP coordinates for both tissues
- Quality control metrics: Comprehensive QC data for all cells
ποΈ Dataset Structure
The processed AFCA complete dataset contains optimized parquet files ready for HuggingFace:
processed/
# HEAD TISSUE
βββ aging_fly_head_expression.parquet # Head expression matrix (962MB)
βββ aging_fly_head_sample_metadata.parquet # Head cell metadata (5.6MB)
βββ aging_fly_head_feature_metadata.parquet # Gene annotations (220KB)
βββ aging_fly_head_projection_X_pca.parquet # Head PCA embeddings (258MB)
βββ aging_fly_head_projection_X_umap.parquet # Head UMAP coordinates (5.8MB)
βββ aging_fly_head_projection_X_tsne.parquet # Head t-SNE coordinates (5.8MB)
βββ aging_fly_head_unstructured_metadata.json # Head processing metadata
# BODY TISSUE
βββ aging_fly_body_expression.parquet # Body expression matrix (916MB)
βββ aging_fly_body_sample_metadata.parquet # Body cell metadata (5.5MB)
βββ aging_fly_body_feature_metadata.parquet # Gene annotations (220KB)
βββ aging_fly_body_projection_X_pca.parquet # Body PCA embeddings (85MB)
βββ aging_fly_body_projection_X_umap.parquet # Body UMAP coordinates (5.6MB)
βββ aging_fly_body_projection_X_tsne.parquet # Body t-SNE coordinates (5.6MB)
βββ aging_fly_body_unstructured_metadata.json # Body processing metadata
Data Dimensions (Complete Dataset)
- Cells: 566,273 single nuclei (289,981 head + 276,273 body)
- Genes: ~16,000 protein-coding and non-coding genes
- Cell Types: 78 distinct cell types (40 head + 38 body)
- Ages: Multiple timepoints (5, 30, 50, 70 days across lifespan)
- Sexes: Male and female flies
- Annotations: 3 levels (AFCA, FCA, and broad classifications)
- File Size: 2.2GB total (optimized parquet format)
π¬ Biological Context
Aging Phenotypes Captured
- Fat body expansion: Multinuclear cells via amitosis-like division
- Muscle sarcopenia: Loss of flight and skeletal muscle mass
- Metabolic changes: Altered lipid homeostasis and energy metabolism
- Ribosomal decline: Universal decrease in protein synthesis machinery
- Mitochondrial dysfunction: Reduced oxidative phosphorylation
Cell Type Diversity
- Neurons: Cholinergic, GABAergic, glutamatergic, monoaminergic
- Glia: Astrocytes, ensheathing, cortex, surface glia
- Specialized: Photoreceptors, Kenyon cells, peptidergic neurons
- Non-neural: Fat body, muscle, hemocytes, reproductive cells
Aging Features Quantified
- Cell composition changes - Which cell types expand/contract with age
- Differential gene expression - Age-related transcriptional changes
- Cell identity maintenance - Stability of cell type markers
- Expressed gene diversity - Changes in transcriptional complexity
π Quick Start
Loading the Dataset
from datasets import load_dataset
import pandas as pd
# Load the complete AFCA dataset from HuggingFace
dataset = load_dataset("longevity-db/aging-fly-cell-atlas")
# Access HEAD tissue data
head_expression = dataset['head_expression'].to_pandas()
head_metadata = dataset['head_sample_metadata'].to_pandas()
head_features = dataset['head_feature_metadata'].to_pandas()
head_pca = dataset['head_projection_pca'].to_pandas()
head_umap = dataset['head_projection_umap'].to_pandas()
# Access BODY tissue data
body_expression = dataset['body_expression'].to_pandas()
body_metadata = dataset['body_sample_metadata'].to_pandas()
body_features = dataset['body_feature_metadata'].to_pandas()
body_pca = dataset['body_projection_pca'].to_pandas()
body_umap = dataset['body_projection_umap'].to_pandas()
print(f"Head dataset: {head_expression.shape[0]:,} cells Γ {head_expression.shape[1]:,} genes")
print(f"Body dataset: {body_expression.shape[0]:,} cells Γ {body_expression.shape[1]:,} genes")
print(f"Total cells: {head_expression.shape[0] + body_expression.shape[0]:,}")
# Combine datasets if needed
import pandas as pd
combined_metadata = pd.concat([
head_metadata.assign(tissue='head'),
body_metadata.assign(tissue='body')
], ignore_index=True)
print(f"Cell types: {combined_metadata['afca_annotation'].nunique()}")
print(f"Ages available: {sorted(combined_metadata['age'].unique())}")
Aging Analysis Example
import numpy as np
from scipy.stats import ttest_ind
# Compare young vs old flies in head tissue
young_mask = sample_metadata['age'].isin(['5', '30'])
old_mask = sample_metadata['age'].isin(['50', '70'])
young_cells = sample_metadata[young_mask].index
old_cells = sample_metadata[old_mask].index
# Calculate differential expression
young_expr = expression.loc[young_cells].mean()
old_expr = expression.loc[old_cells].mean()
# Find age-related genes (top fold changes)
log2fc = np.log2((old_expr + 1e-9) / (young_expr + 1e-9))
top_aging_genes = log2fc.abs().nlargest(10)
print("Top age-related genes (by fold change):")
for gene, fc in top_aging_genes.items():
direction = "β" if log2fc[gene] > 0 else "β"
print(f" {gene}: {direction} {abs(fc):.2f} log2FC")
# Cell composition changes across ages
young_composition = sample_metadata[young_mask]['afca_annotation'].value_counts(normalize=True)
old_composition = sample_metadata[old_mask]['afca_annotation'].value_counts(normalize=True)
print(f"\nAge group sizes: Young={len(young_cells):,}, Old={len(old_cells):,}")
print("\nCell types with biggest age-related changes:")
composition_changes = (old_composition / young_composition).fillna(0).sort_values(ascending=False)
print(composition_changes.head(5))
Visualization
import matplotlib.pyplot as plt
import seaborn as sns
# Age-colored UMAP for head tissue
plt.figure(figsize=(12, 8))
scatter = plt.scatter(umap_coords.iloc[:, 0], umap_coords.iloc[:, 1],
c=sample_metadata['age'].astype('category').cat.codes,
cmap='viridis', s=0.5, alpha=0.6)
plt.colorbar(scatter, label='Age')
plt.title('Aging Fly Head Atlas - UMAP colored by age')
plt.xlabel('UMAP 1')
plt.ylabel('UMAP 2')
plt.show()
# Cell type composition across ages
age_composition = sample_metadata.groupby(['age', 'afca_annotation']).size().unstack(fill_value=0)
age_composition_norm = age_composition.div(age_composition.sum(axis=1), axis=0)
plt.figure(figsize=(12, 6))
age_composition_norm.plot(kind='bar', stacked=True)
plt.title('Head Cell Type Composition Changes During Aging')
plt.xlabel('Age (days)')
plt.ylabel('Proportion of cells')
plt.legend(bbox_to_anchor=(1.05, 1), loc='upper left')
plt.tight_layout()
plt.show()
# Top cell types by age
top_cell_types = sample_metadata['afca_annotation'].value_counts().head(10).index
fig, axes = plt.subplots(2, 5, figsize=(20, 8))
axes = axes.flatten()
for i, cell_type in enumerate(top_cell_types):
mask = sample_metadata['afca_annotation'] == cell_type
subset_coords = umap_coords[mask]
axes[i].scatter(umap_coords.iloc[:, 0], umap_coords.iloc[:, 1],
c='lightgray', s=0.1, alpha=0.3)
axes[i].scatter(subset_coords.iloc[:, 0], subset_coords.iloc[:, 1],
s=0.5, alpha=0.8)
axes[i].set_title(f'{cell_type} ({mask.sum():,} cells)')
axes[i].set_xticks([])
axes[i].set_yticks([])
plt.tight_layout()
plt.show()
π Key Findings & Applications
Major Discoveries
- Cell-type-specific aging rates: Different tissues age at different speeds
- Fat body multinucleation: Novel mechanism of cellular aging
- Conserved ribosomal decline: Universal aging signature across cell types
- Aging clocks: High-accuracy age prediction from single-cell transcriptomes
- Sex differences: Distinct aging patterns between male and female flies
Research Applications
- Longevity research: Identify pro-longevity targets and mechanisms
- Aging clocks: Develop biomarkers of biological aging
- Disease modeling: Understand age-related pathological processes
- Drug discovery: Screen anti-aging interventions at cellular resolution
- Comparative aging: Cross-species aging studies with mammals
Machine Learning Use Cases
- Age prediction: Train aging clocks on single-cell data
- Cell type classification: Identify cell states and transitions
- Trajectory analysis: Model aging dynamics and cellular transitions
- Biomarker discovery: Find molecular signatures of healthy aging
- Drug response prediction: Model intervention effects on aging
π οΈ Data Processing & Repository
Want to understand how this dataset was created? The complete data processing pipeline is available in our GitHub repository:
π Processing Repository: github.com/winternewt/aging-fly-cell-atlas
Key Processing Scripts:
- β
Data Retrieval:
01_data_retrieval.py
- Automated GEO download and metadata extraction - β
Data Processing:
03_data_processing.py
- H5AD to HuggingFace parquet conversion - β
Upload Script:
04_upload_to_huggingface.py
- HuggingFace dataset upload
π§ Technical Features:
- Memory-efficient processing for large datasets (~290K cells)
- Automated data retrieval from GEO with comprehensive metadata
- Quality control validation and error handling
- HuggingFace-optimized file formats (parquet)
- Comprehensive logging and progress tracking
# Reproduce this dataset from scratch
git clone https://github.com/winternewt/aging-fly-cell-atlas
cd aging-fly-cell-atlas
python3 scripts/01_data_retrieval.py # Download from GEO
python3 scripts/03_data_processing.py # Process to HF format
This transparency enables reproducibility and helps researchers understand data transformations applied to the original study data.
π Related Resources
Original Data & Tools
- AFCA Portal: hongjielilab.org/afca - Interactive data exploration
- CELLxGENE: cellxgene.cziscience.com - Online visualization
- GEO Repository: GSE218661 - Raw sequencing data
- Original Processing Code: Available on Zenodo
Companion Datasets
- Fly Cell Atlas (FCA): Young fly reference atlas
- Mouse Aging Cell Atlas: Cross-species aging comparisons
- Human Brain Aging: Comparative aging studies
π Citation
If you use this dataset in your research, please cite the original publication:
@article{lu2023aging,
title={Aging Fly Cell Atlas identifies exhaustive aging features at cellular resolution},
author={Lu, Tzu-Chiao and Brbi{\'c}, Maria and Park, Ye-Jin and Jackson, Tyler and Chen, Jiaye and Kolluru, Sai Saroja and Qi, Yanyan and Katheder, Nadja Sandra and Cai, Xiaoyu Tracy and Lee, Seungjae and others},
journal={Science},
volume={380},
number={6650},
pages={eadg0934},
year={2023},
publisher={American Association for the Advancement of Science},
doi={10.1126/science.adg0934}
}
HuggingFace Dataset Citation:
@dataset{aging_fly_cell_atlas_2024,
title={Aging Fly Cell Atlas - HuggingFace Dataset},
author={Longevity Genomics Consortium},
year={2024},
publisher={HuggingFace},
url={https://huggingface.co/datasets/longevity-gpt/aging-fly-cell-atlas}
}
π€ Contributing & Support
Getting Help
- Issues: Report bugs or request features via GitHub Issues
- Discussions: Join community discussions for usage questions
- Documentation: Complete processing pipeline in
CODE_README.md
Data Processing
This dataset was processed from the original H5AD files using an optimized pipeline:
- Quality control and filtering
- Normalization and batch correction
- Dimensionality reduction (PCA, UMAP, t-SNE, scVI)
- Cell type annotation and validation
- Age-related analysis and aging clock development
See CODE_README.md
for complete processing documentation.
π License & Usage
License: CC BY 4.0 - Free to use with attribution
Data Usage Guidelines:
- β Research and commercial use permitted
- β Modification and redistribution allowed
- β Academic and educational use encouraged
- π Attribution required: Cite original Lu et al. Science 2023 paper
Ethical Considerations:
- Animal research conducted under institutional oversight
- Data sharing approved by original authors
- No human subjects or sensitive personal information
π¬ Ready for aging research ⒠𧬠Comprehensively annotated β’ π» ML-optimized β’ π Cross-species relevant
π₯ Data Retrieval & Processing
This dataset was programmatically retrieved from GEO GSE218661 using our automated pipeline:
Automated Download
# Clone the repository
git clone https://github.com/your-repo/aging-fly-cell-atlas
cd aging-fly-cell-atlas
# Activate environment (uv project)
source .venv/bin/activate
# Run data retrieval script
python scripts/01_data_retrieval.py
What the Script Does
- Extracts GEO Metadata: Downloads comprehensive metadata for all 72 samples
- Downloads H5AD Files: Automatically finds and downloads processed h5ad files from GEO
- Processes Data: Decompresses files and extracts cell/gene statistics
- Organizes Structure: Places files in clean directory structure
- Generates Metadata: Creates detailed JSON and CSV metadata files
Retrieved Files
afca_head.h5ad
: 289,981 head cells with full annotations and embeddingsafca_body.h5ad
: 276,273 body cells with full annotations and embeddings- Metadata: Complete sample information, processing logs, and statistics
Data Quality
- β Complete Age Series: 5d, 30d, 50d, 70d timepoints
- β Sex-Stratified: Male and female samples
- β Rich Annotations: FCA and AFCA cell type annotations
- β Embeddings Included: PCA, t-SNE, and UMAP coordinates
- β Quality Metrics: Cell counts, gene counts, mitochondrial percentages
- Downloads last month
- 91