Skip to main content

A single-cell analysis pipeline.

Project description

scAnalyzer: A Single-Cell Analysis Toolkit

A Python toolkit for single-cell RNA sequencing (scRNA-seq) analysis.

🚧 Warning this project is under heavy development and not ready for production. ABI changes can happen frequently until reach stable version 🚧

GitHub Black isort

Package version

pip install scAnalysis

🚀 Features

  • Core Data Structure: SingleCellDataset (AnnData-like) for efficient handling of sparse matrices and metadata.
  • Preprocessing: QC metrics, filtering (cells/genes), normalization, log-transformation, and highly variable gene (HVG) selection.
  • Dimensionality Reduction: PCA, t-SNE, and UMAP implementations.
  • Clustering: Graph-based (Leiden, Louvain), geometric (K-Means, Hierarchical), and density-based (DBSCAN) clustering.
  • Differential Expression: Statistical testing (T-test, Wilcoxon) to identify marker genes.
  • Visualization: Publication-ready plots (UMAP, t-SNE, Violin, Dotplot, Heatmap).
  • I/O: Support for 10x Genomics (.mtx), H5AD (.h5ad), and CSV formats.

📦 Installation

Clone the repository and install the required dependencies:

git clone [https://github.com/demirbasayyuce/scAnalyzer.git](https://github.com/demirbasayyuce/scAnalyzer.git)
cd sc_analysis
pip install -r requirements.txt

## ⚡ Quick Start

Here is a minimal example of how to run a full analysis pipeline:

```python
import sc_io as io
import preprocessing as pp
import dimensionality as dim
import clustering as cl
import visualization as vis

# 1. Load Data
data = io.read_10x_mtx('./data/pbmc3k/')

# 2. Preprocess
pp.filter_cells(data, min_genes=200, max_pct_mito=5.0)
pp.normalize_total(data)
pp.log1p(data)
pp.highly_variable_genes(data, n_top_genes=2000)
pp.scale(data)

# 3. Embed & Cluster
dim.run_pca(data)
dim.neighbors(data)
dim.run_umap(data)
cl.cluster_leiden(data, resolution=0.5)

# 4. Visualize
vis.plot_umap(data, color='leiden', save='umap_clusters.png')

📂 Project Structure

  • core.py: Main data structure (SingleCellDataset).
  • preprocessing.py: Filtering, normalization, and scaling functions.
  • dimensionality.py: PCA, Neighborhood Graph, t-SNE, UMAP.
  • clustering.py: Community detection algorithms.
  • differential.py: Marker gene identification.
  • visualization.py: Plotting functions.
  • sc_io.py: Input/Output handlers.
  • utils.py: Helpers for merging and subsampling.

🧪 Running Tests

The project includes a comprehensive suite of unit tests. Run them using:

python -m unittest discover test

📄 License

MIT 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

scanalysis-0.1.4.tar.gz (49.0 kB view details)

Uploaded Source

Built Distribution

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

scanalysis-0.1.4-py3-none-any.whl (62.2 kB view details)

Uploaded Python 3

File details

Details for the file scanalysis-0.1.4.tar.gz.

File metadata

  • Download URL: scanalysis-0.1.4.tar.gz
  • Upload date:
  • Size: 49.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.19

File hashes

Hashes for scanalysis-0.1.4.tar.gz
Algorithm Hash digest
SHA256 a5be2a75ab19e03bec3d55b1cee6c232dc3a2a2e52bdfe1eb6595f48180b89d1
MD5 895774507a78de37b5d00f818ef9df66
BLAKE2b-256 608fd8f2142053cfd9c73b87e22af1735473760ced7e4e37be160c2520d73bd4

See more details on using hashes here.

File details

Details for the file scanalysis-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: scanalysis-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 62.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.19

File hashes

Hashes for scanalysis-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 3f2cea17857491e293f4f8c938e09c6d16a95b8eb4f1b9ff031dc36b49b15ee6
MD5 595157dc3a8db8917d55f718dd46a828
BLAKE2b-256 4a998a41e1cf1bfbfc8b5683cdd08a6be9c898facf73fc779e57b95848331c63

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