Skip to content

mstransfer

Transfer mass spectrometry files (mzML / MSZ / MSZX) between machines over HTTP. Files always travel in compressed MSZ format using mscompress: mzML sources are compressed on the fly while they upload, with no temp files on the sender, and the receiver can store them as MSZ or decompress them back to mzML.

# On the receiving machine
mstransfer serve --port 1319 --store-as msz

# On the sending machine
mstransfer upload /data/experiment1.mzML /data/batch/ remote-host:1319

What's included

  • CLI: mstransfer serve, upload, and download, with parallel transfers and Rich progress bars. See CLI.
  • Python client: send_file / send_batch and download_file / download_batch, each with an async_ variant. See Python guides.
  • Embeddable server: a FastAPI app factory and router with pluggable authentication and file discovery. See Server.

How it works

flowchart LR
    subgraph Sender
        mzML[".mzML"] --> compress["compress_stream()"]
        msz[".msz / .mszx"] --> read["read file"]
    end

    compress --> upload["POST /v1/upload<br/>(MSZ bytes)"]
    read --> upload

    subgraph Server
        upload --> mode{store-as?}
        mode -- msz --> write["write .msz to disk"]
        mode -- mzml --> temp["write temp .msz"]
        temp --> decompress["decompress to .mzML"]
        decompress --> cleanup["remove temp .msz"]
    end

Where to go next

For LLMs and coding agents

These docs are also published as Markdown, which models read far more reliably than HTML: