Skip to content

About

Python helpers for macproqc pipeline

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

MacProQC-Helpers Module

A self-contained Python module that combines multiple mass spectrometry quality control analysis scripts into a unified CLI interface using argparse for macproqc pipeline.

Structure

macproqc/
├── __init__.py              # Package initialization
├── __main__.py              # Entry point for `python -m macproqc`
├── cli.py                   # Main CLI with nested argparse subcommands
├── commands/                # Individual command modules
│   ├── __init__.py
│   ├── ... # actual logic and their partial CLI
└── utils/                   # Shared utilities
    ├── __init__.py
    └── hdf5.py              # HDF5 helper functions

Installation

From the module directory:

pip install -e .

Or for development with additional tools:

pip install -e ".[dev]"

Or via docker

docker build -t mpc/macproqc-helpers:dev .

Usage

As a command-line tool:

macproqc-helpers --help
macproqc-helpers adjust-comet-params --help
macproqc-helpers combine-hdf5 --help

Run from Python directly:

python -m macproqc_helpers --help
python -m macproqc_helpers combine-hdf5 -hdf_out_name output.hdf5 file1.hdf5 file2.hdf5

Testing

Install the dev extras (includes pytest), then run the test suite from the module directory:

pip install -e ".[dev]"
pytest

Run a single test file or test case:

pytest tests/test_collect_metrics_from_mzml.py
pytest tests/test_collect_metrics_from_mzml.py::test_metrics_match_reference -v

Development

Formatting, linting and type checking use ruff and ty (installed via the dev extras, configured in pyproject.toml). These also run in CI on every pull request and in the merge queue (.github/workflows/checks.yml).

pip install -e ".[dev]"

ruff format src tests    # auto-format
ruff check src tests     # lint
ty check                 # type check

About

Python helpers for macproqc pipeline

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages