Skip to main content

Python package for the high-thoroughput nontargeted metabolite fingerprinting of nominal mass direct injection mass spectrometry.

Project description

Python package for the high-thoroughput nontargeted metabolite fingerprinting of nominal mass direct injection mass spectrometry from mzML files.

Implementation of the methods detailed in:

High-throughput, nontargeted metabolite fingerprinting using nominal mass flow injection electrospray mass spectrometry

Beckmann, et al. (2008) - doi:10.1038/nprot.2007.500


DIMEpy requires Python 2.7.+ and is unfortunately not compatible with Python 3.

You can install it through pypi using pip:

pip install dimepy

alternatively install it manually using git:

git clone
cd DIMEpy
python install

Or use git and pip in unison.

pip install git+

Bug reporting

Please report all bugs you find in the issues tracker. We would welcome all sorts of contribution, so please be as candid as you want.



The following script takes a path containing mzML files, processes them following the Beckmann, et al protocol and exports the result to an Excel file.

# Importing modules required to run this script.
import dimepy
import os

# Path containing mzML files.
mzMLpaths = "/dir/to/mzMLs/"

# Where we'll store the spectrum.
spectrum_list = dimepy.SpectrumList()

for index, file in enumerate(os.listdir(mzMLpaths)):
  # Load in the spectrum directly using default parameters.
  spectrum = dimepy.Spectrum(os.path.join(mzMLpaths, file))
  # Correct for baseline.

# Write the raw spectrum to a comma seperated file.
# Convert the object to a SpectrumListProcessor for processing.

# Apply outlier detection to remove spurious samples.
# Bin masses over 0.125 m/z.
# Value imputate where < 50% of the values are lost across all samples.
spectrum_list.value_imputation(method="basic", threshold=0.5)
# Normalise over the total ion count.
# Apply generalised log transformation

# Write the processed spectrum to a comma seperated file.


DIMEpy is licensed under the GNU General Public License v2.0.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for DIMEpy, version 0.1.1
Filename, size File type Python version Upload date Hashes
Filename, size dimepy-0.1.1.tar.gz (17.2 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page