Download several_datasets/scripts/summarize_obs_unique.py from AlphaSlayer/sc-perturb-collection: direct link, hf CLI and curl.
- Browser
- Download file 473 Bytes
-
https://huggingface.co/datasets/AlphaSlayer/sc-perturb-collection/resolve/main/several_datasets/scripts/summarize_obs_unique.py
- Command line
-
hf download hf://datasets/AlphaSlayer/sc-perturb-collection/several_datasets/scripts/summarize_obs_unique.py
-
curl -L -o summarize_obs_unique.py https://huggingface.co/datasets/AlphaSlayer/sc-perturb-collection/resolve/main/several_datasets/scripts/summarize_obs_unique.py
473 Bytes
| """Export current compact obs values and counts to docs/obs_unique.json.""" | |
| from pathlib import Path | |
| from prepare import export_obs_statistics | |
| def main(): | |
| root = Path(__file__).resolve().parents[1] | |
| paths = sorted(root.glob("*/data/*.h5ad")) | |
| if not paths: | |
| raise FileNotFoundError("No prepared datasets; run scripts/prepare.py first") | |
| for path in paths: | |
| print(export_obs_statistics(path), flush=True) | |
| if __name__ == "__main__": | |
| main() | |