Commit
·
0d6c384
1
Parent(s):
7dac9a7
update
Browse files
README.md
CHANGED
@@ -7,7 +7,7 @@ license: cc-by-4.0 # Or the specific license provided by the Muscle Ageing Cell
|
|
7 |
multilinguality: monolingual
|
8 |
pretty_name: Mouse Skeletal Muscle Aging Atlas (sn/scRNA-seq)
|
9 |
size_categories:
|
10 |
-
-
|
11 |
source_datasets:
|
12 |
- original
|
13 |
tags:
|
@@ -43,11 +43,11 @@ Skeletal muscle undergoes significant functional and structural decline with age
|
|
43 |
This dataset offers an unprecedented opportunity to:
|
44 |
* Identify **age-specific molecular signatures** within various skeletal muscle cell types (e.g., muscle stem cells, fibroblasts, immune cells).
|
45 |
* Uncover how cellular processes like muscle regeneration, metabolism, inflammation, and cellular senescence change with age at the single-cell level.
|
46 |
-
* Discover **biomarkers** or **therapeutic targets**
|
47 |
* Investigate the contribution of different cell types to the overall aging process of skeletal muscle and their interplay.
|
48 |
* Analyze shifts in cellular composition within the muscle tissue with advancing age.
|
49 |
|
50 |
-
This dataset
|
51 |
|
52 |
---
|
53 |
|
@@ -113,30 +113,29 @@ Explore cellular heterogeneity, identify novel cell states, and characterize gen
|
|
113 |
* Discover biomarkers or therapeutic targets for sarcopenia and other age-related muscle pathologies.
|
114 |
|
115 |
### Machine Learning
|
116 |
-
* **Clustering:** Apply clustering algorithms (e.g., K-Means,
|
117 |
* **Classification:** Build models to classify cell types, age groups (e.g., young vs. old mice), or other relevant phenotypes using `pca_embeddings.parquet` or `umap_embeddings.parquet` as features. `cell_metadata.parquet` provides the necessary labels.
|
118 |
* **Regression:** Predict the biological age of a cell or donor based on gene expression or derived features.
|
119 |
* **Dimensionality Reduction & Visualization:** Use the PCA and UMAP embeddings for generating 2D or 3D plots to visualize complex cell relationships and age-related trends.
|
120 |
* **Feature Selection:** Identify key genes or principal components relevant to muscle aging processes.
|
121 |
|
122 |
-
###
|
123 |
This dataset is hosted on the Hugging Face Hub, allowing for easy programmatic download and loading of its component files.
|
124 |
|
125 |
```python
|
126 |
import pandas as pd
|
127 |
from huggingface_hub import hf_hub_download
|
128 |
import os
|
129 |
-
import anndata as ad # Needed if you download the .h5ad file
|
130 |
|
131 |
# Define the Hugging Face repository ID and the local directory for downloads
|
132 |
-
HF_REPO_ID = "longevity-db/
|
133 |
LOCAL_DATA_DIR = "downloaded_mouse_muscle_data"
|
134 |
|
135 |
os.makedirs(LOCAL_DATA_DIR, exist_ok=True)
|
136 |
print(f"Created local download directory: {LOCAL_DATA_DIR}")
|
137 |
|
138 |
-
# List of files to download
|
139 |
-
|
140 |
"expression.parquet",
|
141 |
"gene_metadata.parquet",
|
142 |
"cell_metadata.parquet",
|
@@ -144,27 +143,29 @@ data_files = [
|
|
144 |
"pca_explained_variance.parquet",
|
145 |
"umap_embeddings.parquet",
|
146 |
"highly_variable_gene_metadata.parquet",
|
147 |
-
"gene_statistics.parquet"
|
148 |
-
# Add the original .h5ad if you upload it
|
149 |
-
# "SKM_mouse_pp_cells2nuclei_2022-03-30.h5ad",
|
150 |
]
|
151 |
|
152 |
# Download each file
|
153 |
downloaded_paths = {}
|
154 |
-
for file_name in
|
155 |
try:
|
156 |
path = hf_hub_download(repo_id=HF_REPO_ID, filename=file_name, local_dir=LOCAL_DATA_DIR)
|
157 |
downloaded_paths[file_name] = path
|
158 |
print(f"Downloaded {file_name} to: {path}")
|
159 |
except Exception as e:
|
160 |
-
print(f"Warning: Could not download {file_name}. It might not be in the repository. Error: {e}")
|
161 |
|
162 |
-
# Load
|
163 |
df_expression = pd.read_parquet(downloaded_paths["expression.parquet"])
|
164 |
df_pca_embeddings = pd.read_parquet(downloaded_paths["pca_embeddings.parquet"])
|
165 |
df_umap_embeddings = pd.read_parquet(downloaded_paths["umap_embeddings.parquet"])
|
166 |
df_cell_metadata = pd.read_parquet(downloaded_paths["cell_metadata.parquet"])
|
167 |
df_gene_metadata = pd.read_parquet(downloaded_paths["gene_metadata.parquet"])
|
|
|
|
|
|
|
|
|
168 |
|
169 |
print("\n--- Data Loaded from Hugging Face Hub ---")
|
170 |
print("Expression data shape:", df_expression.shape)
|
@@ -172,11 +173,14 @@ print("PCA embeddings shape:", df_pca_embeddings.shape)
|
|
172 |
print("UMAP embeddings shape:", df_umap_embeddings.shape)
|
173 |
print("Cell metadata shape:", df_cell_metadata.shape)
|
174 |
print("Gene metadata shape:", df_gene_metadata.shape)
|
|
|
|
|
|
|
175 |
|
176 |
|
177 |
# Example: Prepare data for an age prediction model
|
178 |
# IMPORTANT: You need to inspect `df_cell_metadata.columns` to find the actual age and cell type columns.
|
179 |
-
print("\nAvailable columns in cell_metadata.parquet:")
|
180 |
print(df_cell_metadata.columns.tolist())
|
181 |
|
182 |
# --- USER ACTION REQUIRED ---
|
@@ -194,7 +198,7 @@ if age_column_name in df_cell_metadata.columns:
|
|
194 |
y_labels_age_prediction = df_cell_metadata[age_column_name]
|
195 |
print(f"\nPrepared X (features) for age prediction with shape {X_features_age_prediction.shape} and y (labels) with shape {y_labels_age_prediction.shape}")
|
196 |
else:
|
197 |
-
print(f"\nWarning: Column '{age_column_name}' not found in cell metadata for age prediction example.")
|
198 |
|
199 |
# Example: Using cell type for a classification task
|
200 |
if cell_type_column_name in df_cell_metadata.columns:
|
@@ -202,7 +206,7 @@ if cell_type_column_name in df_cell_metadata.columns:
|
|
202 |
y_labels_cell_type = df_cell_metadata[cell_type_column_name]
|
203 |
print(f"Prepared X (features) for cell type classification with shape {X_features_cell_type.shape} and y (labels) with shape {y_labels_cell_type.shape}")
|
204 |
else:
|
205 |
-
print(f"Warning: Column '{cell_type_column_name}' not found in cell metadata for cell type classification example.")
|
206 |
|
207 |
# This data can then be split into train/test sets and used to train various ML models.
|
208 |
```
|
@@ -214,6 +218,8 @@ Please ensure you cite the original source of the Mouse Muscle Ageing Cell Atlas
|
|
214 |
**Mouse Muscle Ageing Cell Atlas Official Website:**
|
215 |
[https://www.muscleageingcellatlas.org/mouse-pp/](https://www.muscleageingcellatlas.org/mouse-pp/)
|
216 |
|
|
|
|
|
217 |
## Contributions
|
218 |
|
219 |
This dataset was processed and prepared by:
|
@@ -224,4 +230,4 @@ This dataset was processed and prepared by:
|
|
224 |
|
225 |
*Curated on June 15, 2025.*
|
226 |
|
227 |
-
**Hugging Face Repository:** [https://huggingface.co/datasets/longevity-db/
|
|
|
7 |
multilinguality: monolingual
|
8 |
pretty_name: Mouse Skeletal Muscle Aging Atlas (sn/scRNA-seq)
|
9 |
size_categories:
|
10 |
+
- 10K<n<100K # Based on ~96K cells, this category fits
|
11 |
source_datasets:
|
12 |
- original
|
13 |
tags:
|
|
|
43 |
This dataset offers an unprecedented opportunity to:
|
44 |
* Identify **age-specific molecular signatures** within various skeletal muscle cell types (e.g., muscle stem cells, fibroblasts, immune cells).
|
45 |
* Uncover how cellular processes like muscle regeneration, metabolism, inflammation, and cellular senescence change with age at the single-cell level.
|
46 |
+
* Discover **biomarkers** or **therapeutic targets** related to age-associated muscle decline.
|
47 |
* Investigate the contribution of different cell types to the overall aging process of skeletal muscle and their interplay.
|
48 |
* Analyze shifts in cellular composition within the muscle tissue with advancing age.
|
49 |
|
50 |
+
This dataset thus serves as a powerful resource for understanding the intricate molecular mechanisms of aging within a vital mammalian tissue, with direct implications for longevity and healthspan research.
|
51 |
|
52 |
---
|
53 |
|
|
|
113 |
* Discover biomarkers or therapeutic targets for sarcopenia and other age-related muscle pathologies.
|
114 |
|
115 |
### Machine Learning
|
116 |
+
* **Clustering:** Apply clustering algorithms (e.g., K-Means, Louvain) on `pca_embeddings.parquet` or `umap_embeddings.parquet` to identify distinct cell populations or sub-populations.
|
117 |
* **Classification:** Build models to classify cell types, age groups (e.g., young vs. old mice), or other relevant phenotypes using `pca_embeddings.parquet` or `umap_embeddings.parquet` as features. `cell_metadata.parquet` provides the necessary labels.
|
118 |
* **Regression:** Predict the biological age of a cell or donor based on gene expression or derived features.
|
119 |
* **Dimensionality Reduction & Visualization:** Use the PCA and UMAP embeddings for generating 2D or 3D plots to visualize complex cell relationships and age-related trends.
|
120 |
* **Feature Selection:** Identify key genes or principal components relevant to muscle aging processes.
|
121 |
|
122 |
+
### Direct Download and Loading from Hugging Face Hub
|
123 |
This dataset is hosted on the Hugging Face Hub, allowing for easy programmatic download and loading of its component files.
|
124 |
|
125 |
```python
|
126 |
import pandas as pd
|
127 |
from huggingface_hub import hf_hub_download
|
128 |
import os
|
|
|
129 |
|
130 |
# Define the Hugging Face repository ID and the local directory for downloads
|
131 |
+
HF_REPO_ID = "longevity-db/mouse-muscle-aging-atlas-snRNAseq"
|
132 |
LOCAL_DATA_DIR = "downloaded_mouse_muscle_data"
|
133 |
|
134 |
os.makedirs(LOCAL_DATA_DIR, exist_ok=True)
|
135 |
print(f"Created local download directory: {LOCAL_DATA_DIR}")
|
136 |
|
137 |
+
# List of Parquet files to download (matching ONLY the files you have available)
|
138 |
+
parquet_files = [
|
139 |
"expression.parquet",
|
140 |
"gene_metadata.parquet",
|
141 |
"cell_metadata.parquet",
|
|
|
143 |
"pca_explained_variance.parquet",
|
144 |
"umap_embeddings.parquet",
|
145 |
"highly_variable_gene_metadata.parquet",
|
146 |
+
"gene_statistics.parquet"
|
|
|
|
|
147 |
]
|
148 |
|
149 |
# Download each file
|
150 |
downloaded_paths = {}
|
151 |
+
for file_name in parquet_files:
|
152 |
try:
|
153 |
path = hf_hub_download(repo_id=HF_REPO_ID, filename=file_name, local_dir=LOCAL_DATA_DIR)
|
154 |
downloaded_paths[file_name] = path
|
155 |
print(f"Downloaded {file_name} to: {path}")
|
156 |
except Exception as e:
|
157 |
+
print(f"Warning: Could not download {file_name}. It might not be in the repository or its name differs. Error: {e}")
|
158 |
|
159 |
+
# Load core Parquet files into Pandas DataFrames
|
160 |
df_expression = pd.read_parquet(downloaded_paths["expression.parquet"])
|
161 |
df_pca_embeddings = pd.read_parquet(downloaded_paths["pca_embeddings.parquet"])
|
162 |
df_umap_embeddings = pd.read_parquet(downloaded_paths["umap_embeddings.parquet"])
|
163 |
df_cell_metadata = pd.read_parquet(downloaded_paths["cell_metadata.parquet"])
|
164 |
df_gene_metadata = pd.read_parquet(downloaded_paths["gene_metadata.parquet"])
|
165 |
+
df_pca_explained_variance = pd.read_parquet(downloaded_paths["pca_explained_variance.parquet"])
|
166 |
+
df_hvg_metadata = pd.read_parquet(downloaded_paths["highly_variable_gene_metadata.parquet"])
|
167 |
+
df_gene_stats = pd.read_parquet(downloaded_paths["gene_statistics.parquet"])
|
168 |
+
|
169 |
|
170 |
print("\n--- Data Loaded from Hugging Face Hub ---")
|
171 |
print("Expression data shape:", df_expression.shape)
|
|
|
173 |
print("UMAP embeddings shape:", df_umap_embeddings.shape)
|
174 |
print("Cell metadata shape:", df_cell_metadata.shape)
|
175 |
print("Gene metadata shape:", df_gene_metadata.shape)
|
176 |
+
print("PCA explained variance shape:", df_pca_explained_variance.shape)
|
177 |
+
print("HVG metadata shape:", df_hvg_metadata.shape)
|
178 |
+
print("Gene statistics shape:", df_gene_stats.shape)
|
179 |
|
180 |
|
181 |
# Example: Prepare data for an age prediction model
|
182 |
# IMPORTANT: You need to inspect `df_cell_metadata.columns` to find the actual age and cell type columns.
|
183 |
+
print("\nAvailable columns in cell_metadata.parquet (df_cell_metadata.columns):")
|
184 |
print(df_cell_metadata.columns.tolist())
|
185 |
|
186 |
# --- USER ACTION REQUIRED ---
|
|
|
198 |
y_labels_age_prediction = df_cell_metadata[age_column_name]
|
199 |
print(f"\nPrepared X (features) for age prediction with shape {X_features_age_prediction.shape} and y (labels) with shape {y_labels_age_prediction.shape}")
|
200 |
else:
|
201 |
+
print(f"\nWarning: Column '{age_column_name}' not found in cell metadata for age prediction example. Please check your data.")
|
202 |
|
203 |
# Example: Using cell type for a classification task
|
204 |
if cell_type_column_name in df_cell_metadata.columns:
|
|
|
206 |
y_labels_cell_type = df_cell_metadata[cell_type_column_name]
|
207 |
print(f"Prepared X (features) for cell type classification with shape {X_features_cell_type.shape} and y (labels) with shape {y_labels_cell_type.shape}")
|
208 |
else:
|
209 |
+
print(f"Warning: Column '{cell_type_column_name}' not found in cell metadata for cell type classification example. Please check your data.")
|
210 |
|
211 |
# This data can then be split into train/test sets and used to train various ML models.
|
212 |
```
|
|
|
218 |
**Mouse Muscle Ageing Cell Atlas Official Website:**
|
219 |
[https://www.muscleageingcellatlas.org/mouse-pp/](https://www.muscleageingcellatlas.org/mouse-pp/)
|
220 |
|
221 |
+
If you use the `scanpy` library for any further analysis or preprocessing, please also cite Scanpy.
|
222 |
+
|
223 |
## Contributions
|
224 |
|
225 |
This dataset was processed and prepared by:
|
|
|
230 |
|
231 |
*Curated on June 15, 2025.*
|
232 |
|
233 |
+
**Hugging Face Repository:** [https://huggingface.co/datasets/longevity-db/mouse-muscle-aging-atlas-snRNAseq](https://huggingface.co/datasets/longevity-db/mouse-muscle-aging-atlas-snRNAseq)
|