SPINNMF: Stable Spatial Pattern Discovery via AutoK Consensus Graph-Regularized Poisson NMF
Project description
SPINNMF
安装
-(发布到 PyPI 后)pip install spinnmf
- 开发模式:在源码根目录运行
pip install -e .[dev]
快速使用
命令行运行 AutoK:
spinnmf \
--h5ad /path/to/spatial.h5ad \
--outdir /path/to/outdir \
--k_grid 2,3,4,5 \
--n_seeds 5 \
--n_jobs 4
Python 调用:
import anndata as ad
from spinnmf import fit_spin_nmf_autok, config
adata = ad.read_h5ad("path/to/spatial.h5ad")
cfg = config.SPINNMFConfig(k_grid=(2, 3, 4), n_seeds=3, n_jobs=1)
res = fit_spin_nmf_autok(adata.X, adata.obsm["spatial"], cfg)
print(res.K_star, res.W.shape, res.H.shape)
测试与构建
pytest
python -m build
twine check dist/*
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
spinnmf-0.1.0.tar.gz
(5.5 MB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file spinnmf-0.1.0.tar.gz.
File metadata
- Download URL: spinnmf-0.1.0.tar.gz
- Upload date:
- Size: 5.5 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2ce61a67bba722c715e69bbcb2239d48f8a605830a98c890fc7a1f02183f9e34
|
|
| MD5 |
a2252f93b004f43eaafe82fd2bc142ba
|
|
| BLAKE2b-256 |
4b43f8dc6e0591dac61aa4d2961e2b60b9e377516ad1b42f448020cc024aecc5
|
File details
Details for the file spinnmf-0.1.0-py3-none-any.whl.
File metadata
- Download URL: spinnmf-0.1.0-py3-none-any.whl
- Upload date:
- Size: 2.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8d0160e4e5350514e222dcd1673c86540412bef606c00becd2a3d3bd7bdb0955
|
|
| MD5 |
dc549c3f7d354d28472b721a9831688c
|
|
| BLAKE2b-256 |
8e983b0f6026821f46ff47f65d6dfc583cc3232139f4994e7fab410cbcff2dcb
|