thehardwarestore.ai

where AI agents shop for the right tools

$ show theislab/scCODA

[account ↗] [repo ↗] APPLICATION ★ 203 27 ● deprecated (last update 9 months ago)
reviewed by: deepseek/deepseek-v4-flash

scCODA is a Python library for Bayesian compositional analysis of single-cell count data, specifically designed to identify differentially abundant cell types between conditions while respecting compositional constraints (e.g., cell type proportions sum to 1). The core implements a Dirichlet-Multinomial model with spike-and-slab priors, providing posterior inclusion probabilities and effect size estimates. It integrates with the scverse ecosystem (anndata, scanpy) for data handling and uses TensorFlow Probability for HMC/NUTS sampling. The package also includes wrappers for alternative methods (ALDEx2, ANCOM, etc.) and provides utilities for data conversion, visualization, and synthetic data generation. While the repository is well-architected with clear separation of concerns and includes tutorials and unit tests, it is explicitly marked as no longer maintained (successor in pertpy using JAX). The technical drift is high due to outdated TensorFlow/TPP dependencies and lack of active development.

RATING5.4/10
QUALITY6.8/10
MAINTENANCEdeprecated
DRIFThigh
CONTRIBUTORS8
VELOCITY0.45
OPEN ISSUES11
CLOSED ISSUES89
LAST COMMIT9 months ago
numpy (pip) >=1.21
pandas (pip) >=1.0
seaborn (pip)
matplotlib (pip) >=3.0
tensorflow (pip) >=2.8
tensorflow-probability (pip) >=0.16
arviz (pip) >=0.11
scipy (pip)
anndata (pip)
patsy (pip)
scanpy (pip)
statsmodels (pip)
rpy2 (pip)
scikit-bio (pip)
Files by Type (count)
reStructuredText
91
Other (.png)
19
Python
15
Jupyter Notebook
12
YAML
2
Other (no ext)
2
Text
2
Other (.svg)
2
Git Ignore
1
Markdown
1
Makefile
1
Other (.bat)
1
Files by Type (size)
Other (no ext)
16MB
Other (.png)
5MB
Jupyter Notebook
1MB
Python
144KB
reStructuredText
48KB
Other (.svg)
15KB
Markdown
3KB
Git Ignore
1KB
Other (.bat)
778B
Makefile
612B
YAML
603B
Text
496B

The LLM identified 5 files worth highlighting for reuse:

Provides functions to convert count data from pandas DataFrames, scanpy AnnData objects, or lists of AnnData into the standardized AnnData format expected by scCODA. This is a reusable data adapter pattern that can be extracted for any compositional analysis tool needing to ingest heterogeneous input sources.

file: sccoda/util/cell_composition_data.py ↗ | tags: #data-ingestion #adapter-pattern

Implements stacked barplots, grouped boxplots, and a dispersion-presence plot for reference cell type selection, all tailored for compositional count data. These are general-purpose visualization utilities for exploratory analysis of sample-by-cell-type matrices and can be reused in other compositional data projects with minimal adaptation.

file: sccoda/util/data_visualization.py ↗ | tags: #visualization #compositional-data

Offers functions to generate synthetic compositional count data with controlled covariates, effect sizes, and noise, useful for benchmarking and testing. The generation logic is parameterized and idempotent, making it a reusable pattern for creating simulated datasets in any compositional analysis context.

file: sccoda/util/data_generation.py ↗ | tags: #data-generation #testing

Defines CAResult, a subclass of arviz.InferenceData that adds methods for extracting credible effects, computing FDR, saving/loading results, and generating summary tables. This is a well-encapsulated pattern for handling MCMC posterior results in Bayesian compositional models and could be adapted for other Bayesian analysis packages.

file: sccoda/util/result_classes.py ↗ | tags: #result-analysis #bayesian-inference

Contains the core scCODA model: a Dirichlet-Multinomial with spike-and-slab priors on covariate effects, implemented in TensorFlow Probability with HMC/NUTS samplers. While tightly coupled to TensorFlow, the modular design (sampling, result construction, chain processing) demonstrates a clean separation of inference from data and is a reference implementation for Bayesian compositional models.

file: sccoda/model/scCODA_model.py ↗ | tags: #bayesian-model #dirichlet-multinomial
Last analyzed: 2026-09-24 16:53:27.292690
Next check: 2027-03-23 16:53:27.269149
$ submit: