Add support for py 3.14
A command-line interface for Scanpy, a Python library for analyzing single-cell gene expression data.
pip install scanpy-cli
The scanpy-cli tool provides three main command groups for single-cell data analysis:
Commands for preprocessing single-cell data:
filter-cells
filter-genes
normalize-total
log1p
scale
calculate-qc-metrics
downsample-counts
highly-variable-genes
pca
neighbors
regress-out
combat
harmony
bbknn
scanorama
scrublet
Commands for analysis tools:
tsne
umap
leiden
paga
rank-genes-groups
score-genes
Commands for visualization:
Commands for reading and writing data:
read-10x-h5
.h5ad
view
To run the tests, install the package in development mode with test dependencies:
# Install in development mode with test dependencies pip install -e ".[testing]" # Or using uv uv sync # Run the tests with pytest pytest
The project uses prek for code quality checks:
uv run prek run --all-files
This runs ruff (linting and formatting) and pytest.
ruff
pytest
For help on any command, use the --help flag:
--help
scanpy-cli --help scanpy-cli pp --help scanpy-cli tl umap --help
单细胞RNA测序数据分析命令行工具
版权所有:中国计算机学会技术支持:开源发展技术委员会 京ICP备13000930号-9 京公网安备 11010802032778号
scanpy-cli
A command-line interface for Scanpy, a Python library for analyzing single-cell gene expression data.
Installation
Usage
The scanpy-cli tool provides three main command groups for single-cell data analysis:
Preprocessing (pp)
Commands for preprocessing single-cell data:
filter-cells: Filter cells based on counts or genes expressedfilter-genes: Filter genes based on counts or cells expressing themnormalize-total: Normalize counts per cell to a target sum (library-size normalization)log1p: Logarithmize the data matrix (log(X + 1))scale: Scale data to unit variance and zero meancalculate-qc-metrics: Compute per-cell and per-gene QC metricsdownsample-counts: Downsample counts to equalize sequencing depthhighly-variable-genes: Identify highly variable genespca: Run principal component analysisneighbors: Compute neighborhood graphregress-out: Regress out unwanted sources of variationcombat: Batch effect correction using ComBatharmony: Batch effect correction using Harmonybbknn: Batch-balanced k-nearest neighbor graph constructionscanorama: Batch effect correction using Scanoramascrublet: Detect doublets in single-cell RNA-seq dataTools (tl)
Commands for analysis tools:
tsne: Run t-SNE dimensionality reductionumap: Run UMAP dimensionality reductionleiden: Run Leiden clusteringpaga: Run PAGA for trajectory inferencerank-genes-groups: Find marker genes for clustersscore-genes: Score a set of genes per cellPlotting (pl)
Commands for visualization:
umap: Plot UMAP embeddingsInput/Output (io)
Commands for reading and writing data:
read-10x-h5: Read a 10x Genomics HDF5 file and save as.h5adview: Display the structure of an.h5adfile (backed/read-only mode)Development
Running Tests
To run the tests, install the package in development mode with test dependencies:
Code Quality
The project uses prek for code quality checks:
This runs
ruff(linting and formatting) andpytest.Getting Help
For help on any command, use the
--helpflag: