Skip to main content

juzi

Project description

:tangerine: juzi

Various methods for analyzing cancer cell states and types using single-cell sequencing data (experimental).

Installation

pip install juzi

Usage

cell states (cs)

Identification of recurrent gene programs across multiple cancer samples (inspired by Gavish et al. 2023).

import juzi as jz

# Perform NMF across each unique sample at multiple factor resolutions
subset = jz.cs.nmf(
    adata,
    key="sample_id",
    layer="counts",
    genes="highly_variable",
    min_cells=100,
    k=[7, 8, 9, 10],
    max_iter=1000,
    n_jobs=8,
    seed=123
)

# Prune recurrent intra-sample factors based on overlapping top genes
jz.cs.prune(
    subset,
    top_k=50,
    min_similarity=0.7,
    min_k=1,
    n_jobs=1
)

# Compute inter-sample similarity matrix between factors
jz.cs.similarity(
    subset,
    distance="jaccard",
    top_k=50,
    intra_sample=True,
    drop_zeros=True,
    min_similarity=0.2,
    n_jobs=8,
    prefer="threads"
)

# Cluster factor similarity matrix by iterative merging
jz.cs.cluster(
    subset,
    threshold=0.1,
    min_cluster=5
)

# Plot clustered factor similarity matrix (i.e. gene programs)
jz.cs.plot_programs(
    subset,
    vmin=0.,
    vmax=1.,
    figsize=(5., 5.),
    cbar_label="Similarity"
)

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


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.1.1.tar.gz (19.9 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.1.1-py3-none-any.whl (20.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: juzi-0.1.1.tar.gz
  • Upload date:
  • Size: 19.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.10

File hashes

Hashes for juzi-0.1.1.tar.gz
Algorithm Hash digest
SHA256 e82b72ad3be97715f50a4e8ad1742180d2e6479e027bd4e5ab2b1c21e2ec4283
MD5 fd64d40826b9f35612c7078b19fe4c05
BLAKE2b-256 9e244a714fa4f468cbb2b1e8833f70ff0dcac60d65cc167f322ac2940c2ca278

See more details on using hashes here.

File details

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

File metadata

  • Download URL: juzi-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 20.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.10

File hashes

Hashes for juzi-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fb289a6e31524b29df9f1bd519a1360fbf73d87a8ae022c6ab18c9e68cbfeb6a
MD5 8cdac636e4a819e56719751a44b2d174
BLAKE2b-256 32d52bc63b0a7f07eec73598ecd0ed6eb78a17d0a53319501c94b3e53bf61ffe

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