|
2 | 2 |
|
3 | 3 | A toy Python package for analyzing 10x Xenium data. |
4 | 4 |
|
| 5 | +## Installation |
| 6 | + |
| 7 | +```bash |
| 8 | +pip install -U "pyXenium>=0.2.0" |
| 9 | +``` |
| 10 | + |
5 | 11 | ## Quickstart |
6 | | - ## Installation |
7 | | - |
8 | | --```bash |
9 | | --pip install pyXenium |
10 | | --``` |
11 | | -+```bash |
12 | | -+pip install -U "pyXenium>=0.2.0" |
13 | | -+``` |
14 | | - |
15 | | - ## Quickstart |
16 | | - |
17 | | -+### Load a partial Xenium dataset from Hugging Face |
18 | | -+The snippet below uses the public demo dataset and the v2 loader that supports `base_url`. |
19 | | -+ |
20 | | -+```python |
21 | | -+from pyXenium.io.partial_xenium_loader import load_anndata_from_partial |
22 | | -+ |
23 | | -+BASE = "https://huggingface.co/datasets/hutaobo/pyxenium-gsm9116572/resolve/main" |
24 | | -+ |
25 | | -+adata = load_anndata_from_partial( |
26 | | -+ base_url=BASE, |
27 | | -+ analysis_name="analysis.zarr.zip", |
28 | | -+ cells_name="cells.zarr.zip", |
29 | | -+ transcripts_name="transcripts.zarr.zip", |
30 | | -+ # Optional: if you uploaded a 10x MEX triplet under BASE/mex/ |
31 | | -+ # mex_dir=BASE + "/mex", |
32 | | -+ # mex_matrix_name="matrix.mtx.gz", |
33 | | -+ # mex_features_name="features.tsv.gz", |
34 | | -+ # mex_barcodes_name="barcodes.tsv.gz", |
35 | | -+ build_counts_if_missing=True, |
36 | | -+) |
37 | | -+print(adata) |
38 | | -+``` |
39 | | -+ |
40 | | -+> **Note:** Requires `pyXenium>=0.2.0`. The dataset used above is hosted at: |
41 | | -+> - Hugging Face Datasets: `hutaobo/pyxenium-gsm9116572` |
| 12 | + |
| 13 | +### Load a partial Xenium dataset from Hugging Face |
| 14 | + |
| 15 | +The snippet below uses the **public demo dataset** and the **v2 loader** that supports `base_url`. |
| 16 | + |
| 17 | +```python |
| 18 | +from pyXenium.io.partial_xenium_loader import load_anndata_from_partial |
| 19 | + |
| 20 | +BASE = "https://huggingface.co/datasets/hutaobo/pyxenium-gsm9116572/resolve/main" |
| 21 | + |
| 22 | +adata = load_anndata_from_partial( |
| 23 | + base_url=BASE, |
| 24 | + analysis_name="analysis.zarr.zip", |
| 25 | + cells_name="cells.zarr.zip", |
| 26 | + transcripts_name="transcripts.zarr.zip", |
| 27 | + # Optional: if you uploaded a 10x MEX triplet under BASE/mex/ |
| 28 | + # mex_dir=BASE + "/mex", |
| 29 | + # mex_matrix_name="matrix.mtx.gz", |
| 30 | + # mex_features_name="features.tsv.gz", |
| 31 | + # mex_barcodes_name="barcodes.tsv.gz", |
| 32 | + build_counts_if_missing=True, |
| 33 | +) |
| 34 | +print(adata) |
| 35 | +``` |
| 36 | + |
| 37 | +> **Note:** Requires `pyXenium>=0.2.0`. |
| 38 | +> The demo dataset is hosted at: |
| 39 | +> - Hugging Face Datasets: [hutaobo/pyxenium-gsm9116572](https://huggingface.co/datasets/hutaobo/pyxenium-gsm9116572) |
| 40 | +
|
| 41 | +--- |
| 42 | + |
| 43 | +## Development |
| 44 | + |
| 45 | +To install with development dependencies (testing, docs, etc.): |
| 46 | + |
| 47 | +```bash |
| 48 | +pip install -e ".[dev]" |
| 49 | +pytest |
| 50 | +``` |
| 51 | + |
| 52 | +--- |
| 53 | + |
| 54 | +## Links |
| 55 | + |
| 56 | +- 📦 PyPI: [pyXenium](https://pypi.org/project/pyXenium/) |
| 57 | +- 📖 Documentation: [Read the Docs](https://pyxenium.readthedocs.io/en/latest/) |
| 58 | +- 💻 Source code: [GitHub](https://github.com/hutaobo/pyXenium) |
| 59 | + |
| 60 | +## License |
| 61 | + |
| 62 | +MIT |
0 commit comments