Dataset Viewer
The dataset viewer is not available for this split.
The number of columns (36406) exceeds the maximum supported number of columns (1000). This is a current limitation of the datasets viewer. You can reduce the number of columns if you want the viewer to work.
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.

Human Optic Nerve Fibroblasts (snRNA-seq) Dataset

1. Data Overview

This dataset comprises single-nucleus RNA sequencing (snRNA-seq) data specifically focusing on fibroblasts from the human optic nerve and optic nerve head. It represents a valuable resource for investigating cell-type specific gene expression profiles within a critical ocular tissue.

The data was sourced from the CZ CELLxGENE Discover API, providing access to a deeply characterized single-cell atlas. It has been processed and converted into standardized .h5ad and .parquet formats for ease of use in machine learning and bioinformatics pipelines, enabling high-resolution insights into tissue biology.

Relevance to Aging Research

The human optic nerve and optic nerve head are highly susceptible to age-related degeneration, playing a critical role in conditions like glaucoma, a leading cause of irreversible blindness, which is strongly associated with aging. Fibroblasts, as structural and supportive cells, are crucial for maintaining the extracellular matrix and contributing to tissue integrity and repair in the optic nerve.

Age-related changes in fibroblast function, extracellular matrix remodeling, and gene expression are known to contribute to tissue stiffening, inflammation, and cellular senescence, all of which are hallmarks of aging. By providing a single-cell resolution view of these specific cells, this dataset offers an unprecedented opportunity to:

  • Identify age-specific molecular signatures within optic nerve fibroblasts.
  • Uncover how cellular processes like matrix production, inflammation, and stress response change with age at the single-cell level.
  • Discover biomarkers or therapeutic targets related to age-associated optic neuropathies.
  • Investigate the contribution of fibroblast aging to the overall aging process of the visual system.

This dataset thus serves as a powerful resource for understanding the intricate molecular mechanisms of aging within a vital human tissue.

2. Source

The original data for this processed dataset originates from a single-nucleus RNA sequencing study of the human optic nerve.

Organism: Homo sapiens (Human) Tissue: Optic nerve, Optic nerve head, Optic disc, Cranial nerve II Cell Type: Fibroblasts Technology: 10x Genomics 3' v3 snRNA-seq Condition: Normal Number of Cells: 118,925 Original AnnData File Used: f5b09167-e4b5-4f32-b7b4-f0b7c402a4c4.h5ad (downloaded from CELLxGENE Discover)

3. Transformations

The data has undergone the following transformations using the provided Python script:

  1. AnnData Loading: The original .h5ad file was loaded into an AnnData object, a standard format for single-cell data.
  2. Expression Data Extraction and Conversion: The adata.X matrix (raw or normalized gene expression data) was extracted and converted into a dense Pandas DataFrame, then saved as expression.parquet. This step handles both sparse and dense matrix formats.
  3. Feature Metadata Extraction and Conversion: The adata.var DataFrame (containing metadata about each gene/feature) was extracted and saved as feature_metadata.parquet.
  4. Observation Metadata Extraction and Conversion: The adata.obs DataFrame (containing metadata about each cell/observation, such as cell type annotations or sample information) was extracted and saved as observation_metadata.parquet. This is crucial for downstream machine learning tasks involving cell annotation or phenotypic analysis.
  5. Principal Component Analysis (PCA):
    • The expression data was optionally scaled (standardized to have a mean of 0 and a standard deviation of 1) to ensure that features with larger values do not dominate the PCA.
    • PCA was performed to reduce the dimensionality of the expression data, projecting it into a lower-dimensional space while retaining most of the variance. The number of principal components generated is configurable (defaulting to 50 in the script).
    • The transformed PCA components were saved as pca_components.parquet.
    • The explained variance ratio for each principal component was also saved as pca_explained_variance.parquet, indicating how much variance each component captures.

4. Contents

The processing script generates an output directory named snRNA-seq_of_human_optic_nerve_and_optic_nerve_head_endothelial_cells_ml_data (or your configured OUTPUT_DIR_NAME), containing the following Parquet files:

  • expression.parquet: Contains the gene expression matrix. Each row represents a cell (observation), and each column represents a gene (feature). This is the primary input for most downstream analyses.
  • feature_metadata.parquet: Contains metadata about each gene, such as gene symbols, Ensembl IDs, and other relevant annotations.
  • observation_metadata.parquet: Contains comprehensive metadata for each cell, including (but not limited to) inferred cell types, sample origin, patient information, and experimental conditions. This is often used for labeling and grouping cells in ML tasks.
  • pca_components.parquet: Contains the data after dimensionality reduction using PCA. Each row corresponds to a cell, and columns represent the principal components (e.g., PC1, PC2, ..., PC50). This reduced-dimension representation is ideal for visualization, clustering, and as input for other machine learning models.
  • pca_explained_variance.parquet: A table showing the proportion of variance explained by each principal component. Useful for determining the optimal number of components to retain and understanding the information captured by the PCA.

5. Usage

This dataset is ideal for a variety of research and machine learning tasks, including:

Single-Cell Analysis

Exploring cellular heterogeneity, identifying novel cell states, and characterizing gene expression patterns in the optic nerve's fibroblasts.

Aging Research

Investigating age-related changes in fibroblast gene expression and function within the optic nerve, identifying biomarkers or therapeutic targets for age-related ocular diseases.

