Skip to content

MzML2CSV: Convert Mass Spectrometry Data (MzML) to CSV

Notifications You must be signed in to change notification settings

satish5577/mzML2CSV

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

mzML2CSV Converter

Introduction

The mzML2CSV Converter is a Python script that simplifies the process of converting Mass Spectrometry data files in the mzML format to Comma-Separated Values (CSV) format. This tool is designed to assist researchers and data scientists in extracting valuable information from mzML files, making it easier to analyze and manipulate Mass Spectrometry data for various applications.

Features

  • Effortless Conversion: Convert mzML files to CSV format with ease, reducing the complexity of data extraction.

  • Data Filtering: Apply an intensity filter to specify the minimum intensity value required for data inclusion in the CSV output.

  • Data Retention: Retain important scan information, including scan number, retention time, m/z values, and intensities.

  • Customizable: Easily integrate the tool into your data processing pipelines and workflows.

Prerequisites

Before using the mzML2CSV Converter, ensure that you have the following prerequisites installed on your computer:

  • Python: Download and install Python from the official website: Python Downloads.

  • Required Python Libraries: Install the necessary Python libraries using the following command:

    pip install pyteomics
    pip install lxml

Getting Started

Follow these steps to convert your mzML files to CSV format:

1. Clone the Repository

Obtain the mzML2CSV Converter script by cloning the GitHub repository to your local machine. Use the following command to clone the repository:

git clone https://github.com/satish5577/mzML2CSV.git

2. Organize Your Data

Place your mzML files that you want to convert into a dedicated folder on your local system. This folder will serve as the input folder for the conversion process.

3. Configure Input and Output Folders

Edit the mzML2csv.py script to specify the paths for your input and output folders:

# Specify the input folder containing mzML files and the output folder for CSV files
input_folder = 'input_mzML'  # Replace with the actual folder path containing mzML files
output_folder = 'output_csv'  # Replace with the desired folder path for CSV files

Replace 'input_mzML' with the actual path to your input folder containing MzML files, and 'output_csv' with the desired path for the output CSV files.

4. Set the Intensity Filter (Optional)

Optionally, you can set an intensity filter to control which data points are included in the CSV output. Modify the intensity_threshold variable in the script to specify the minimum intensity value required for data inclusion.

# Intensity filter threshold
intensity_threshold = 1000  # Adjust this value as needed

5. Run the Script

Open your command prompt or terminal, navigate to the folder where the mzML2csv.py script is located, and run the script:

mzML2csv.py

The script will process the MzML files in the input folder, apply the intensity filter (if specified), convert them to CSV format, and save the CSV files in the specified output folder.

6. Review the Output

The script will provide progress updates as it processes each file. Once the conversion is complete, you will see a message indicating that the data has been saved to the output folder. Related Publication

Conclusion

The mzML2CSV Converter simplifies the conversion of Mass Spectrometry data from MzML to CSV format, making it easier for you to work with the data in various data analysis and research applications. If you encounter any issues or have questions, feel free to reach out to the project's author or the GitHub community for assistance.

We hope you find this tool helpful for your Mass Spectrometry data analysis projects!

Example Data Set

https://doi.org/10.5281/zenodo.8406634

About

MzML2CSV: Convert Mass Spectrometry Data (MzML) to CSV

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages