juzi
Project description
:tangerine: juzi
Various methods for analyzing cell states and types in single-cell sequencing data (experimental).
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.3.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.3-py3-none-any.whl
(8.7 kB
view details)
File details
Details for the file juzi-0.0.3.tar.gz.
File metadata
- Download URL: juzi-0.0.3.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 |
9393ddac30617f392984734122c8cce5fc233127aa937e2ce30c723695e27cd3
|
|
| MD5 |
a136eac5513bb582cec8e85cd5708c66
|
|
| BLAKE2b-256 |
510b81ae87565ab4abed0f8fd4143aa605cdd152ea5385bd853289b3587a7530
|
File details
Details for the file juzi-0.0.3-py3-none-any.whl.
File metadata
- Download URL: juzi-0.0.3-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 |
76182ea074a8972cfe6020e70be13b0e6acd5ba8568aeb9db03fdb7b1286612d
|
|
| MD5 |
4b33f89bebacd6a48382e3303022888c
|
|
| BLAKE2b-256 |
201daf2c37c7b8287c96080ed1427e112d02b08054358c978488a42ae0b050ac
|