Skip to main content

msconvert-cli

Python CLI wrapper for ProteoWizard's MS-Convert that runs in Docker containers. Convert mass spectrometry files (.raw, .wiff, .d, etc.) to mzML/MGF/... formats with parallel processing.

Installation

pip install msconvert-cli

Recommended: Install with pipx for isolated environments:

pipx install msconvert-cli

Requirements: Docker must be installed and running.

Quick Start

# Convert with preset config
mscli /path/to/data/ -o ./output --sage

# Parallel processing (1 file per worker for Wine stability)
mscli /data/*.raw -o ./output --casanovo --workers 4

# With resource limits
mscli /data/*.raw -o ./output --sage --workers 4 --worker-cores 2.0 --worker-memory 4g

Presets

Pre-configured msconvert settings for common tools:

Preset Format Details
--sage mzML 32-bit, zlib/gzip compression
--biosaur mzML Standard format
--blitzff mzML MS1 only, 32-bit, zlib/gzip
--casanovo mzML MS2 only, m/z [50-2500], denoised, top 200 peaks
--casanovo_mgf MGF Same as casanovo, MGF format

Use custom configs with -c my_config.txt or pass msconvert args directly.

Common Options

-o, --output-dir DIR      Output directory (required)
-w, --workers N          Number of parallel workers (default: 1)
-v, --verbose            Enable detailed logging
--log FILE               Custom log file path
-c, --config FILE        Custom msconvert config file

# Docker resource limits per worker
--worker-cores N         CPU cores (e.g., 2.0, 0.5)
--worker-memory SIZE     RAM limit (e.g., 4g, 2048m)
--worker-swap SIZE       Swap limit (set equal to memory to disable)
--worker-shm-size SIZE   Shared memory (default: 512m, increase for large files)

Examples

# Basic conversion
mscli file.raw -o ./output --sage

# Directory with parallel processing
mscli /data/raw_files/ -o ./output --blitzff --workers 4

# Custom config file
mscli file1.raw file2.raw -o ./output -c my_config.txt

# Verbose logging
mscli /data/*.raw -o ./output --casanovo -v

# Resource-limited workers
mscli /data/*.raw -o ./output --sage \
  --workers 4 \
  --worker-cores 2.0 \
  --worker-memory 4g \
  --worker-swap 4g

# Specific Docker image version
mscli data.raw -o ./output --sage \
  --docker-image proteowizard/pwiz-skyline-i-agree-to-the-vendor-licenses:3.0.23310

Supported Formats

.raw, .wiff, .wiff2, .d, .baf, .fid, .yep, .tsf, .tdf, .mbi, .lcd, .ms, .cms1, .ms1, .cms2, .ms2, .t2d

Development

# Setup
git clone https://github.com/pgarrett-scripps/msconvert-cli.git
cd msconvert-cli
uv sync

# Quality checks
make check    # Run linters and type checking
make format   # Format code with ruff
make test     # Run tests

# Run locally
uv run mscli --help

License

Apache 2.0 - ProteoWizard license applies to the Docker image.

https://proteowizard.sourceforge.io/index.html

Citation

If using ProteoWizard, please cite: A cross-platform toolkit for mass spectrometry and proteomics. Chambers, M.C., MacLean, B., Burke, R., Amode, D., Ruderman, D.L., Neumann, S., Gatto, L., Fischer, B., Pratt, B., Egertson, J., Hoff, K., Kessner, D., Tasman, N., Shulman, N., Frewen, B., Baker, T.A., Brusniak, M.-Y., Paulse, C., Creasy, D., Flashner, L., Kani, K., Moulding, C., Seymour, S.L., Nuwaysir, L.M., Lefebvre, B., Kuhlmann, F., Roark, J., Rainer, P., Detlev, S., Hemenway, T., Huhmer, A., Langridge, J., Connolly, B., Chadick, T., Holly, K., Eckels, J., Deutsch, E.W., Moritz, R.L., Katz, J.E., Agus, D.B., MacCoss, M., Tabb, D.L. & Mallick, P. Nature Biotechnology 30, 918-920 (2012).

Metadata

Release files for msconvert-cli 1.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 msconvert-cli 1.1.0
File Size Uploaded Provenance Actions
msconvert_cli-1.1.0.tar.gz 21.8 MB Without provenance Details for msconvert_cli-1.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for msconvert-cli 1.1.0
File Interpreter ABI Platform Actions
msconvert_cli-1.1.0-py3-none-any.whl Python 3 none any Details for msconvert_cli-1.1.0-py3-none-any.whl

Total release size: 21.8 MB

Release files / msconvert_cli-1.1.0.tar.gz

Download URL msconvert_cli-1.1.0.tar.gz
Size 21.8 MB
Tags Source
SHA-256 checksum
How to use checksums
b7da72165e05758f37441d3c798354a42f18f1e319c1d35951db47e5b20123a6
BLAKE2b-256 checksum
How to use checksums
a19e5453a76f6a06f2d2d5dcdfeb8c1edd119e5e515a451d80130f5ee27f3e69
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.6.14

Release files / msconvert_cli-1.1.0-py3-none-any.whl

Download URL msconvert_cli-1.1.0-py3-none-any.whl
Size 12.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1ef15e5354cc6dae0e2a0f555526e4010bfc0bc7e2739019258f2324f13f7a6c
BLAKE2b-256 checksum
How to use checksums
d3826be33df8f398ccf7be293b427d47b7b6c9d260ea0c658c8696648b9e4e34
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.6.14

Security for msconvert-cli 1.1.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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