Skip to main content
Help us improve PyPI by participating in user testing. All experience levels needed!

Parser for mwtab files from the Metabolomics Workbench

Project description

License information Current library version Supported Python versions Documentation status

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 JSONized (JavaScript Object Notation, an open-standard format that uses human-readable text to transmit data objects consisting of attribute-value pairs) representation and vice versa.

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.

Installation

The mwtab package runs under Python 2.7 and 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
>>>
>>> for mwfile in mwtab.read_files("1", "2"):  # Here we use ANALYSIS_ID of file to fetch data from URL
...      print("STUDY_ID:", mwfile.study_id)
...      print("ANALYSIS_ID:", mwfile.analysis_id)
...      print("SOURCE:", mwfile.source)
...      print("Blocks:", list(mwfile.keys()))
>>>

Note

Read the User Guide and the mwtab Tutorial on ReadTheDocs to learn more and to see code examples on using the mwtab as a library and as a command-line tool.

License

This package is distributed under the BSD license.

Project details


Release history Release notifications

History Node

0.1.9

History Node

0.1.8

History Node

0.1.7

History Node

0.1.6

History Node

0.1.5

History Node

0.1.4

History Node

0.1.3

This version
History Node

0.1.2

History Node

0.1.1

History Node

0.1.0

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
mwtab-0.1.2.tar.gz (38.7 kB) Copy SHA256 hash SHA256 Source None Sep 14, 2017

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page