Processing the Quantification of Samples from a NICI

Author: Xavier Fernández-i-Marín
January 14, 2012 - 3 minutes
Python

The program process_nici processes quantification files manually integrated from a gas chromatograph coupled to a mass spectrometer operating in negative ion chemical ionization mode (GC-MS-NICI, 6980N Agilent Technologies) into a meaningful output that can be directly exported to statistical packages and spreadsheets. This kind of file is generated from ChemStation Software and it contains the concentration of specific compounds.

Conditions

The program is licensed under a Free Software license (GPLv3), which means that you have the right to use, study and modify it. The only restriction is that if you make modifications you have to share them under the same circumstances and make the source code available.

Requirements

The program is writen in Python, so a working python installation is required. Python is also Free Software. In addition to being free as in freedom, it is also free as in “free beer”, so you can download it at no cost. It runs in many different platforms and there are pre-packaged versions for the most used operating systems at Get Python. In GNU/Linux I recommend to use the python version that comes packaged with your distribution.

In order to get a spreadsheet with the results, the script also uses a non-standard python library called xlwt. Python libraries (modules) can be easily installed. Consult the guide Installing Python Modules for further assistance.

How to run the program

You have to copy the “process_nici.py” script in the top of the directory hierarchy that you want to analize. From then, you must run the program invoking it from the command line and with an argument, which represents the name of the files that must be processed (in this example, quan1.txt).

The program will print the status of the operations and it may return an error message if it detects something wrong during the process.

Results

The program returns two files: out.csv and compounds.xls.

The concentrations below the calibration are assigned value -1, and the non-detected concentrations are assigned value -2. This is useful for later processing the signals.

Characteristics and Limitations

comments powered by Disqus