Friday, February 02, 2007

Batch Decompression of JCAMP files

I have developed a Java package to decompress NMR data taken from our Varian instrument and stored in JCAMP format. This software was adapted from Robert Lancashire's jspecview program, specifically the JDXCompressor.java and Coordinate.java classes. It reads a set of compressed JCAMP NMR files according to a configuration file with the following format:

<?xml version="1.0" encoding="utf-8" ?>
<Configuration
InputFiles="Exp0541261050.jdx,
Exp0541261056.jdx,
Exp0541261058.jdx,
Exp0541261102.jdx,
Exp0541261125.jdx,
Exp0541261219.jdx,
Exp0541261248.jdx,
Exp0541261251.jdx,
Exp0541261546.jdx,
Exp0541261739.jdx,
Exp0541261822.jdx"
OutputFile="output.jdx"
Title="##TITLE=Exp054"
JCAMPVersion="##JCAMP-DX=5.01"
DataType="##DATA TYPE=LINK"
/>

The program's output is a BLOCK JCAMP file, in this case output.jdx, containing the decompressed data from the input files. Right now only a few of the header fields are retained, those needed for reaction kinetics analysis using Excel VBA software (work in progress!).

In order to use, place all compressed jdx files in the same folder where all these files are located. Modify the configuration.xml file using Notepad to list the compressed files then double click on the run.bat file. The BLOCK file with the name output.jdx will be created. Note that this program just copies the titles in the original jdx files so make sure to put something meaningful in the TITLE parameter of the compressed files to keep track of them when using the Excel tool to calculate kinetics or JSpecView to visualize.

Labels: , , , ,

1 Comments:

At 11:45 AM, Blogger Khalid Mirza said...

Awesome!

 

Post a Comment

<< Home

Creative Commons Attribution Share-Alike 2.5 License