Machine Learning

  • Clustering: Applying clustering algorithms (e.g., K-Means, Louvain) on pca_components.parquet to identify distinct cell populations.
  • Classification: Building models to classify cell types or disease states using pca_components.parquet as features and observation_metadata.parquet for labels.
  • Dimensionality Reduction & Visualization: Using the PCA components for generating 2D or 3D plots (e.g., with UMAP or t-SNE) to visualize cell relationships.
  • Feature Selection: Identifying key genes or principal components relevant to specific biological questions.

Biomarker Discovery

Pinpointing genes or pathways implicated in optic nerve health and age-related visual impairment.

Direct Download and Loading from Hugging Face Hub

This dataset is hosted on the Hugging Face Hub, allowing for easy programmatic download and loading of its component Parquet files.

import pandas as pd
from huggingface_hub import hf_hub_download
import os

# Define the Hugging Face repository ID and the local directory for downloads
HF_REPO_ID = "longevity-db/snRNA-seq_of_human_optic_nerve_and_optic_nerve_head_endothelial_cells_ml_data"
LOCAL_DATA_DIR = "downloaded_optic_nerve_data" # Suggest a distinct name

os.makedirs(LOCAL_DATA_DIR, exist_ok=True)
print(f"Created local download directory: {LOCAL_DATA_DIR}")

# List of Parquet files to download
parquet_files = [
    "expression.parquet",
    "pca_components.parquet",
    "observation_metadata.parquet",
    "feature_metadata.parquet",
    "pca_explained_variance.parquet"
]

# Download each file
downloaded_paths = {}
for file_name in parquet_files:
    path = hf_hub_download(repo_id=HF_REPO_ID, filename=file_name, local_dir=LOCAL_DATA_DIR)
    downloaded_paths[file_name] = path
    print(f"Downloaded {file_name} to: {path}")

# Load core data for model training using the downloaded paths
df_expression = pd.read_parquet(downloaded_paths["expression.parquet"])
df_pca_components = pd.read_parquet(downloaded_paths["pca_components.parquet"])
df_obs_metadata = pd.read_parquet(downloaded_paths["observation_metadata.parquet"])
df_feature_metadata = pd.read_parquet(downloaded_paths["feature_metadata.parquet"])
df_pca_explained_variance = pd.read_parquet(downloaded_paths["pca_explained_variance.parquet"])


print("\n--- Data Loaded from Hugging Face Hub ---")
print("Expression data shape:", df_expression.shape)
print("PCA components shape:", df_pca_components.shape)
print("Observation metadata shape:", df_obs_metadata.shape)
print("Feature metadata shape:", df_feature_metadata.shape)
print("PCA explained variance shape:", df_pca_explained_variance.shape)


# Example: Prepare data for an age prediction model
# Ensure 'age' column exists in df_obs_metadata for this example.
# (Note: You might need to inspect 'df_obs_metadata.columns' to find the actual age column name,
# as it might be 'age_group', 'Age', etc., depending on the original dataset annotations.)
if 'age' in df_obs_metadata.columns: # Replace 'age' with the actual column name if different
    X = df_pca_components # Features for the model
    y = df_obs_metadata['age'] # Target variable (e.g., age of cell's donor)
    print(f"Prepared X (features) with shape {X.shape} and y (labels) with shape {y.shape}")
else:
    print("\nNo 'age' column explicitly named 'age' found in observation metadata for age prediction example.")
    print("Please inspect 'df_obs_metadata.columns' to find the relevant age-related column (e.g., 'Age', 'age_group').")


# This data can then be split into train/test sets and used to train a model.
# The resulting model can then be documented using a Hugging Face Model Card.

Creating a Model Card

The structured Parquet files in this dataset are perfectly suited for generating comprehensive Hugging Face Model Cards for models trained using this data. The various components provide crucial information for different sections of a model card:

  • Data Overview: Information directly from this README (sections 1 and 2), describing the dataset's origin, scope, and relevance.
  • Usage Examples: The provided Python code for loading the data demonstrates how a model might consume expression.parquet or pca_components.parquet (as input features) and observation_metadata.parquet (for labels like 'age' or 'cell_type').
  • Limitations and Bias: observation_metadata.parquet can be analyzed to understand the demographics (e.g., age distribution, sex, ethnicity if available) of the original donors, helping to identify potential biases or limitations in the dataset's representativeness.
  • Dataset Transformations: Details from section 3 of this README, explaining how the data was preprocessed before model training.
  • Metrics and Evaluation Data: If a model is trained, pca_components.parquet and observation_metadata.parquet can be used as inputs for evaluation metrics, and their distributions can be visualized as part of the model card's evaluation section.
  • Environmental Impact: Details on the computational resources (e.g., CPU/GPU hours) used for data processing or model training, which can be part of a model card.

6. Citation

Please ensure you cite the original source of the data from CELLxGENE Discover. The specific publication for this dataset (GSE67547) can be found on its NCBI GEO page:

NCBI GEO Accession: GSE67547

When using the cellxgene_census API, you may also consider citing the Census project: CELLxGENE Census

7. Contributions

This dataset was processed and prepared by:

  • Venkatachalam
  • Pooja
  • Albert

Curated on June 15, 2025.

Hugging Face Repository: https://huggingface.co/datasets/longevity-db/snRNA-seq_of_human_optic_nerve_and_optic_nerve_head_endothelial_cells_ml_data

Downloads last month
73