Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unknown doesn't have a parser for Chemstation .ch FID data #42

Closed
nhadler opened this issue Nov 2, 2022 · 8 comments
Closed

Unknown doesn't have a parser for Chemstation .ch FID data #42

nhadler opened this issue Nov 2, 2022 · 8 comments

Comments

@nhadler
Copy link

nhadler commented Nov 2, 2022

When I try to load an FID file from chemstation Rev. C.01.07 via entab-cli and it throws an error:

> cat FID1A.ch | entab
##### AN ERROR OCCURRED ####
Unknown doesn't have a parser
#####

I've attached the file below

FID1A.ch.txt

@bovee
Copy link
Owner

bovee commented Nov 5, 2022

Thanks for filing this and for attaching an example!

I checked the file and the magic is [0x03, 0x31, 0x37, 0x39] ("179" in ASCII) which had some rough support in Aston. It should be relatively easy to port that over although I'm not sure that was necessarily returning the correct numbers.

Separately, this error message could be more helpful for debugging so I opened #43 to improve it.

@nhadler
Copy link
Author

nhadler commented Nov 5, 2022

Awesome. I can attach the exported CSV files from chemstation if that helps.

@bovee
Copy link
Owner

bovee commented Nov 11, 2022

A CSV would be really helpful; I rewrote the old Aston code into Rust (as a new branch here), but the number of records and the intensities both aren't quite right.

@ethanbass
Copy link
Contributor

Maybe the documentation included with rainbow can be helpful here as well (https://rainbow-api.readthedocs.io/en/latest/agilent/ch_fid.html)

@ethanbass
Copy link
Contributor

ethanbass commented Nov 27, 2022

I obtained some 181 type files and they seem to be very similar to the 179 except they are encoded in the big endian instead of the little endian as seems to be the case for the 179. I can share the 181 files with you over email if you'd like to have a look.

I wrote a little parser in R that seems to work for both versions (179 & 181) as far as I can tell, but i'm not sure if it's reading the file at the top of this thread correctly. The output is looking a little funny to me
image

@bovee
Copy link
Owner

bovee commented Nov 27, 2022

Yeah, I'm not totally sure, but I think the FID1A.ch file above might be slightly atypical of this format? A CSV/other open format export from Chemstation would help debug.

I'm a little busy with family and work for the near future, but happy to add 180/181 files to the backlog. Also happy to take pull requests! :)

@ethanbass
Copy link
Contributor

Sounds good. I don't really know any rust at this point, but maybe some day i will try to learn. Happy holidays!

@ethanbass
Copy link
Contributor

ethanbass commented Nov 28, 2023

I checked it out in GC Chemstation (Rev. B.04.02 SP1 [212]) and the chromatogram I posted above seems to match (except there's something weird going on with the y-units).
nhadler

@bovee bovee closed this as completed in bc967b1 Jul 11, 2024
bovee added a commit that referenced this issue Jul 11, 2024
I don't have any 181 files to test with, but it should be easy to
adapt the new code to them too. I rewrote how metadata is extracted
from these files too.

Closes #42.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants