Skip to main content

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


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.5.tar.gz (8.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

juzi-0.0.5-py3-none-any.whl (8.7 kB view details)

Uploaded Python 3

File details

Details for the file juzi-0.0.5.tar.gz.

File metadata

  • Download URL: juzi-0.0.5.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

Hashes for juzi-0.0.5.tar.gz
Algorithm Hash digest
SHA256 fd5ed04417b4205f983804682a5daf746352db9bea638ee017223128ed48a860
MD5 d096c19cd5a49522650ca8f31f40694d
BLAKE2b-256 bc0a60653b120d5b22cff6b03dd7d4cf224895d60d9865cc4a3d08f42cf75b64

See more details on using hashes here.

File details

Details for the file juzi-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: juzi-0.0.5-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

Hashes for juzi-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 79ea8f5a01514ea0d7da1821dac35f54aed9e381ae3f1ba8dc6823d750b3cb5e
MD5 7d01433871a468128c80b1e6a1e07e67
BLAKE2b-256 e7d090f3c5315cd17950986002dbee56d3589ec57c8ca187191b5a814e9578d2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page