Skip to main content

raw2isa

raw2isa is a parser/converter that translates Thermo Fisher Scientific .raw mass spectrometry files into the ISA-Tab format (Investigation–Study–Assay with TAB separated values).

It is the Thermo RAW counterpart of mzml2isa: given a folder of .raw files, it extracts the acquisition metadata of every file and pre-populates the ISA investigation, study and assay files with it, so that only the metadata that cannot be found in the RAW files (organism, contacts, publications, ...) has to be filled in manually.

Metadata extraction is powered by epyraw, a Python wrapper around Thermo Fisher's RawFileReader .NET library, which requires a .NET 8 runtime to be available on the system.

Features

For every .raw file in the input folder, raw2isa extracts:

  • Sample metadata: sample name, sample type (blank/standard/QC), injection volume, comments;
  • Instrument metadata: instrument model (resolved to a PSI-MS controlled vocabulary term, along with its manufacturer), serial number, acquisition software version;
  • Acquisition metadata: scan polarity, scan m/z range, time range, number of scans, mass analyzer, ion source, spectrum representation (centroid/profile), data file content (MS1/MSn), acquisition date and operator — mostly parsed from the Thermo scan filter strings and resolved to PSI-MS terms.

and writes:

  • i_Investigation.txt — the ISA investigation file;
  • s_<study_id>.txt — the ISA study file, one row per sample;
  • a_<study_id>[_POL]_metabolite_profiling_mass_spectrometry.txt — the ISA assay file(s), split by scan polarity by default.

The generated ISA-Tab validates with zero errors with the ISA-API (isatools.isatab.validate); remaining warnings concern metadata that cannot be extracted from RAW files and has to be filled in manually (see below).

Installation

raw2isa and its dependency epyraw are available on PyPI:

pip install raw2isa

The underlying Thermo Fisher RawFileReader assemblies target .NET 8, so a .NET 8 runtime is required (recent Mono versions may also work):

# Ubuntu/Debian: install the .NET 8 runtime (or use your package manager)
curl -sSL https://dot.net/v1/dotnet-install.sh | bash -s -- --channel 8.0 --runtime dotnet --install-dir ~/.dotnet

epyraw download  # fetch the RawFileReader .NET assemblies

Usage

Command line:

raw2isa -i IN_PATH -o OUT_PATH -s STUDY_ID [options]
Option Description
-i input folder containing Thermo RAW files (required)
-o output folder in which the ISA-Tab files will be created (required)
-s study identifier, e.g. MTBLSxxx (required)
-m additional user-provided metadata (JSON file, XLSX file or JSON string)
-j number of parallel jobs used for parsing the RAW files
-n do NOT split assay files based on scan polarity
-t directory containing custom template files
-v show more output

Programmatic use:

from raw2isa.parsing import convert

convert("raw_files/", "out_folder/", "MTBLS1234")

Development with uv

The project is managed with uv. Clone the repository and set up the environment with:

uv sync                             # create .venv, install raw2isa (editable) + dev tools
uv sync --group test --group pb    # also install isatools and the tqdm progress bar

Common tasks:

uv run raw2isa --help               # run the CLI
uv run pytest                       # run the test suite
uv run --group test --group pb pytest  # ... including the isatools validation tests
uv run ruff check raw2isa tests     # lint
uv lock                             # update the lockfile

The test suite needs a Thermo RAW file to run the online tests; it uses the sample.raw bundled with a local checkout of epyraw (~/dev/epyraw/tests/testdata/sample.raw), or the file pointed to by the RAW2ISA_TEST_RAW environment variable.

User-provided metadata

RAW files only contain acquisition-related metadata; the biological and administrative metadata (organism, contacts, publications, protocol descriptions, chromatography instrument, ...) can be provided in a separate file with the -m flag, either as JSON:

{
    "characteristics": {
        "organism": {
            "name": "Mus musculus",
            "ref": "NCBITAXON",
            "accession": "http://purl.bioontology.org/ontology/NCBITAXON/10090"
        }
    },
    "study": {
        "title": "My study",
        "description": "..."
    },
    "study_contacts": [
        {
            "last_name": "Doe",
            "first_name": "Jane",
            "email": "jane.doe@example.org",
            "affiliation": "University of Example",
            "roles": {
                "name": "principal investigator",
                "ref": "PRO",
                "accession": "http://purl.obolibrary.org/obo/PRO_000000001"
            }
        }
    ]
}

or as an XLSX file; a template can be generated with python -m raw2isa.usermeta (writes usermeta.xlsx to the current directory).

License

raw2isa is distributed under the GNU General Public License version 3.0 (GPLv3); see the COPYING file. It is derived from mzml2isa, by Tom Lawson and Martin Larralde, also GPLv3.

Metadata

Release files for raw2isa 0.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 raw2isa 0.1.0
File Size Uploaded Provenance Actions
raw2isa-0.1.0.tar.gz 260.8 kB With provenance Details for raw2isa-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for raw2isa 0.1.0
File Interpreter ABI Platform Actions
raw2isa-0.1.0-py3-none-any.whl Python 3 none any Details for raw2isa-0.1.0-py3-none-any.whl

Total release size: 518.2 kB

Release files / raw2isa-0.1.0.tar.gz

Download URL raw2isa-0.1.0.tar.gz
Size 260.8 kB
Tags Source
SHA-256 checksum
How to use checksums
9a5af02a0d9f7802cf336b2f4b1bf6750c95eb9f22efc77e42688a35bb99e95c
BLAKE2b-256 checksum
How to use checksums
2ca85800ce5942db5ce8cf1ea3d6822e24216bb829a4031cecc60b1746cf9e19
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.

Transparency log

Release files / raw2isa-0.1.0-py3-none-any.whl

Download URL raw2isa-0.1.0-py3-none-any.whl
Size 257.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
81e3cf05ddb20268b3c71871abf25b5a35a9967f350875d1f8b479735d36ec3e
BLAKE2b-256 checksum
How to use checksums
95eb5635d01e6bc0f78ebe94bb18337010b465c2d9a4eff4e9d2986b0832a7fe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.

Transparency log

Security for raw2isa 0.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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for raw2isa-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.

Transparency log

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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

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