Skip to content

seed Command Line

The seed CLI is a single binary with 18 subcommands for inspecting, exporting, and converting mass spectrometry files.

Synopsis

bash
seed <subcommand> [arguments] [options]

Run seed --help for the top-level help, or seed <subcommand> --help for per-subcommand options.

Subcommand index

SubcommandPurpose
infoPrint summary metadata (instrument, scan count, RT range)
scanExport a single scan as JSON
streamsList OLE2 container streams (RAW only)
ticExport the Total Ion Chromatogram as CSV
xicExport Extracted Ion Chromatogram(s) as CSV — single or multi-target, single file
batch-xicMulti-file XIC extraction; emits an aligned RT-grid tensor as CSV
ms2-spectraExtract MS2 fragment spectra for a precursor m/z (DDA)
trailerShow trailer extra data for a scan (RAW only)
status-logExtract instrument status log fields (RAW only)
devicesList instrument devices (controllers) in the file
device-ticExtract per-device traces (pump pressure, UV, etc.)
validateValidate output against ground-truth data
benchmarkPerformance benchmark — read all scans, optionally measure XIC
bench-concurrencySweep concurrency levels for batch-XIC tuning
convertConvert MS files to mzML
scansDump per-scan metadata to an Arrow IPC file
debugDump internal addresses and sanity checks
diagnoseStage-by-stage parsing report (non-cascading)

Common flags

Most subcommands accept these:

FlagDescription
-o, --output PATHWrite to file instead of stdout
-n, --number NScan number (for scan, trailer)
--ppm FLOATMass tolerance for XIC and MS2 extraction (default 5.0)

For Thermo-specific flags like --filter-shoulders and --shoulder-ratio, run seed scan --help or seed xic --help; these options support reproduction of .NET RawFileReader centroid post-processing.

Recipes

1 — Convert RAW to mzML

bash
seed convert sample.RAW
# → sample.mzML in the same directory

seed convert sample.RAW -o /scratch/converted/sample.mzML
seed convert /data/study/                # folder mode, parallel across files

Compression and precision are tunable: --mz-bits 64, --intensity-bits 32, --compression zlib|none. See seed convert --help for the full surface, including --no-index for non-indexed mzML output.

2 — XIC extraction (single file)

bash
# Several m/z values in a single scan pass:
seed xic sample.RAW --mz 524.2646,612.3401,445.1234 --ppm 5

# m/z values from a file (one per line):
seed xic sample.RAW --mz-file targets.txt --ppm 5 -o xics.csv

# By formula + adduct:
seed xic sample.RAW --formula C17H18FN7O7 --adduct "[M-H]-" --ppm 5

# Restrict to MS1 (much faster on DDA data):
seed xic sample.RAW --mz 524.26 --ms1-only

For extraction across many files into an aligned RT-grid tensor, use batch-xic (next recipe).

3 — Batch XIC across many files

bash
# Single target across a folder:
seed batch-xic --files data/*.RAW --mz 524.26 --ppm 5 -o tensor.csv

# Many targets from a file:
seed batch-xic --files data/*.RAW --mz-file targets.txt --ppm 5 -o tensor.csv

Output is one CSV row per (file, target, RT) triple. This command is the recommended documented path for batch XIC extraction in the SEED user manual.

4 — Quick file inspection and benchmark

bash
seed info sample.RAW                     # summary metadata
seed devices sample.RAW                  # list instrument controllers
seed benchmark sample.RAW --xic --ops    # measure scan-decode + XIC perf

seed benchmark writes JSON to stdout; pipe to jq for human-readable output. Use bench-concurrency to estimate the optimal --max-concurrent value for the storage tier (SSD vs NAS vs SMB).

Lifecycle and exit codes

seed subcommands exit 0 on success, 1 on parse errors, and 2 on I/O / validation failures. seed validate returns a non-zero status when the validation set diverges from ground truth.

LEAF is developed by the Morscher Lab.