ylu99 commited on
Commit
6ce80f6
·
verified ·
1 Parent(s): db345e2

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +82 -0
README.md ADDED
@@ -0,0 +1,82 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ language:
4
+ - en
5
+ tags:
6
+ - spatial-transcriptomics
7
+ - spatial-domain-identification
8
+ - gene-embeddings
9
+ - DLPFC
10
+ - single-cell
11
+ pretty_name: GreS Resources (Gene Embeddings + DLPFC Spatial Data)
12
+ size_categories:
13
+ - 100MB<n<1GB
14
+ ---
15
+
16
+ # GreS: Resources for Semantic-Guided Spatial Domain Identification
17
+
18
+ This repository hosts the resources needed to run **[GreS](https://github.com/ai4nucleome/GreS)**, a graph-based framework that incorporates gene-level semantic priors into spatial representation learning for spatial domain identification.
19
+
20
+ It contains two parts:
21
+
22
+ 1. **`embeddings/`** — pretrained gene embeddings and vocabulary used to build per-spot semantic descriptors.
23
+ 2. **`DLPFC/`** — example 10x Visium spatial transcriptomics data (human dorsolateral prefrontal cortex).
24
+
25
+ ## Contents
26
+
27
+ ```
28
+ ylu99/Gres/
29
+ ├── embeddings/
30
+ │ ├── pretrained_gene_embeddings.pt # pretrained gene embedding matrix
31
+ │ └── vocab.json # gene -> index vocabulary
32
+ └── DLPFC/
33
+ ├── 151507/
34
+ │ ├── metadata.tsv # per-spot annotations (incl. layer labels)
35
+ │ ├── 151507_truth.txt # ground-truth layer labels
36
+ │ └── spatial/ # tissue positions + scale factors
37
+ ├── 151508/
38
+ └── ... # 12 samples in total
39
+ ```
40
+
41
+ ### `embeddings/`
42
+
43
+ * **`pretrained_gene_embeddings.pt`**: pretrained semantic embeddings for genes, aggregated to the spot level (weighted by expression) to form each spot's semantic descriptor.
44
+ * **`vocab.json`**: maps gene symbols to embedding indices so genes can be aligned to the embedding matrix.
45
+
46
+ ### `DLPFC/`
47
+
48
+ 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).
49
+
50
+ Each sample folder contains:
51
+
52
+ * **`metadata.tsv`**: per-spot metadata, including the ground-truth layer annotation (`layer_guess_reordered`).
53
+ * **`<id>_truth.txt`**: ground-truth labels.
54
+ * **`spatial/`**: `tissue_positions_list.csv` and `scalefactors_json.json` for spatial coordinates.
55
+
56
+ > 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](http://spatial.libd.org/spatialLIBD/) release and place them next to the provided files.
57
+
58
+ ## Usage with GreS
59
+
60
+ Download the resources and place them under the GreS project tree:
61
+
62
+ ```bash
63
+ # Gene embeddings -> GreS/embedding/text_embedd_large/
64
+ huggingface-cli download ylu99/Gres --repo-type dataset \
65
+ --include "embeddings/*" --local-dir ./gres_resources
66
+
67
+ # Example DLPFC data -> GreS/data/raw_h5ad/<dataset_id>/
68
+ huggingface-cli download ylu99/Gres --repo-type dataset \
69
+ --include "DLPFC/*" --local-dir ./gres_resources
70
+ ```
71
+
72
+ Then follow the three-step pipeline in the [GreS repository](https://github.com/ai4nucleome/GreS):
73
+
74
+ 1. `preprocess/generate_data.py` — build the graph-augmented `data.h5ad`.
75
+ 2. `preprocess/generate_raw_gene_concat_spot_embedding.py` — build per-spot semantic embeddings.
76
+ 3. `tools/train.py` — train and cluster.
77
+
78
+ See the project [`tutorial.ipynb`](https://github.com/ai4nucleome/GreS/blob/main/tutorial.ipynb) for an end-to-end walkthrough.
79
+
80
+ ## License
81
+
82
+ Released under the MIT License. The DLPFC data originates from the spatialLIBD project; please also cite the original data source when using it.