Datasets:
image imagewidth (px) 600 13.3k |
|---|
GreS: Resources for Semantic-Guided Spatial Domain Identification
This repository hosts the resources needed to run GreS, a graph-based framework that incorporates gene-level semantic priors into spatial representation learning for spatial domain identification.
It contains two parts:
embeddings/β pretrained gene embeddings and vocabulary used to build per-spot semantic descriptors.DLPFC/β example 10x Visium spatial transcriptomics data (human dorsolateral prefrontal cortex).
Contents
ylu99/Gres/
βββ embeddings/
β βββ pretrained_gene_embeddings.pt # pretrained gene embedding matrix
β βββ vocab.json # gene -> index vocabulary
βββ DLPFC/
βββ 151507/
β βββ metadata.tsv # per-spot annotations (incl. layer labels)
β βββ 151507_truth.txt # ground-truth layer labels
β βββ spatial/ # tissue positions + scale factors
βββ 151508/
βββ ... # 12 samples in total
embeddings/
pretrained_gene_embeddings.pt: pretrained semantic embeddings for genes, aggregated to the spot level (weighted by expression) to form each spot's semantic descriptor.vocab.json: maps gene symbols to embedding indices so genes can be aligned to the embedding matrix.
DLPFC/
The DLPFC dataset comprises 12 tissue sections (151507β151510, 151669β151676) from the human dorsolateral prefrontal cortex, a widely used benchmark for spatial domain identification with manually annotated cortical layers (layers 1β6 and white matter).
Each sample folder contains:
metadata.tsv: per-spot metadata, including the ground-truth layer annotation (layer_guess_reordered).<id>_truth.txt: ground-truth labels.spatial/:tissue_positions_list.csvandscalefactors_json.jsonfor spatial coordinates.
Note: the raw gene-expression matrices (
filtered_feature_bc_matrix.h5) and full-resolution tissue images are not included here due to size. Obtain them from the original spatialLIBD / 10x Genomics release and place them next to the provided files.
Usage with GreS
Download the resources and place them under the GreS project tree:
# Gene embeddings -> GreS/embedding/text_embedd_large/
huggingface-cli download ylu99/Gres --repo-type dataset \
--include "embeddings/*" --local-dir ./gres_resources
# Example DLPFC data -> GreS/data/raw_h5ad/<dataset_id>/
huggingface-cli download ylu99/Gres --repo-type dataset \
--include "DLPFC/*" --local-dir ./gres_resources
Then follow the three-step pipeline in the GreS repository:
preprocess/generate_data.pyβ build the graph-augmenteddata.h5ad.preprocess/generate_raw_gene_concat_spot_embedding.pyβ build per-spot semantic embeddings.tools/train.pyβ train and cluster.
See the project tutorial.ipynb for an end-to-end walkthrough.
License
Released under the MIT License. The DLPFC data originates from the spatialLIBD project; please also cite the original data source when using it.
- Downloads last month
- 4,702