Metabolomics Society Forum

Software => R => XCMS => Topic started by: florian.geier on May 09, 2012, 07:24:16 PM

Title: Not able to read a write.cdf() written NetCDF file
Post by: florian.geier on May 09, 2012, 07:24:16 PM
Dear XCMS team,

first - thanks a lot for maintaining and further pushing this great piece of software!

However, I have ran into a problem regarding the compatibility of written CDF files, using the function write.cdf() .

If I read a file into an xcmsRaw object and output it via write.cdf() like
Code: [Select]
write.cdf(xcmsRaw("AnyFile.CDF"),file="AnyFile_2.CDF") 

I am able to read it back into xcms, plot it, peak pick it, etc. But I am not able to read it into any other programme such as ADMIS ("Cannot read header record in GC/MS data file"), ChemStation (... is not a compatible AIA file).

Using NetCDF as file format is vital as I need to read files into AMDIS (which doesn't support any XML formats). - Do you have any suggestions?

Many thanks,


Florian
Title: Re: Not able to read a write.cdf() written NetCDF file
Post by: Carsten on May 10, 2012, 02:50:39 AM
As far as I know, the cdf object written by write.cdf() can be read again only by xcms itself.
Other programs like AMDIS or OpenMS fails, because they have additional requirements for the generated cdf.

I'm not sure, if there was some progress in the xcms development, since the last time I checked.
Title: Re: Not able to read a write.cdf() written NetCDF file
Post by: sneumann on May 14, 2012, 01:25:23 AM
Hi Florian,

Quote from: "florian.geier"
...But I am not able to read it into any other programme such as ADMIS ("Cannot read header record in GC/MS data file"), ChemStation (... is not a compatible AIA file)"

I have extended the CDF export in xcms, could you try http://msbi.ipb-halle.de/~sneumann/ko16-xcms.cdf (http://msbi.ipb-halle.de/~sneumann/ko16-xcms.cdf)
and report if that works ? It loads in AMDIS without error, but doesn't look great. Can you check other programs ?

Yours,
Steffen
Title: Re: Not able to read a write.cdf() written NetCDF file
Post by: florian.geier on May 16, 2012, 10:45:29 AM
Dear Carsten, Dear Steffen,

thanks for helping!

@ Carsten: I already feared that. I had a look into the write.cdf() code and it writes much less variables than I would see via
Code: [Select]
cdf <- open.ncdf("ko16-xcms.cdf"); 

@ Steffen: I updated to 1.33.9 and even tried the SVN checkout. However, AMDIS will still not load created files. As I wrote above, I inspected the code and the only variables written into the new cdf are  "scan_acquisition_time, total_intensity, scan_index, total_intensity, mass_values, intensity_values". Have I missed something or is it possible that I still not have the "latest" release. 

Thanks so much for helping with this!

All the best from London,


Florian
Title: Re: Not able to read a write.cdf() written NetCDF file
Post by: sneumann on May 19, 2012, 04:21:53 PM
Hi Florian,

no, I hadn't committed the code before it worked with AMDIS,
(which I discovered runs under wine), but I have now as 1.33.10.

You get a very strange straight linear TIC. If you have any idea what's
wrong with the written CDF, I am all ears.

Yours,
Steffen
Title: Re: Not able to read a write.cdf() written NetCDF file
Post by: sneumann on June 05, 2012, 01:34:53 PM
Hi Florian,

did you check, and do you have an idea what's missing ?

Yours,
Steffen
Title: Re: Not able to read a write.cdf() written NetCDF file
Post by: sneumann on June 14, 2012, 03:27:32 PM
Hi Florian,

I have now committed xcms-1.33.13 which should fix the CDF export
so that AMDIS can read it. At least it works for

Code: [Select]
library(xcms)
xr <- xcmsRaw("ko16.cdf")
write.cdf(xr, file="ko16-xcms.cdf")

which you also find at http://msbi.ipb-halle.de/~sneumann/ko16-xcms.cdf (http://msbi.ipb-halle.de/~sneumann/ko16-xcms.cdf)

Does it work for you now ?

Yours,
Steffen