The COMSPARI Homepage

Screenshots | Authors | License | Download | To do | History


COMSPARI is the acronym for COMparison of SPectral And Retention Information. It is a software that has been written to facilitate the analysis of "paired" samples, i.e. samples that are almost identical yet present some qualitative difference. The software was originally written for the analysis of data files produced by GC/MS and LC/MS, but can be used for other techniques, too.

cdf2ascii, included with the COMSPARI package, is probably also of use for anybody that desires to write programs or use existing programs that want to deal with flat ASCII files rather than NetCDF files.

The program is currently (that is, fall 2003) in an early, yet fully operational stage. It has a command-line interface and a simple graphic display based on gnuplot. The program was developed under Linux and should generally compile on any POSIX-compliant platform. In addition, it is also operational under recent versions of Microsoft Windows.

There are some informational files that are included with the distribution snapshots that we are linking to here for quick reference; these are: README, INSTALL, QUICKSTART, LICENSE


spectral similarity at selected ion 108 spectral difference at selected ion 319 comparing the chromatograms at scan 309 comparing TIC's

We will add some more information, examples etc. as time permits.


The authors are Jonathan Katz (original author) and Jörg Hau.


COMSPARI and its related packages are Free Software and are published under the GNU General Public License (GPL). You can redistribute it and/or modify it under the terms of the GPL, which ensures that its source code is free and that any derivitization or implementation of it in other software will also remain free.

The difference between "free software" and "freeware" is of legal importance. If you do not understand any portion of this license, please seek appropriate professional legal advice. If you do not or if - for any reason - you can not accept all of the conditions of the GPL, then you must not use nor distribute this software.


The COMSPARI software package depends on several other packages. For "normal" use on a standard Linux system, all you need is gnuplot, a scientific data plotting package and the prebuilt/essentials package.

If you want to recompile comspari or cdf2ascii or if you want to do other development work, you will also need the netCDF library and the ANDI-MS libraryANDI-MS library to access the netCDF data files. You might also want to pick up the GNU readline package.

For convenience, we provide several different compilations for download:

All-in-One: This contains everything that is in the prebuilt, sample, and required tarballs below, in one huge file. This is useful if you need to make COMSPARI work e.g. on someone else's computer without installing any system-wide software. It is also handy to download if this is your first time running COMSPARI and you want to get everything set up like we have it.
Download: comspari-current-all.tgz (Size: 14M , comspari-20031215-all.tgz )

Core files: This archive contains just the "essential" files (comspari, cdf2ascii, cdfinfo) and their source code. If you already have COMSPARI working, this is probably what you are looking for to stay updated. It is very unlikely that we will be changing the sample or required packages in the near future. This package assumes that you already have the required libraries and gnuplot installed.
Download: comspari-current-prebuilt.tgz (Size: 584K , comspari-20031215-prebuilt.tgz )
Latest Beta Release: comspari-current-BETAprebuilt.tgz (Size: 592K , comspari-20031020-BETAprebuilt.tgz )

Sample data files: This archive file contains just the two datasets, "ko" and "wt", in NetCDF format. Using these files, you can try out the COMSPARI package without generating your own dataset(s).
Download: comspari-current-sample.tgz (Size: 3.8M , comspari-20030822-sample.tgz )

Additional packages: These are packages that we did not write and we do not maintain. They are provided here as a convenience but you should consider getting these packages from the original sources.
Download: comspari-current-required.tgz (Size: 9.4M , comspari-20030925-required.tgz )

Original Sources:

To Do

The Comspari software is in a fully operational stage. However, the more you use it, the more options come to mind ;-) ... a few of those possibilities are:

Things that are somewhat "unstable" and that should be fixed in the future:


Added ability to display "difference plots" to stable branch(JHa)
A paper about COMSPARI is currently nearing publication.
comspari: minor step bug fix, ? now invokes help
cdf2ascii: fixed a memory allocation bug (not allocating enough memory at times)
comspari: scaling now works with floats (20030926)
Added "readline" to the required packages distribution.
cdf2ascii: added -i (info), obsoleting cdfinfo
cdf2ascii: another usage change, -o specifies an output dir, -O specifies a dir and prefix for output files.
output file suffices now are .chro (was .mz) and .spec (was .scan).
comspari: now has nice command-line and mouse annotation features!
Minor changes in comspari-20030904-prebuilt.tgz
Removed GetKey/Input from COMSPARI and reverted to a line processing system for command processing; this fixed all white space and buffer issues known.
Made the prefix option in cdf2ascii fully descriptive, i.e., if a prefix is specified the source filename does not contribute to the definition of the output prefix
Made Jörg Hau's better looking version of the website the live version.
comspari: Fixed bug in GetKey() that caused double display of TIC traces. - Corrected line colors for TIC. - Printing routine works now as it was always intended :-).
cdf2ascii: Introduced a control structure (to hold all those flags together ;-). - Added minscan/maxscan parameter. - All min/max parameters (scan and m/z) are now also valid for raw dump. - Replaced *tic by calculation on-the-fly. - Replaced code for raw scan dump by the same routine from 'cdfread.c'. - Fixed bug in the scan counter in open_cdf_ms(). - Fixed potential bug in min/max scan/mass range assignment. - ASCII files now with header line. - Added various error checks.
Split packages so that you can just download new versions without having to re-download the other stuff.
Bugfix release comspari-20030822-prebuilt.tgz.
cdf2ascii: Fixed an error in TIC file output.
New functionalities in comspari-20030819.tgz
cdf2ascii: Now outputs a PREFIX.tic file.
comspari: Now has functionality to show TIC files, either overlapped and offset or head-to-tail.
Code optimisation. comspari-20030818.tgz.
cdf2ascii:. Put back in the -m/M and -R (formerly -S) functionality. - -o prefix specifies the entire prefix (i.e., do: -o out/wt). - Changed some code formatting and memory allocation code.
Major changes in comspari-20030814.tgz.
cdf2ascii: More resistant to misuse/errors :-) . - Output filename is now automagically derived from input filename. - Ported integer-mass processing (also for profile data) from "cdf2msg.c". - Can apply a mass defect (default is 0.3  at m/z 1000). - Changed ASCII filename convention, now "file_0123.[mz|scan]". - Changed some variable names ("scan" and "mass" instead of x, y ;-). - Introduced a control structure that holds min/max info for mass and scan; this can e.g. be used to convert only a part of the file. - Removed "raw scan" and "m/z range" functionality -m/M, -S.
comspari: Added command line parser. - Data files now listed on command line. - Mass Spectra now plotted as histograms.
Added functionality in comspari-030811.tgz.
cdf2ascii: Added m/z range functionality (-m -M) and "raw scan dump" functionality (-S).
comspari-030807.tgz, first internal release.