{ "info": { "author": "Keiron O'Shea", "author_email": "", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Science/Research", "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.7", "Topic :: Scientific/Engineering :: Bio-Informatics" ], "description": "# DIMEpy: Direct Infusion MEtablomics processing in python\n\n[![Project Status: Active - The project has reached a stable, usable state and is being actively developed.](http://www.repostatus.org/badges/0.1.0/active.svg)](http://www.repostatus.org/#active)\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/DIMEpy.svg)\n![PyPI](https://img.shields.io/pypi/v/DIMEpy.svg)\n![PyPI - License](https://img.shields.io/pypi/l/DIMEpy.svg)\n![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.3340120.svg)\n![PyPI - Status](https://img.shields.io/pypi/status/DIMEpy.svg)\n[![Documentation Status](https://readthedocs.org/projects/dimepy/badge/?version=latest)](https://dimepy.readthedocs.io/en/latest/?badge=latest)\n[![Downloads](https://pepy.tech/badge/dimepy)](https://pepy.tech/project/dimepy)\n[![Build Status](https://travis-ci.org/AberystwythSystemsBiology/DIMEpy.svg?branch=master)](https://travis-ci.org/AberystwythSystemsBiology/DIMEpy)\n\nPython package for the high-throughput nontargeted metabolite fingerprinting of nominal mass direct injection mass spectrometry directly from mzML files.\n\nThis work is very much inspired by the methods detailed in [High-throughput, nontargeted metabolite fingerprinting using nominal mass flow injection electrospray mass spectrometry (Beckmann, et al, 2008)](https://www.nature.com/articles/nprot.2007.500). \n\n## Features\n\n- Loading mass spectrometry files from mzML.\n - Support for polarity switching.\n - MAD-estimated infusion profiling.\n- Assay-wide outlier spectrum detection.\n- Spurious peak elimination.\n- Spectrum export for direct dissemination using Metaboanalyst.\n- Spectral binning.\n- Value imputation.\n- Spectral normalisation.\n - including TIC, median, mean...\n- Spectral transformation.\n - including log10, cube, nlog, log2, glog, sqrt, ihs...\n- Export to array for statistical analysis in Metaboanalyst.\n\n## Installation\n\nDIMEpy requires Python 3+ and is unfortunately not compatible with Python 2. If you are still using Python 2, a clever workaround is to install Python 3 and use that instead.\n\nYou can install it through ```pypi``` using ```pip```:\n\n```\npip install dimepy\n```\n\nIf you want the 'bleeding edge' version this, you can also install directly from this repository using ```git``` - but beware of dragons:\n\n```\npip install git+https://www.github.com/AberystwythSystemsBiology/DIMEpy\n```\n\n## Usage\n\nTo use the package, type the following into your Python console:\n\n```python\n>>> import dimepy\n```\n\nAt the moment, this pipeline only supports mzML files. You can easily convert proprietary formats to mzML using [ProteoWizard](http://www.proteowizard.org/download.html).\n\n### Loading a single file\n\nIf you are only going to load in a single file for fingerprint matrix estimation, then just create a new spectrum object. If the sample belongs to a characteristic, it is recommend that you also pass it through when instantiating a new ```Spectrum``` object.\n\n```python\n>>> filepath = \"/file/to/file.mzML\"\n>>> spec = dimepy.Spectrum(filepath, identifier=\"example\", stratification=\"class_one\")\n/file/to/file.mzML\n```\n\nBy default the Spectrum object doesn't set a snr estimator. It is **strongly recommended** that you set a signal to noise estimation method when instantiating the Spectrum object.\n\nIf your experimental protocol makes use of mixed-polarity scanning, then please ensure that you limit the scan ranges to best match what polarity you're interested in analysing:\n\n```python\n>>> spec.limit_polarity(\"negative\")\n```\n\n\nIf you are using FIE-MS it is strongly recommended that you use just the infusion profile to generate your mass spectrum. For example, if your scan profiles look like this:\n\n```\n | _\n T | / \\\n I | / \\_\n C |_____/ \\_________________\n 0 0.5 1 1.5 2 [min]\n```\n\nThen it is fair to assume that the infusion occured during the scans ranging from 30 seconds to 1 minute. The ```limit_infusion()``` method does this by estimating the median absolute deviation (MAD) of total ion counts (TIC) before limiting the profile to the range between the time range in which whatever multiple of MAD has been estimated:\n\n```python\n>>> spec.limit_infusion(2) # 2 times the MAD.\n```\n\nNow, we are free to load in the scans to generate a base mass_spectrum:\n\n```python\n>>> spec.load_scans()\n```\n\nYou should now be able to access the generated mass spectrum using the ```masses``` and ```intensities``` attributes:\n\n```python\n>>> spec.masses\narray([ ... ])\n>>> spec.intensities\narray([ ... ])\n```\n\n### Working with multiple files\n\nA more realistic pipeline would be to use multiple mass-spectrum files. This is where things really start to get interesting. The ```SpectrumList``` object facilitates this through the use of the ```append``` method:\n\n```python\n>>> speclist = dimepy.SpectrumList()\n>>> speclist.append(spec)\n```\n\nYou can make use of an iterator to recursively generate ```Spectrum``` objects, or do it manually if you want.\n\nIf you're only using this pipeline to extract mass spectrum for Metabolanalyst, then you can now simply call the ```_to_csv``` method:\n\n```python\n>>> speclist.to_csv(\"/path/to/output.csv\", output_type=\"metaboanalyst\")\n```\n\nThat being said, this pipeline contains many of the preprocessing methods found in Metaboanalyst - so it may be easier for you to just use ours.\n\nAs a diagnostic measure, the TIC can provide an estimation of factos that may adversely affect the overal intensity count of a run. As a rule, it is common to remove spectrum in which the TIC deviates 2/3 times from the median-absolute deviation. We can do this by calling the ```detect_outliers``` method:\n\n```python\n>>> speclist.detect_outliers(thresh = 2, verbose=True)\nDetected Outliers: outlier_one;outlier_two \n```\n\nA common first step in the analysis of mass-spectrometry data is to bin the data to a given mass-to-ion value. To do this for all ```Spectrum``` held within our ```SpectrumList``` object, simply apply the ```bin``` method:\n\n```python\n>>> speclist.bin(0.25) # binning our data to a bin width of 0.25 m/z\n```\n\nIn FIE-MS null values should concern no more than 3% of the total number of identified bins. However, imputation is required to streamline the analysis process (as most multivariate techniques are unable to accomodate missing data points). To perform value imputation, just use ```value_imputate```:\n\n```python\n>>> speclist.value_imputate()\n```\n\nNow transforming and normalisating the the spectrum objects in an samples independent fashion can be done using the following:\n\n```python\n>>> speclist.transform()\n>>> speclist.normalise()\n```\n\nOnce completed, you are now free to export the data to a data matrix:\n\n```python\n>>> speclist.to_csv(\"/path/to/proc_metabo.csv\", output_type=\"matrix\")\n```\n\nThis should give you something akin to:\n\n| Sample ID | M0 | M1 | M2 | M3 |... |\n|-----------|----|----|----|----|----|\n| Sample 1 | 213 | 634 | 3213 | 546 | ... |\n| Sample 2 | 132 | 34 | 713 | 6546 |... |\n| Sample 3 | 1337 | 42 | 69 | 420 | ... |\n\n## Bug reporting and feature suggestions\n\nPlease report all bugs or feature suggestions to the [issues tracker](https://github.com/AberystwythSystemsBiology/DIMEpy/issues). **Please do not email me directly** as I'm struggling to keep track of what needs to be fixed. \n\nWe welcome all sorts of contribution, so please be as candid as you want(!)\n\n## Documentation\n\nDocumentation for the project can be found on its [readthedocs page](https://dimepy.readthedocs.io/en/latest/).\n\n## Contributors\n\n* **Lead Developer:** Keiron O'Shea (keo7@aber.ac.uk)\n* **Developer:** Rob Bolton (rab26@aber.ac.uk)\n* **Project Supervisor:** Chuan Lu (cul@aber.ac.uk)\n* **Project Supervisor:** Luis AJ Mur (lum@aber.ac.uk)\n* **Methods Expert:** Manfred Beckmann (meb@aber.ac.uk)\n\n## License\n\nDIMEpy is licensed under the [GNU General Public License v3.0](https://raw.githubusercontent.com/AberystwythSystemsBiology/DIMEpy/master/LICENSE).\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/AberystwythSystemsBiology/DIMEpy", "keywords": "metabolomics,omics,processing", "license": "", "maintainer": "", "maintainer_email": "", "name": "DIMEpy", "package_url": "https://pypi.org/project/DIMEpy/", "platform": "", "project_url": "https://pypi.org/project/DIMEpy/", "project_urls": { "Homepage": "https://github.com/AberystwythSystemsBiology/DIMEpy" }, "release_url": "https://pypi.org/project/DIMEpy/1.0.0/", "requires_dist": [ "numpy (==1.16.0)", "pymzml (==2.3.1)", "scipy (==1.3.0)" ], "requires_python": ">= 3.2", "summary": "Python package for the high-throughput nontargeted metabolite fingerprinting of nominal mass direct injection mass spectrometry.", "version": "1.0.0" }, "last_serial": 5635118, "releases": { "0.0.6": [ { "comment_text": "", "digests": { "md5": "50aa4be3d85366a1f6eede354e304b2d", "sha256": "a3f06b1a2ba0fe72d3f864727e7cbdb57874932d43d1f61da4f58c43469ad73f" }, "downloads": -1, "filename": "dimepy-0.0.6.tar.gz", "has_sig": false, "md5_digest": "50aa4be3d85366a1f6eede354e304b2d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5730, "upload_time": "2018-05-15T14:55:23", "url": "https://files.pythonhosted.org/packages/91/6b/09a93fd80870d0657d9d23c2750e30b5ae7a0217b35edd53b3dbe528e9d7/dimepy-0.0.6.tar.gz" } ], "0.0.7": [ { "comment_text": "", "digests": { "md5": "215fa80ef0df8e2baabdb842bf508ff9", "sha256": "034541631088db4648c9807681e92cdce5ade3994df0b8e1f9c8bf4c955ef78b" }, "downloads": -1, "filename": "dimepy-0.0.7.tar.gz", "has_sig": false, "md5_digest": "215fa80ef0df8e2baabdb842bf508ff9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7348, "upload_time": "2018-05-21T12:25:51", "url": "https://files.pythonhosted.org/packages/ac/7a/569e647ef5b07231d89bf32b80ca70674bedb60355d0b9209b9d2afe15fc/dimepy-0.0.7.tar.gz" } ], "0.0.8": [ { "comment_text": "", "digests": { "md5": "6b5826d0bb3e5e8223a11ff5610d08b3", "sha256": "40c50362fb39bbf2c46414dfad3b971c8bb20afc38138546277bf09217df690c" }, "downloads": -1, "filename": "dimepy-0.0.8.tar.gz", "has_sig": false, "md5_digest": "6b5826d0bb3e5e8223a11ff5610d08b3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8463, "upload_time": "2018-05-21T13:18:36", "url": "https://files.pythonhosted.org/packages/99/11/2381736d3f775abe82e69cc4b488ec3923df17407284ddc5e4316e5e408b/dimepy-0.0.8.tar.gz" } ], "0.0.9": [ { "comment_text": "", "digests": { "md5": "89e661bed4772d0d012ac28e5a8c4826", "sha256": "5d0936701fe06a2c8626f31b234e35796a29626bcc570f86ff1151ecc9c066cb" }, "downloads": -1, "filename": "dimepy-0.0.9.tar.gz", "has_sig": false, "md5_digest": "89e661bed4772d0d012ac28e5a8c4826", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8541, "upload_time": "2018-05-21T13:20:16", "url": "https://files.pythonhosted.org/packages/2a/cc/9b7fcbbfd73b7a30a196565140f46b3e36d7223007f07084b1edfb5a0233/dimepy-0.0.9.tar.gz" } ], "0.0.9.1": [ { "comment_text": "", "digests": { "md5": "bcbd88cc211af2480318c25e48fc2ebe", "sha256": "95cb8865dcc822dd907a3e4584adc9125fca67b78024507afed8f49065af8ab9" }, "downloads": -1, "filename": "dimepy-0.0.9.1.tar.gz", "has_sig": false, "md5_digest": "bcbd88cc211af2480318c25e48fc2ebe", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15944, "upload_time": "2018-05-21T13:50:45", "url": "https://files.pythonhosted.org/packages/08/84/553246b7de9a8891ce93cb1a7234b725512684ae364d3d0e0ea65e6b0240/dimepy-0.0.9.1.tar.gz" } ], "0.0.9.2": [ { "comment_text": "", "digests": { "md5": "744d6fc3dfc1a10ffeb110efc5da1957", "sha256": "42b71d075de4068396f352cfbaa4129a030fa48058f26bb51c7a45d3b670b6b0" }, "downloads": -1, "filename": "dimepy-0.0.9.2.tar.gz", "has_sig": false, "md5_digest": "744d6fc3dfc1a10ffeb110efc5da1957", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15958, "upload_time": "2018-05-21T14:39:54", "url": "https://files.pythonhosted.org/packages/6c/46/c2930bb022f8906a41577c46f45c9b59670f755d41006f09eb142e1b2083/dimepy-0.0.9.2.tar.gz" } ], "0.0.9.3": [ { "comment_text": "", "digests": { "md5": "0d503024fe5193bccf1b62e5a2d5c95c", "sha256": "75a3cf8ee6a5d25af3aed618e95ecf49ecdb087d2488ea5605e0319cff8bd1ef" }, "downloads": -1, "filename": "dimepy-0.0.9.3.tar.gz", "has_sig": false, "md5_digest": "0d503024fe5193bccf1b62e5a2d5c95c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15337, "upload_time": "2018-05-21T15:59:59", "url": "https://files.pythonhosted.org/packages/33/25/77fd48069d00eae9f2afcd57cc08b7fe921b86c663a73abeb6f6cbb9520f/dimepy-0.0.9.3.tar.gz" } ], "0.0.9.5": [ { "comment_text": "", "digests": { "md5": "9b7a79cce509fb65bdca6f9f945e088c", "sha256": "d6381d419df02e02ce391b3a1dee69426a9c4a7b2f7d9d0a8aba758a91f92532" }, "downloads": -1, "filename": "dimepy-0.0.9.5.linux-x86_64.tar.gz", "has_sig": false, "md5_digest": "9b7a79cce509fb65bdca6f9f945e088c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16707, "upload_time": "2018-05-21T16:45:04", "url": "https://files.pythonhosted.org/packages/57/44/6e034ac9a01f3673afea40101d85a2dec6baf832dfa555b4bb7d0e2b4ab3/dimepy-0.0.9.5.linux-x86_64.tar.gz" } ], "0.0.9.5b0": [ { "comment_text": "", "digests": { "md5": "1b5b246d1414222d72338c98b551f8fe", "sha256": "52effc63aca81828698f94824e661ec2a355af3cff97d48b149a94bf02855ef6" }, "downloads": -1, "filename": "dimepy-0.0.9.5b0.linux-x86_64.tar.gz", "has_sig": false, "md5_digest": "1b5b246d1414222d72338c98b551f8fe", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16672, "upload_time": "2018-05-21T16:45:33", "url": "https://files.pythonhosted.org/packages/5a/23/e40a5767577a6b81318d172a1aced6d450804a5305eb55ad2b81fd2208c5/dimepy-0.0.9.5b0.linux-x86_64.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "e08325307fb3e2e73f7ec4e7f997be44", "sha256": "ff1358504256a6ec492957333554c665589e464a1a720c96b9abdae79da09c59" }, "downloads": -1, "filename": "dimepy-0.1.1.tar.gz", "has_sig": false, "md5_digest": "e08325307fb3e2e73f7ec4e7f997be44", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17196, "upload_time": "2018-06-04T08:54:56", "url": "https://files.pythonhosted.org/packages/5c/16/086ab75b1e3b50c8f9c39042406f72ac02de91a39d29ef62110918d1c5a6/dimepy-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "8c1df3b6794cf44b348012b46c4ed545", "sha256": "0a3884c21f39f514fdcc96e539128324f6d597b8f3ada10eb008c1f1fd7ba554" }, "downloads": -1, "filename": "dimepy-0.1.2.tar.gz", "has_sig": false, "md5_digest": "8c1df3b6794cf44b348012b46c4ed545", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17219, "upload_time": "2018-06-05T14:12:51", "url": "https://files.pythonhosted.org/packages/90/dd/1005728903d3c3deb588af01b832dafe63878701dd25c1108f23f9c75f99/dimepy-0.1.2.tar.gz" } ], "0.9.999": [ { "comment_text": "", "digests": { "md5": "471c02de14d536b28f40f8ec60b5fcc1", "sha256": "e6827366cfcaf983006b8e48e29b38676d85cbd41cbd315d77abe2f1dd00e866" }, "downloads": -1, "filename": "dimepy-0.9.999.tar.gz", "has_sig": false, "md5_digest": "471c02de14d536b28f40f8ec60b5fcc1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14884, "upload_time": "2019-07-17T22:12:38", "url": "https://files.pythonhosted.org/packages/95/c0/23a3b201b143136dbc055cc22c13bbadf4eb7f3ee2593747000bae06dc0d/dimepy-0.9.999.tar.gz" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "6f4b68966c6227e87acd1ad6f341863a", "sha256": "5093a7a8590980a96e4c4eecebae666e710c750fdaf2a188df80a1927bf7bf8d" }, "downloads": -1, "filename": "DIMEpy-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "6f4b68966c6227e87acd1ad6f341863a", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">= 3.2", "size": 27930, "upload_time": "2019-08-05T16:00:44", "url": "https://files.pythonhosted.org/packages/cd/a0/8574ef882f3a34e26d7008908f9b0cf0f57d9d88d0390847cd0ef066bd12/DIMEpy-1.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "bcd661989b4dd22bc6082e619ce51120", "sha256": "6f91f5ea4cd678fe76c006d2941501c433f39b4d7e543212acdd0542377779fe" }, "downloads": -1, "filename": "DIMEpy-1.0.0.tar.gz", "has_sig": false, "md5_digest": "bcd661989b4dd22bc6082e619ce51120", "packagetype": "sdist", "python_version": "source", "requires_python": ">= 3.2", "size": 27182, "upload_time": "2019-08-05T16:00:45", "url": "https://files.pythonhosted.org/packages/dd/25/69855babac9a0546ae7447c90a309a0921dd7a5d7720bcbb903beeeb9f58/DIMEpy-1.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "6f4b68966c6227e87acd1ad6f341863a", "sha256": "5093a7a8590980a96e4c4eecebae666e710c750fdaf2a188df80a1927bf7bf8d" }, "downloads": -1, "filename": "DIMEpy-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "6f4b68966c6227e87acd1ad6f341863a", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">= 3.2", "size": 27930, "upload_time": "2019-08-05T16:00:44", "url": "https://files.pythonhosted.org/packages/cd/a0/8574ef882f3a34e26d7008908f9b0cf0f57d9d88d0390847cd0ef066bd12/DIMEpy-1.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "bcd661989b4dd22bc6082e619ce51120", "sha256": "6f91f5ea4cd678fe76c006d2941501c433f39b4d7e543212acdd0542377779fe" }, "downloads": -1, "filename": "DIMEpy-1.0.0.tar.gz", "has_sig": false, "md5_digest": "bcd661989b4dd22bc6082e619ce51120", "packagetype": "sdist", "python_version": "source", "requires_python": ">= 3.2", "size": 27182, "upload_time": "2019-08-05T16:00:45", "url": "https://files.pythonhosted.org/packages/dd/25/69855babac9a0546ae7447c90a309a0921dd7a5d7720bcbb903beeeb9f58/DIMEpy-1.0.0.tar.gz" } ] }