Skip to main content

Parser for mwtab files from the Metabolomics Workbench

Project description

License information Current library version Supported Python versions Documentation status Travis CI status Code coverage information Citation link GitHub project

https://raw.githubusercontent.com/MoseleyBioinformaticsLab/mwtab/master/docs/_static/images/mwtab_logo.png

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 paper:

  • 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.

Installation

The mwtab package runs under Python 3.4+. 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()))
>>>
https://raw.githubusercontent.com/MoseleyBioinformaticsLab/mwtab/master/docs/_static/images/mwtab_demo.gif

License

This package is distributed under the BSD license.

Project details


Download files

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

Source Distribution

mwtab-1.1.0.post1.tar.gz (303.6 kB view details)

Uploaded Source

File details

Details for the file mwtab-1.1.0.post1.tar.gz.

File metadata

  • Download URL: mwtab-1.1.0.post1.tar.gz
  • Upload date:
  • Size: 303.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/54.1.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.2

File hashes

Hashes for mwtab-1.1.0.post1.tar.gz
Algorithm Hash digest
SHA256 68c7d2d44a5e46197111a137c8bd7f9a0ecaf24065c5a9cca16f18f2973ca223
MD5 870492fa6aa312d3c375df51513c4b5a
BLAKE2b-256 bd879c745147eb16ac2a4cd9148365604460f92314b39c9aa2a79e669c86b7b4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page