Permalink
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
64 lines (37 sloc) 1.11 KB

Examples

CLI

Create a new MetaboLights study with existing nmrML data:

mzml2isa -i "/home/metabolomics/NMRML study" -o "/home/metabolomics/isa" -s MZML1

This will create a new folder and write the following ISA-Tab files:

/
└ home/
   └ metabolomics/
      └ isa/
         ├ a_MZML1_metabolite_profiling_mass_spectrometry.txt
         ├ i_Investigation.txt
         └ s_MZML1.txt

Python module

Note

Syntax for imzML and mzML is the same, except when the class mzMLmeta is used: for imzML files, simply replace mzMLmeta with imzMLmeta.

Extract metadata of a file called sample1.mzML and print a JSON dictionary containing those metadata

python -m mzml2isa.mzml sample1.mzML

Or within a Python program

from mzml2isa.mzml import mzMLmeta
mz = mzMLmeta('sample1.mzML')

# json formatted dict
print(mz.meta_json)

# same metadata, Python dict
print(mz.meta['Sample Name']['value'])