Parser for mwtab files from the Metabolomics Workbench
Project description
The mwtab package is a Python library that facilitates reading and writing files in mwTab format used by the Metabolomics Workbench for archival of Mass Spectrometry (MS) and Nuclear Magnetic Resonance (NMR) experimental data.
The mwtab package provides facilities to convert mwTab formatted files into their equivalent JSON ized representation and vice versa. JSON stands for JavaScript Object Notation, an open-standard format that uses human-readable text to transmit data objects consisting of attribute-value pairs.
The mwtab package can be used in several ways:
As a library for accessing and manipulating data stored in mwTab format files.
As a command-line tool to convert between mwTab format and its equivalent JSON representation.
Citation
When using mwtab package in published work, please cite the following papers:
Powell, Christian D., and Hunter NB Moseley. “The mwtab Python Library for RESTful Access and Enhanced Quality Control, Deposition, and Curation of the Metabolomics Workbench Data Repository.” Metabolites 11.3 (2021): 163. doi: 10.3390/metabo11030163.
Smelter, Andrey and Hunter NB Moseley. “A Python library for FAIRer access and deposition to the Metabolomics Workbench Data Repository.” Metabolomics 2018, 14(5): 64. doi: 10.1007/s11306-018-1356-6.
Links
mwtab @ GitHub
mwtab @ PyPI
Documentation @ ReadTheDocs
Installation
The mwtab package runs under Python 3.5+. Use pip to install. Starting with Python 3.4, pip is included by default.
Install on Linux, Mac OS X
python3 -m pip install mwtab
Install on Windows
py -3 -m pip install mwtab
Upgrade on Linux, Mac OS X
python3 -m pip install mwtab --upgrade
Upgrade on Windows
py -3 -m pip install mwtab --upgrade
Quickstart
>>> import mwtab
>>>
>>> # Here we use ANALYSIS_ID of file to fetch data from URL
>>> for mwfile in mwtab.read_files("1", "2"):
... print("STUDY_ID:", mwfile.study_id)
... print("ANALYSIS_ID:", mwfile.analysis_id)
... print("SOURCE:", mwfile.source)
... print("Blocks:", list(mwfile.keys()))
>>>
License
This package is distributed under the BSD license.
Project details
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
File details
Details for the file mwtab-1.2.5.tar.gz
.
File metadata
- Download URL: mwtab-1.2.5.tar.gz
- Upload date:
- Size: 660.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 64e8ef8c6c9410468c0029a5d71f04e24e1371b3b0eccb20eded013a9aa7ea9e |
|
MD5 | 147fb3456104e6530360fce93d1c1787 |
|
BLAKE2b-256 | d0c63acdd25f8a9a8d9e6085ecc48fd8be5cb7fda047df1c0928f727b3689ff5 |