Skip to main content

Package used to convert mzData.xml files into matlab files.

Project description

mzData2Mat

Welcome ! mzData2Mat is a Python package which converts mzData.xml files (version 1.05) into mat files which matlab can load and use.

Compatible hardware

macOS

mzdata2mat has been developped with a macOS environment. At this time, macOS Sonoma 14.0 is officially supported, other macOS versions could be supported as long as they follow the requirements listed below.

Windows

madata2mat has not been tested yet on any Windows machine for now. Support will soon be added (if applicable).

Requirements

Other than Python

This packages requires a javascript interpreter such as node.js. We recommand downloading it and installing it a nodejs.org, this package has been tested with node.js only. There is no official support for other interpreters at this time.

Python version

This package has been developped with Python 3.12.1 however, other python versions are actively being tested to add other versions as soon as possible.

Python packages

To be able to use this package, the following packages need to be also installed on the target environment :

    pydantic>=2.6.4
    PyExecJS==1.5.1
    mat4py>=0.6.0

Installation

From your terminal run the following command to install mzdata2mat into your environment :

pip install mzdata2mat

If you have multiple instances of Python installed, run this command with the chosen Python interpreter to install mzdata2mat in the corresponding Python installation :

<pathToPythonApp> -m pip install mzdata2mat

When the command terminates, you have successfully installed mzdata2mat !

To verfiy if the installation was successful, run in your terminal this command :

$ mzdata2mat-verify

This command will attempt to convert an example .mzdata.xml file into a .mat file. If everything goes right, you will get this message :

$ mzdata2mat - Ready to use !

The example file (.mzdata.xml) will be copied in the current working directory and the converted file (.mat) will be added as soon as the conversion finishes.

If an error occurs, this probably means that you do not have node.js installed on your machine.

Usage

To use mzdata2mat, import it like follows:

from mzdata2mat import mzDataManager

Here we import the main class used for the conversion. Now we initilize the class :

converterAgent = mzDataManager(useDirectory=False)

If all mzData files are stored in the same directory, we can specify the parameter mzDataPath instead of useDirectory.

From now we can call the mzDataXMLreadfunction to read the `.mzData.xml' file:

data = converterAgent.mzDataXMLread(fileName=path2mzDataFile)

We can now save this file with the function saveMatfile:

converterAgent.saveMatfile(mzData=data, dir2save=someDirectory)

You have now successfully converted a mzData file into mat files ! Congratulations !

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

mzdata2mat-0.0.22.tar.gz (2.3 MB view details)

Uploaded Source

Built Distribution

mzdata2mat-0.0.22-py3-none-any.whl (504.6 kB view details)

Uploaded Python 3

File details

Details for the file mzdata2mat-0.0.22.tar.gz.

File metadata

  • Download URL: mzdata2mat-0.0.22.tar.gz
  • Upload date:
  • Size: 2.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.1

File hashes

Hashes for mzdata2mat-0.0.22.tar.gz
Algorithm Hash digest
SHA256 ef156e168be6872a7e2477ec8398d61195c9d26677f8149bb70f1d4327f6d67e
MD5 49e3b28382efb25fca38747a16d7e6bf
BLAKE2b-256 e696f3724c1a45949f4a2c73d60e2dac300b3b03517c5eede911b25170b7b479

See more details on using hashes here.

Provenance

File details

Details for the file mzdata2mat-0.0.22-py3-none-any.whl.

File metadata

  • Download URL: mzdata2mat-0.0.22-py3-none-any.whl
  • Upload date:
  • Size: 504.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.1

File hashes

Hashes for mzdata2mat-0.0.22-py3-none-any.whl
Algorithm Hash digest
SHA256 411b1577a415510ad92bd4ae1988b117b6233bba09265077d94f8d9b250b0e51
MD5 ac3a1eb348b6ab7d57d177778db5e826
BLAKE2b-256 4e14a92081cbdbb388e86a5f85c4a6bb51f0cce0097d0b1198a128cbaefd2b9c

See more details on using hashes here.

Provenance

Supported by

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