HistAgent-data / README.md
wli13's picture
Match clinical tutorial data to manuscript Figure 4
67262f2 verified
|
Raw
History Blame Contribute Delete
2.95 kB
---
pretty_name: HistAgent tutorial and Agent Module data
license: other
task_categories:
- image-to-text
- text-retrieval
language:
- en
---
# HistAgent tutorial and Agent Module data
This repository contains the public data used by the HistAgent tutorials and
the configurable Agent Module.
## Contents
```text
HistAgent-data/
├── tutorials/ # tables and images loaded by the notebooks
├── rankridge_tutorial_packs/
│ ├── human__breast/
│ ├── human__kidney/
│ ├── human__stomach/
│ ├── mouse__lung/
│ ├── mouse__spleen/
│ └── rcc__human_kidney/
├── rankridge_pack_versions.csv
├── rankridge_validation.csv
├── chat/
│ ├── spots.jsonl # 9,150 spatial transcriptomics spot records
│ ├── config.example.env # Agent Module data-path configuration
│ └── slice_images/ # three RCC tissue images for the slice selector
└── manifest.json # byte sizes and SHA-256 checksums
```
The tutorial files include benchmark summaries, spot examples, clean WSI and
ROI images, full-slide HistAgent tile representations and trained ABMIL
checkpoints for the three clinical cases shown in the tutorial, the exact
patient-level out-of-fold risk tables used for the LIHC and LGG survival
panels, and atlas retrieval examples. The STAD examples include all five
trained folds used by the displayed score maps; the BRCA example includes the
trained OS model used for the displayed local-risk analysis. The
RankRidge packs contain sparse reference rank features, reference expression
targets, query rank features and fitted coefficients, so the notebooks can run
the mapping without downloading the source H5AD collection.
The Agent Module JSONL contains ranked genes, cell-state summaries, pathways and
spatial context for each public demo spot. The tissue images use public study
accessions as filenames so the server can match them to their slices.
## Download
```python
from huggingface_hub import snapshot_download
root = snapshot_download(
"wli13/HistAgent-data",
repo_type="dataset",
)
```
Tutorial notebooks expect:
```python
DATA_DIR = root / "tutorials"
RANKRIDGE_DIR = root / "rankridge_tutorial_packs"
```
The hosted notebooks download only the packs used on the current page. To use
a local copy, set `HISTAGENT_TUTORIAL_DATA` and
`HISTAGENT_RANKRIDGE_PACKS`.
For the Agent Module:
```text
HISTAGENT_INPUT_JSONL=<root>/chat/spots.jsonl
HISTAGENT_ATLAS_SQLITE=
HISTAGENT_SLICE_IMAGE_DIRS=<root>/chat/slice_images
```
The public bundle does not require the optional full-atlas SQLite file.
Natural-language retrieval uses the 9,150 rich spot records in `spots.jsonl`.
## Provenance and use
The bundle contains derived research outputs and examples assembled from the
public studies cited by the HistAgent manuscript. Source-study terms continue
to apply to the underlying data.