ethanbass / chromConverter

Parsers for chromatography data in R (HPLC-DAD/UV, GC-FID, MS)
https://ethanbass.github.io/chromConverter/
GNU General Public License v3.0
25 stars 3 forks source link

Issue reading in ChemStation .ch files #17

Closed susanrw closed 11 months ago

susanrw commented 11 months ago

Hi Ethan-

I am importing chemstation .ch files, and for a significant portion of my files I get NaN values for intensity. Typically I have four .ch files per sample run from different wavelengths, and sometimes it happens for all four and sometimes only some of them. I can open the files without issue in ChemStation, so I know the files contain data. Unfortunately we don't have .uv files for this particular dataset.

I am running chromConverter 0.4.2

Github won't let me attach .ch files, but there are some example offensive files here if you would like to check them out: https://drive.google.com/drive/folders/1dhJe-JdV3ilXz_a_NBGWJ6COX4ENocxz?usp=sharing

With these four example files (all different wavelengths from the same run, I can read in Signal C and D but not A and B. Here is some example code:

`chroms <- read_chroms(paths="C:/Chem32/1/DATA/Loren RV/PHENOLICS 2022 2022-02-03 14-31-44", format_in = "chemstation_ch")

head(chroms[[1]]) head(chroms[[3]])  `

image

Any tips appreciated!!

Susan

ethanbass commented 11 months ago

Hi Susan, Thanks for posting this issue. There seems to be a missing field in some of the files you posted that's messing up the parser. I think this should be resolved by e4ab726. Can you try installing the new version and let me know if it solves the problem? (You'll need to refresh your R session after installing to clear the old version from the cache). Hope you're doing well!!! Ethan

susanrw commented 11 months ago

That fixed it!! Amazing, thanks so much for the quick response. Wish I'd sent this days ago :)