Add your description here
Project description
scanpy-cli
A command-line interface for Scanpy, a Python library for analyzing single-cell gene expression data.
Installation
pip install scanpy-cli
Usage
The scanpy-cli tool provides three main command groups:
Preprocessing (pp)
Commands for preprocessing single-cell data:
scanpy-cli pp normalize # Normalize data
scanpy-cli pp filter_cells # Filter cells
scanpy-cli pp filter_genes # Filter genes
scanpy-cli pp regress_out KEYS --input-file INPUT.h5ad --output-file OUTPUT.h5ad # Regress out unwanted variation
scanpy-cli pp neighbors --input-file INPUT.h5ad --output-file OUTPUT.h5ad # Compute neighborhood graph
scanpy-cli pp pca --input-file INPUT.h5ad --output-file OUTPUT.h5ad # Run principal component analysis
Example of regress_out:
# Regress out cell cycle effects using S_score and G2M_score
scanpy-cli pp regress_out S_score,G2M_score -i data.h5ad -o data_regressed.h5ad
# Regress out with specified parameters
scanpy-cli pp regress_out percent_mito -l counts -j 4 -i data.h5ad -o data_regressed.h5ad
Example of neighbors:
# Compute neighbors with default parameters
scanpy-cli pp neighbors -i data.h5ad -o data_neighbors.h5ad
# Compute neighbors with custom parameters
scanpy-cli pp neighbors --n-neighbors 20 --metric cosine -i data.h5ad -o data_neighbors.h5ad
Example of PCA:
# Run PCA with default parameters
scanpy-cli pp pca -i data.h5ad -o data_pca.h5ad
# Run PCA with custom parameters
scanpy-cli pp pca --n-comps 30 --use-highly-variable -i data.h5ad -o data_pca.h5ad
Tools (tl)
Commands for analysis tools:
scanpy-cli tl umap --input-file INPUT.h5ad --output-file OUTPUT.h5ad # Run UMAP dimensionality reduction
scanpy-cli tl leiden --input-file INPUT.h5ad --output-file OUTPUT.h5ad # Run Leiden clustering
Example of UMAP:
# Run UMAP with default parameters
scanpy-cli tl umap -i data_neighbors.h5ad -o data_umap.h5ad
# Run UMAP with custom parameters
scanpy-cli tl umap --min-dist 0.3 --n-components 3 -i data_neighbors.h5ad -o data_umap.h5ad
Example of Leiden clustering:
# Run Leiden clustering with default parameters
scanpy-cli tl leiden -i data_neighbors.h5ad -o data_leiden.h5ad
# Run Leiden with custom resolution
scanpy-cli tl leiden --resolution 0.8 -i data_neighbors.h5ad -o data_leiden.h5ad
# Run Leiden with restricted cell types
scanpy-cli tl leiden --restrict-to-key cell_type --restrict-to-categories "T-cell,B-cell" -i data.h5ad -o data_leiden.h5ad
Plotting (pl)
Commands for visualization:
scanpy-cli pl umap --input-file INPUT.h5ad --output-file OUTPUT.png # Plot UMAP embeddings
scanpy-cli pl heatmap # Plot heatmap
scanpy-cli pl violin # Plot violin plot
Example of UMAP plotting:
# Basic UMAP plot
scanpy-cli pl umap -i data_umap.h5ad -o umap_plot.png
# UMAP colored by Leiden clusters and gene expression
scanpy-cli pl umap -i data_umap.h5ad -o umap_colored.png --color leiden --color CD4 --color CD8A
# Customized UMAP plot
scanpy-cli pl umap -i data_umap.h5ad -o umap_custom.png --color leiden --dpi 300 --figsize 8,6 --add-outline
Getting Help
For help on any command, use the --help flag:
scanpy-cli --help
scanpy-cli pp --help
scanpy-cli tl umap --help
scanpy-cli pp neighbors --help
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
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
File details
Details for the file scanpy_cli-0.1.3.tar.gz.
File metadata
- Download URL: scanpy_cli-0.1.3.tar.gz
- Upload date:
- Size: 42.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eb182166b5c716410e73ba8fbe0493a78d059f887ba0c2c739e51d14bc9b9eee
|
|
| MD5 |
96ee14e855a89151577d8ba8318a9df1
|
|
| BLAKE2b-256 |
8b2da45843461273ab6ae492c7e0b7380d2f8b53941a5c62f04edfe2a3ef1c26
|
Provenance
The following attestation bundles were made for scanpy_cli-0.1.3.tar.gz:
Publisher:
release.yml on nictru/scanpy-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
scanpy_cli-0.1.3.tar.gz -
Subject digest:
eb182166b5c716410e73ba8fbe0493a78d059f887ba0c2c739e51d14bc9b9eee - Sigstore transparency entry: 188448245
- Sigstore integration time:
-
Permalink:
nictru/scanpy-cli@7f0b13ff7f309474b69e3b2f60f7e82968d94282 -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/nictru
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@7f0b13ff7f309474b69e3b2f60f7e82968d94282 -
Trigger Event:
release
-
Statement type:
File details
Details for the file scanpy_cli-0.1.3-py3-none-any.whl.
File metadata
- Download URL: scanpy_cli-0.1.3-py3-none-any.whl
- Upload date:
- Size: 12.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f011ab9cc98999544077987d63951bac51dfdcbf8a29512662e7a73b63c43997
|
|
| MD5 |
59c3e35bc135b198d301a23bf59f94a6
|
|
| BLAKE2b-256 |
7473f0d8c793795c1899d2bbcf3474b33843fcbad625a21986142998ea3c9c16
|
Provenance
The following attestation bundles were made for scanpy_cli-0.1.3-py3-none-any.whl:
Publisher:
release.yml on nictru/scanpy-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
scanpy_cli-0.1.3-py3-none-any.whl -
Subject digest:
f011ab9cc98999544077987d63951bac51dfdcbf8a29512662e7a73b63c43997 - Sigstore transparency entry: 188448252
- Sigstore integration time:
-
Permalink:
nictru/scanpy-cli@7f0b13ff7f309474b69e3b2f60f7e82968d94282 -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/nictru
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@7f0b13ff7f309474b69e3b2f60f7e82968d94282 -
Trigger Event:
release
-
Statement type: