juzi
Project description
:tangerine: juzi
Various methods for analyzing cell states and types in single-cell sequencing data (experimental).
Installation
pip install juzi
cell states (cs)
Identifying intra-sample programs.
from juzi.cs.nmf import gaussian_nmf, poisson_nmf, fixed_gaussian_nmf, fixed_poisson_nmf
# Vanilla NMF on normalized and log1p counts
W, H, losses = gaussian_nmf(
data,
n_factors=8,
max_iter=100,
lambda_H=1e-2,
init="random",
eps=1e-7
)
# Poisson NMF on counts
W, H, losses = poisson_nmf(
data,
n_factors=8,
max_iter=100,
lambda_H=1e-2,
init="nndsvd",
eps=1e-7
)
# Vanilla NMF with fixed H
W, losses = fixed_gaussian_nmf(
data,
fixed_H=H,
max_iter=100,
init="random",
eps=1e-7,
silent=False
)
# Poisson NMF with fixed H
W, losses = fixed_poisson_nmf(
data,
fixed_H=H,
max_iter=100,
init="random",
eps=1e-7,
silent=False
)
Identifying consensus (intra-sample) and shared (inter-sample) programs.
from juzi.cs.tools import consensus_factors, factor_similarity
# Compute a set of consensus factors between runs
HC, HS, labels, correlation = consensus_factors(
[H1, H2, H3, ...],
n_clusters=10,
eps=1e-8,
method="agglomerative",
metric="euclidean",
linkage="ward",
)
# Compute similarity matrix between factors computed across different samples
S, K, ids = factor_similarity(
[H1, H2, H3, ...],
distance="cosine",
top_k=500,
drop_zeros=True,
intra_sample=False,
eps=1e-8
)
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
juzi-0.0.4.tar.gz
(8.3 kB
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
juzi-0.0.4-py3-none-any.whl
(8.7 kB
view details)
File details
Details for the file juzi-0.0.4.tar.gz.
File metadata
- Download URL: juzi-0.0.4.tar.gz
- Upload date:
- Size: 8.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ac600b00ba18f4be4e29f5f1560f74dc8a45a6a0595d73d70704d0216c9b1e7e
|
|
| MD5 |
dc806b7361231541934ffe8e775b753c
|
|
| BLAKE2b-256 |
b9680b8ec3a17754173c465cf9cf3fd6d2ebdd46e9c4fd696fe92ff42e6e1296
|
File details
Details for the file juzi-0.0.4-py3-none-any.whl.
File metadata
- Download URL: juzi-0.0.4-py3-none-any.whl
- Upload date:
- Size: 8.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bbc68294b81601cb52eb7a54c3e0e266b5777f462f2ae8f4ce4f0c6f448f5976
|
|
| MD5 |
087819377c0e55b78b8d86434c0b2bb1
|
|
| BLAKE2b-256 |
307cab33f570f3b119f553e82b9212c763a61b4ea22f43b92139f49e35ece73c
|