Skip to main content

MaldiSuite: a Python ecosystem for MALDI-TOF spectral processing and analysis in antimicrobial resistance research

Project description

MaldiSuite

Website PyPI meta-package Python License: MIT

MaldiSuite

A Python ecosystem for MALDI-TOF spectral processing and analysis in antimicrobial resistance research

MaldiSuite combines preprocessing, batch effect correction, and deep learning classifiers in a single sklearn-compatible workflow for clinical microbiology and computational biology research.

Landing page: MaldiSuite


What this repository contains

This repository serves two purposes:

  1. Landing page for the website.
  2. Meta-package: a minimal PyPI package (maldisuite) that installs the three packages of the suite with pinned compatible versions.

This repository does not contain the source code of the three packages. Each package lives in its own repository, with its own issues, documentation, and release cycle.

The three packages

MaldiAMRKit owns the data model, preprocessing, evaluation, and biomarker / drift modules; MaldiBatchKit re-exports every corrector (ComBat variants, Limma, Harmony, MALDI-specific harmonisers) at the top level; MaldiDeepKit ships scikit-learn-compatible deep classifiers (MaldiMLPClassifier, MaldiCNNClassifier, MaldiResNetClassifier, MaldiTransformerClassifier).

Logo Package Purpose Repository
MaldiAMRKit MaldiAMRKit Preprocessing, evaluation, biomarkers, drift monitoring MaldiAMRKit
MaldiBatchKit MaldiBatchKit Batch effect correction for mass spectra MaldiBatchKit
MaldiDeepKit MaldiDeepKit Deep learning classifiers for MALDI-TOF spectra MaldiDeepKit

Installation

Install the full suite with a single command:

pip install maldisuite

This installs maldiamrkit, maldibatchkit, and maldideepkit at compatible versions.

Alternatively, install individual packages separately:

pip install maldiamrkit     # preprocessing, biomarkers, drift
pip install maldibatchkit   # batch effect correction
pip install maldideepkit    # deep learning classifiers

Quick start

from maldiamrkit import MaldiSet
from maldiamrkit.evaluation import CaseGroupedKFold, vme_scorer
from maldibatchkit import BatchAwareWarping, ComBat
from maldideepkit import MaldiMLPClassifier
from sklearn.pipeline import Pipeline
from sklearn.model_selection import cross_val_score

data = MaldiSet.from_directory("driams/", "meta.csv", bin_width=3)
batch = data.meta["batch"]

pipe = Pipeline([
    ("warp",   BatchAwareWarping(batch=batch)),
    ("combat", ComBat(batch=batch, method="fortin")),
    ("clf",    MaldiMLPClassifier(input_dim=data.X.shape[1], random_state=0)),
])

scores = cross_val_score(
    pipe, data.X, data.get_y_single("Drug"),
    scoring=vme_scorer,
    cv=CaseGroupedKFold(n_splits=5),
    groups=data.meta["patient_id"],
)

Citation

Citation will be available soon.

License

MIT License - see LICENSE for the full text.

Acknowledgments

MaldiSuite builds on the work of the mass spectrometry and clinical microbiology communities. In particular, we acknowledge:

  • MALDIquant (Gibb & Strimmer, 2012, Bioinformatics)
  • The Borgwardt Lab and the DRIAMS benchmark (Weis et al., 2022, Nature Medicine), which established Python-based MALDI-TOF AMR prediction as a research area

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

maldisuite-0.1.0.tar.gz (5.9 kB view details)

Uploaded Source

Built Distribution

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

maldisuite-0.1.0-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: maldisuite-0.1.0.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.17

File hashes

Hashes for maldisuite-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a68aab298ffdfd3707a71ec5044232aa84138a0eb2b50264cd96d022b6209527
MD5 b5762195b833ef91ebfac17cbe36e5c0
BLAKE2b-256 02c3cf35204bfbcb3c10f34ef1a4db655d236d854d6305481db48f186bb3245d

See more details on using hashes here.

File details

Details for the file maldisuite-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: maldisuite-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.17

File hashes

Hashes for maldisuite-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5228d6caa881f3b9119b70623bbaddf4ce3c72f329bad87f2266ab34a887d900
MD5 431f4ddc3eb5df2e749da371be01193a
BLAKE2b-256 17b127fb6bed5972c69d43107d5706b462f073108acf3db01f7de74cd476c8ca

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