Skip to main content

A workbench of general-purpose single-cell RNA-seq analysis tools from the Wagner Lab (UCSF)

Project description

scToolsRNA

A workbench of general-purpose single-cell RNA-seq analysis tools from the Wagner Lab (UCSF).

scToolsRNA collects utilities that have accumulated across lab projects into a single pip-installable package built on top of scanpy and AnnData. It covers preprocessing and QC, feature selection and dimensionality reduction, differential expression, kNN label transfer, trajectory analysis, network export, plotting, and I/O.

It is a companion to the lab's dataset-specific zmap-tools package: where zmap-tools is specialized for the Zebrafish Multi-Atlas Project, scToolsRNA holds the organism-agnostic building blocks meant for everyday use.

Installation

pip install sctoolsrna

or, from a checkout of this repository:

pip install .

All runtime dependencies (scanpy, anndata, scikit-learn, faiss-cpu, pydeseq2, scrublet, umap-learn, harmonypy, plotly, igraph, leidenalg, …) are installed automatically. Individual modules import heavier or optional dependencies lazily (inside the functions that use them), so import scToolsRNA stays fast and does not fail if a single optional system library is missing.

Usage

The distribution installs as sctoolsrna, but the import name is scToolsRNA:

import scanpy as sc
import scToolsRNA as sct

adata = sc.read_h5ad("my_data.h5ad")

# Feature selection + significant-PC estimation
sct.get_variable_genes(adata, top_n_genes=3000)
sct.get_sig_pcs(adata)

# kNN label transfer from a labeled reference
sct.transfer_labels_knn(
    adata_query,
    adata_ref,
    ref_label_col="cell_type",
    ref_basis="X_pca_harmony",
    query_basis="X_pca_harmony",
)

Every public function is also re-exported at the top level, so from scToolsRNA import get_variable_genes continues to work for existing code.

Modules

Module Contents
preprocess Barcode/mito/ribo/doublet filtering and sampling QC
dimensionality Variable-gene (V-score) selection, covarying genes, significant-PC estimation
workflows Convenience pipelines (raw → normalized → UMAP/Leiden)
diffexp Pseudobulk pyDESeq2 contrasts, DEG tables, volcano/clustermap plots
classification Train/predict per-cell classifiers (sklearn)
knn Portable FAISS/scikit-learn k-nearest-neighbor search
labeltransfer kNN label and continuous-value transfer between datasets
trajectories Diffusion-pseudotime dynamic-gene detection and plotting
stitch STITCH temporal graph construction and diagnostics
network GraphML / Pajek export for Gephi
plotting 3D embeddings, UMAP animations, axis helpers
colormaps Custom matplotlib colormaps
utils Label smoothing, confusion matrices, stacked barplots
readwrite STARsolo / alevin / alevin-fry / inDrops loaders, cell/gene metadata
sparse Sparse-matrix helpers

License

See LICENSE.

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

sctoolsrna-0.1.0.tar.gz (50.6 kB view details)

Uploaded Source

Built Distribution

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

sctoolsrna-0.1.0-py3-none-any.whl (54.0 kB view details)

Uploaded Python 3

File details

Details for the file sctoolsrna-0.1.0.tar.gz.

File metadata

  • Download URL: sctoolsrna-0.1.0.tar.gz
  • Upload date:
  • Size: 50.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for sctoolsrna-0.1.0.tar.gz
Algorithm Hash digest
SHA256 0896fd6388eb875ce6c59bb99f4dd665ade24760debc2ea0d0fe67ee5f998349
MD5 ec0e4b8b5f383d74d941f904fed126c5
BLAKE2b-256 a2e4a94d87dea67c2fcca2da5d51a8ae67a4078de0ecdc3fdda3b1ee500854e5

See more details on using hashes here.

Provenance

The following attestation bundles were made for sctoolsrna-0.1.0.tar.gz:

Publisher: pip-publish.yml on WagnerLabUCSF/scToolsRNA-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file sctoolsrna-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: sctoolsrna-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 54.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for sctoolsrna-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4458e32109b71228c461adbeeaada6e3dd4c4d2b02648a2fde7f4167434acc38
MD5 49c7e1026a56db11d47c411c4d4288f8
BLAKE2b-256 13ba9ed4de724ede6ff0f6ed06e949f605fb65a9526febe4813381726bf538bc

See more details on using hashes here.

Provenance

The following attestation bundles were made for sctoolsrna-0.1.0-py3-none-any.whl:

Publisher: pip-publish.yml on WagnerLabUCSF/scToolsRNA-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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