mzml2isa 0.4.15
pip install mzml2isa==0.4.15
Released:
mzml2isa - mzML to ISA-tab parsing tool
Navigation
Unverified details
These details have not been verified by PyPIProject links
Meta
- License: GNU General Public License v3 (GPLv3) (GPLv3)
- Author: Thomas Lawson, Martin Larralde
- Tags Metabolomics, Mass spectrometry, metabolites, ISA Tab, mzML, parsing
Classifiers
- License
- Operating System
- Programming Language
- Topic
Project description
Overview
mzml2isa is a Python3 program that can be used to generate an ISA-Tab structure out of mzML files, providing the backbone of a study which can then be edited with an ISA editing tool (see MetaboLights pre-packaged ISA Creator)
Currently the program does the following * Extract meta information from mzML files and store as either python dictionary or JSON format * Create an ISA-Tab file structure with relevant meta information * Add additional metadatas that cannot be parsed from mzML files to the ISA-Tab files through a JSON formatted dictionnary.
Install
With PIP
If pip is installed, it can be used to easily install the parser (this may need to be run as administrator depending on the machine’s architecture):
pip3 install mzml2isa
Without PIP
Alternatively, you can also clone the repository and install from the source :
git clone git://github.com/althonos/mzml2isa && cd mzml2isa
python3 setup.py install
mzml2isa has 2 optional dependencies: progressbar2 and lxml, the latter quickening the parsing process while the other enhances the output of the program. To install them both, use pip:
pip3 install lxml progressbar2
Use
CLI
The parser comes with a simple one-liner:
mzml2isa -i /path/to/mzml_files/ -o /path/to/out_folder/ -s name_of_study
Module
It is also possible to import the package:
from mzml2isa import parsing
in_dir = "/path/to/mzml_files/"
out_dir = "/path/to/out_folder/"
study_identifier_name = "name_of_study"
parsing.full_parse(in_dir, out_dir, study_identifier_name)
Meta extraction
If you just want to extract meta information:
from mzml2isa import mzml
onefile = os.path.join(in_dir,"samp1.mzML")
mm = mzml.mzMLmeta(onefile)
# python dictionary format
print mm.meta
# JSON format
print mm.meta_json
Metabolights
To download some real data from MetaboLights studies to test the converter with, run
python scripts/metabolights-dl.py <size>
from inside the repository, where size is the maximum size in GiB you can allocate to download files. The script will download the files to the example_files/metabolights folder and then run mzml2isa on those files..
If you use a *NIX machine with curlftpfs and bash available, you can also run
scripts/metabolights.sh
to mount the database to the example directory and start converting mzML studies.
Workflow
Ref
A modified version of the ontology extraction from this blog[1]_ was used, and a slightly modified class from pymzml[2]_
Project details
Unverified details
These details have not been verified by PyPIProject links
Meta
- License: GNU General Public License v3 (GPLv3) (GPLv3)
- Author: Thomas Lawson, Martin Larralde
- Tags Metabolomics, Mass spectrometry, metabolites, ISA Tab, mzML, parsing
Classifiers
- License
- Operating System
- Programming Language
- Topic
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file mzml2isa-0.4.15.tar.gz
.
File metadata
- Download URL: mzml2isa-0.4.15.tar.gz
- Upload date:
- Size: 125.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 949f189c72cbf3760026b623a1c61132b3b0c1fd452c0fa788b12afbd1fb274b |
|
MD5 | 7e93553085349319ad87d8608dd414b7 |
|
BLAKE2b-256 | 2ca73404298a3b6d83a1b06d1a56b8a942ea66be07b65ebb84c2dd2f0a74b5b9 |
File details
Details for the file mzml2isa-0.4.15-py3-none-any.whl
.
File metadata
- Download URL: mzml2isa-0.4.15-py3-none-any.whl
- Upload date:
- Size: 143.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f2fdd231d53427c61c60f716522a6fadb8e7c125f33ce3bbffffdfa2ff90f17f |
|
MD5 | 69edd2b47d381651e3e3e90f145c09ae |
|
BLAKE2b-256 | fadb45584fef0921b6751e4777467551b6f1c179d5c3d3f75f4a1466c5178856 |