Skip to main content

RunAssessor

The RunAssessor package provides functionality for assessing a set of input mass spectrometry proteomics mzML files, extracting all information that can be gleaned from the files prior to any attempt to identify the peptides therein.

Installation

Clone the repo and install dependencies:

git clone https://github.com/edeutsch/RunAssessor.git
cd RunAssesor
pip install -r requirements.txt

Quick Start

RunAssessor processes mass spectrometry data in the .mzML format. .mzML.gz files are also supported.

python ~/RunAssessor/bin/assess_mzMLs.py ~/file_path/mass_spec_data.mzML.gz

RunAssessor can also accept multiple .mzML or '.mzML.gz' files at a time

python ~/RunAssessor/bin/assess_mzMLs.py --write_sdrf_files --verbose *.mzML

Running a quick test

In RunAssessor/tests/data/ there is a small .mzML.gz file that can be used to quickly try RunAssessor

cd tests/data
python ../../bin/assess_mzMLs.py chlo_6_tiny.mzML.gz

There is also a set of larger .mzML.gz files of different kinds that are used to test RunAssessor in RunAssessor/tests/large_files/. You can try RunAssessor on those files. Files in large_files will generate a more substantial JSON and summary file compared to chlo_6_tiny.mzML.gz.

cd tests/large_files
python large_test_file_downloader.py
python ../../bin/assess_mzMLs.py *.mzML.gz   # Or single file of your choice

Usage of the main RunAssessor programs

assess_mzMLs.py

The assess_mzMLs.py program is the main RunAssessor program that accepts a set of input mzML files along with various parameters and processes the mzML files accordingly. This is generally the only program that needs to be executed.

Command-line Arguments

Argument Description Default Example
--metadata_filepath Filename and path of the ouput metadata file. This parameter may be used to change the root name and directory path (relative or absolute) of the output file (affecting the JSON file, the TSV file, optional PDF files and SDRF files) study_metadata.json --metadata_filepath ~/PXD123456/PXD123456_metadata.json
--preserve_existing_metadata If set, read the existing metadata file, preserve its contents, and build on it (default is to overwrite current file). Not set --preserve_existing_metadata
--n_threads Number of files to read in parallel. Number of CPU cores --n_threads 4
--write_fragmentation_type_files If set, writes a fragmentation type file for each mzML input. Not set --write_fragmentation_type_files
--verbose If set, prints more detailed processing information. Use multiple times to increase verbosity. Not set --verbose
--version Prints the version of the script/tool. Not set --version
--write_sdrf_file If set, writes an SDRF file based on the metadata text file. Not set --write_sdrf_file
--include_sdrf_provenance If set, then all information written to the SDRF file will have provenance tags (this is experimental non-standard SDRF, not for routine use). Not set --include_sdrf_provenance
--write_pdfs If set, generates a PDF of delta time and ppm graphs from precursor stats, and a PDF of neutral loss windows from composite intensities. Not set --write_pdfs
--write_ions If set, writes a TSV file of the ion three-sigma table, which lists all fragment ions found. Not set --write_ions
--ms_ms_units Sets units for MS/MS tolerance recommendations: mz or ppm (defaults to ppm for HR and mz for LR) ppm for HR and mz for LR --ms_ms_units mz

assess_metadata.py

The assess_metadata.py program reads an existing study_metadata.json file and recomputes recommended parameters and potentially outputs to different formats. This program is generally not routinely used, but can be helpful if, for example, a large set of input files are analyzed and a study_metadata.json file is written, but the --write_sdrf_file was not provided to assess_mzMLs.py. This tool can take the previous analysis and write out the SDRF file based on the existing JSON file, without reprocessing all mzML files again.

Command-line Arguments

Argument Description Default Example
--metadata_file Specify a metadata file if different than the default. study_metadata.json --metadata_file ~/file_path/custom_metadata.json
--write_sdrf_file If set, writes an SDRF file based on the metadata file. Can be passed multiple times. Not set --write_sdrf_file
--verbose If set, enables verbose output. Use multiple times to increase verbosity. Not set --verbose

rename_msruns.py

Renames raw files in current directory to replace special characters in filenames with underscores and writes a mapping document of changes. Some special characters in filename can cause problems in downstream processing tools (for example: spaces, parentheses, ampersands, and more). This program fixes the filenames in a repeatable way and records how the filenames have been adjusted in an output file. This is not needed for normal RunAssessor operation, but may be useful for large-scale reprocessing efforts when certain tools have trouble with special characters in filenames.

Metadata

Release files for runassessor 0.9.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 runassessor 0.9.0
File Size Uploaded
runassessor-0.9.0.tar.gz 273.4 kB Details

Built distribution (wheel)

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

Total release size: 541.6 kB

Release files / runassessor-0.9.0.tar.gz

Download URL runassessor-0.9.0.tar.gz
Size 273.4 kB
Tags Source
SHA-256 checksum
How to use checksums
d9ccb77ac69e36377f59ca6e7816f0346b9248b1c26f9d80145b2950c0247464
BLAKE2b-256 checksum
How to use checksums
a3387d422b2cb78b19ff3178296bb674d99e72683f4eb814962ffea7ee074389
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.4

Release files / runassessor-0.9.0-py3-none-any.whl

Download URL runassessor-0.9.0-py3-none-any.whl
Size 268.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c4bb5ed5cb2e7bffce97bc2490219e9d025db5ab1de37172dfd93737ef97a065
BLAKE2b-256 checksum
How to use checksums
f88e2d6b510a081d7ea941e8de113634a1cc8772f1e57a89747fd0c78c1984ad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.4

Release history Release notifications | RSS feed

This release

0.9.0 This release

2 release files

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