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
)
marker genes (mg)
Various marker genes for cell types, subtypes, and pathways.
from juzi.mg import available_sets
# Check available marker gene sets
print(available_sets())
# Load breast cancer gene sets (e.g. PAM50)
from juzi.mg import CancerBreast
markers = CancerBreast()
# Load cancer pathway gene sets (e.g. HIPPO)
from juzi.mg import CancerPathways
markers = CancerPathways()
# Load cell cycle gene sets (e.g. G1S)
from juzi.mg import CellCycle
markers = CellCycle()
# List available sets in a given marker class
markers.info()
# Get all genes from all sets in a flattened list
markers.all()
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.6.tar.gz
(12.8 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.6-py3-none-any.whl
(13.5 kB
view details)
File details
Details for the file juzi-0.0.6.tar.gz.
File metadata
- Download URL: juzi-0.0.6.tar.gz
- Upload date:
- Size: 12.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
94dc176d66639d8e15c4fb05734934c51afe5b1d71ca493c480c41c561653286
|
|
| MD5 |
e2d72967edca71f255013564cc57219a
|
|
| BLAKE2b-256 |
33f754467255ca27f85f212a8af61517538350ac9b95cf311170057d57b439cc
|
File details
Details for the file juzi-0.0.6-py3-none-any.whl.
File metadata
- Download URL: juzi-0.0.6-py3-none-any.whl
- Upload date:
- Size: 13.5 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 |
eb8c5916f1868579240cf66d5c750039836a892968d15c3b8b5131da3eb66089
|
|
| MD5 |
d2fcbd3ce328622a717dce8b37d8a1be
|
|
| BLAKE2b-256 |
c36e4a725e1dea26659540c2486d9edf5cd2817c76005809d21c5ce02119551b
|