Skip to main content

peacoqc-py

Python bindings for peacoqc-rs flow cytometry quality control.

What this crate is for

Use peacoqc-py when you want PeacoQC from Python (PyO3 + Polars) without rewriting the QC pipeline. The Rust algorithm crate remains the source of truth.

Use a sibling instead when you need:

Note: This package may sit outside the root Cargo workspace members; build via its own Cargo.toml / maturin (or project) workflow.

How it works

A cdylib named peacoqc wraps peacoqc-rs (with flow-fcs) and exposes QC entry points to Python, bridging event tables through Polars/pyo3-polars.

Related crates

  • peacoqc-rs — algorithm implementation
  • flow-fcs — FCS loading behind the bindings
  • flow-density — intended shared KDE (PeacoQC still vendors density today)

Demo / API

Build from this directory with your usual PyO3/maturin flow (see crate Cargo.toml). Version 0.1.0. Prefer calling into the same config/result concepts as peacoqc-rs (PeacoQCConfig, good-cell masks, exports).

import polars as pl
import peacoqc

# Load your data as a polars DataFrame
df = pl.read_csv("events.csv")

# Run PeacoQC quality control
result = peacoqc.run_qc(
    df,
    channels=["FL1-A", "FL2-A"],
    channel_ranges={"FL1-A": (0.0, 262144.0), "FL2-A": (0.0, 262144.0)},
)
print(f"Removed {result.percentage_removed:.2f}% of events")

# Apply the mask to filter good cells
good_mask = result.good_cells
clean_df = df.filter(pl.Series(good_mask))

Performance

Same algorithmic costs as peacoqc-rs; Python overhead is binding/conversion only. GPU features follow the Rust crate defaults when enabled at build time.

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

peacoqc_rs-0.1.0.tar.gz (477.0 kB view details)

Uploaded Source

Built Distributions

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

peacoqc_rs-0.1.0-cp39-abi3-win_amd64.whl (8.1 MB view details)

Uploaded CPython 3.9+Windows x86-64

peacoqc_rs-0.1.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (9.6 MB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ x86-64

peacoqc_rs-0.1.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (8.5 MB view details)

Uploaded CPython 3.9+manylinux: glibc 2.17+ ARM64

peacoqc_rs-0.1.0-cp39-abi3-macosx_11_0_arm64.whl (6.8 MB view details)

Uploaded CPython 3.9+macOS 11.0+ ARM64

peacoqc_rs-0.1.0-cp39-abi3-macosx_10_12_x86_64.whl (7.7 MB view details)

Uploaded CPython 3.9+macOS 10.12+ x86-64

File details

Details for the file peacoqc_rs-0.1.0.tar.gz.

File metadata

  • Download URL: peacoqc_rs-0.1.0.tar.gz
  • Upload date:
  • Size: 477.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: maturin/1.14.1

File hashes

Hashes for peacoqc_rs-0.1.0.tar.gz
Algorithm Hash digest
SHA256 72a985e0bf5bc318481620dfc776fca150d62c85124ab83a040ca23cd5bfc72e
MD5 0fbd5caa0173b0e9b9a98608cc1423c7
BLAKE2b-256 15fc5106a079bf89ca73c8b4418872ac89e320429ebdc0fae4261273a23b3389

See more details on using hashes here.

File details

Details for the file peacoqc_rs-0.1.0-cp39-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for peacoqc_rs-0.1.0-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 ac35e26e03d0dc46a763a9cd0ab73e9b9203797a6d625fa402509c0746f6f632
MD5 8b95f6d46fda8aedcd554d0aabb9179e
BLAKE2b-256 11df754523c95a033a36356bfb9c31aca5528c860cfc7c243286ba67eed88d63

See more details on using hashes here.

File details

Details for the file peacoqc_rs-0.1.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for peacoqc_rs-0.1.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d49e39d6214c151d55fb3e98b838a36ef99fc5d46a199570eedf0c52493aa6f8
MD5 36c94c56c0565ad0b3ad67532a50894c
BLAKE2b-256 762fbb0df65aadd472aa02454d38dbb9a1a90112bdfac41e106c8698cdffaf35

See more details on using hashes here.

File details

Details for the file peacoqc_rs-0.1.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for peacoqc_rs-0.1.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 1a41a47b78acab8452c9c9abc8acbb647f706dbbe0664e86717bbf4d86b09430
MD5 ed26d8b6c3c9580b60d6169c738f0892
BLAKE2b-256 743492376f44f14dda8c49cdaa62a150cf1216dc7c36378e2facb2a8bebe47e6

See more details on using hashes here.

File details

Details for the file peacoqc_rs-0.1.0-cp39-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for peacoqc_rs-0.1.0-cp39-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4f049bc95db16dde798ac6a3a489066db61f9c322a2c1887957afb1788763d0e
MD5 7dc942fe58f7571c9eb75980b19e248f
BLAKE2b-256 f8d2cf9a8027f1cc6928547e03f51d0c324a2684043fac0bc6d3154081d3b177

See more details on using hashes here.

File details

Details for the file peacoqc_rs-0.1.0-cp39-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for peacoqc_rs-0.1.0-cp39-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 ea69e310daeaf4004c0f05003ecac79f012daaa195c582ef88024b7e246d65ec
MD5 0a1675f418e452a0016dfd8d9af0bb3a
BLAKE2b-256 5b348e4234cbf8e888e0cb068840b13a01fa251cb36286703c63c8a1fbcd4621

See more details on using hashes here.

Release history Release notifications | RSS feed

0.1.2

6 files

0.1.1

6 files

This release

0.1.0 This release

6 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