Skip to main content

Buscar

Buscar Logo

DOI Python

About

Buscar (Bioactive Unbiased Single-cell Compound Assessment and Ranking) is an open-source Python package for reproducible perturbation hit calling in high-content screening that operates directly on distributions of single-cell image-based profiles. The name is also a play on the Spanish and Portuguese verb "buscar," meaning "to search" or "to seek," reflecting the framework's core goal of identifying biologically active perturbations. Traditional high-content screening approaches rely on population-based aggregated profiles to evaluate compound-induced morphological activity, which obscures the biological heterogeneity present across individual cells within a treatment group. Buscar addresses this limitation by operating directly on single-cell profiles, enabling a more nuanced and interpretable assessment of perturbation activity.

Buscar requires two reference populations defining distinct morphology states, for example diseased and healthy cells. It uses these populations to separate the high-dimensional feature space into two complementary, mutually exclusive signatures: an on-morphology signature (features that differ significantly between the reference and target states) and an off-morphology signature (features that remain unchanged). This separation enables the independent tracking of perturbation efficacy and specificity for every perturbation in a given screen. Buscar is designed to be compatible with the Cytomining Ecosystem, ensuring seamless interoperability with tools like Pycytominer, coSMicQC, and CytoTable. All analysis conducted in this project can be found in the Buscar-benchmark-analysis repository.

Implementation

buscar-framework

Figure: Figure: Schematic overview of the Buscar framework, highlighting its two main modules and their roles in perturbation hit calling.

Module Description
Defining morphology signatures Establishes the morphology reference for evaluating perturbations by comparing two control populations: a reference state (e.g., disease cells) and a target state (e.g., healthy cells). Non-parametric statistical tests (e.g., Kolmogorov-Smirnov test) are applied per feature with FDR correction to assign features to either an on-morphology signature (features significantly altered between states) or an off-morphology signature (features that remain unchanged). These signatures define which morphologies must change for a perturbation to achieve efficacy and which serve as indicators of off-target activity.
Perturbation efficacy and specificity scoring Scores each perturbation by computing two complementary metrics. The on-Buscar score quantifies efficacy by measuring the Earth Mover's Distance (EMD) between the perturbed and target single-cell populations using the on-morphology signature features, where a lower score indicates greater phenotypic rescue. The off-Buscar score quantifies specificity by measuring the proportion of off-morphology signature features that become significantly altered under perturbation, where a lower score indicates fewer off-target effects.

Installation

Install from PyPI

Install Buscar with pip:

pip install buscar

Or add it to a uv-managed project:

uv add buscar

Install from source

To install the current repository version:

uv add "buscar @ git+https://github.com/WayScience/buscar.git"

Development

Buscar uses uv for environment and package management.

  1. Clone the repository
git clone https://github.com/WayScience/buscar.git
cd buscar
  1. Create the development environment
uv sync --frozen --group dev
  1. Run tests
uv run --frozen pytest
  1. Run tests with coverage
uv run --frozen pytest --cov=buscar --cov-report=term-missing --cov-report=xml --cov-report=html
  1. Run linting and formatting checks
pre-commit run --all-files

See CONTRIBUTING.md for contribution guidelines and the full local development checklist.

Build and validate

Build the source distribution and wheel:

uv build

Validate the package metadata:

uv run --frozen twine check dist/*

Install the built wheel in an isolated environment to verify the package import:

uv run --isolated --no-project --with ./dist/buscar-*.whl -- \
  python -c "import buscar; print(buscar.__name__, buscar.__version__)"

Package metadata and dependencies are defined in pyproject.toml; the uv lockfile is used for reproducible local and CI development environments.

Notes

Parallel Processing Issue: The on-Buscar score utilizes Earth Mover's Distance (EMD) via the Python Optimal Transport (POT) library. There is a known upstream issue where multithreading significantly degrades performance, causing calculations to be extremely slow.

Recommendation: We strongly recommend running on-Buscar scoring in single-threaded mode until this is resolved in the core POT library.

Metadata

Release files for buscar 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for buscar 0.1.0
File Size Uploaded
buscar-0.1.0.tar.gz 27.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for buscar 0.1.0
File Interpreter ABI Platform
buscar-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 43.3 kB

Release files / buscar-0.1.0.tar.gz

Download URL buscar-0.1.0.tar.gz
Size 27.5 kB
Tags Source
SHA-256 checksum
How to use checksums
18ad92a6e6b39519281eac99ea5359664c2914ea2ed188e90d33dbbfaa1787f5
BLAKE2b-256 checksum
How to use checksums
3b3bbc8b226204674301e887d15dffb70f038c653e7c57baa042480a87fa663d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 1, 2026.

Transparency log

Release files / buscar-0.1.0-py3-none-any.whl

Download URL buscar-0.1.0-py3-none-any.whl
Size 15.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6661ec5c60e66fd8db3294374afaabdcd96d55992f54d5129869d859326aa8b2
BLAKE2b-256 checksum
How to use checksums
773779a0d435724030d71ea24dc2d34c175ebd755f83a1c90f2a475c26ecdc54
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 1, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page