Git Product home page Git Product logo

Comments (20)

silasmellor avatar silasmellor commented on June 12, 2024 1

Hey Ethan, i was actually not aware of that, that sounds excellent! I will try it and upload the ascii file for you.
Thanks again,
Silas

from chromconverter.

silasmellor avatar silasmellor commented on June 12, 2024 1

Hey Ethan, here is the corresponding ASCII from LabSolutions.
Anthocyanin_2_MeOH001.txt

from chromconverter.

silasmellor avatar silasmellor commented on June 12, 2024 1

Yep, you're right, i had restarted the session before reinstalling from github but didn't think to do so after... works now!

from chromconverter.

ethanbass avatar ethanbass commented on June 12, 2024

I will try to look into it, though I can't really make any promises or give you a timeline. It's a little bit tricky since the format is not documented at all, as far as I know. It would be helpful if you could provide a little more information about your file (e.g. what kind of instrument/software it was produced with and what the detectors are on the machine). Thank you for sharing the file!
Ethan

from chromconverter.

silasmellor avatar silasmellor commented on June 12, 2024

Hey Ethan, that is all i can ask! The file comes from Shimadzu Lab Solutions v 5.71. The instrument is a shimadzu LC-20 with PDA iirc, but i will double check and let you know.

from chromconverter.

ethanbass avatar ethanbass commented on June 12, 2024

Thanks. Also, you may already know this (and I know it's not as convenient as reading the .lcd files directly), but I believe you can export the raw PDA data from LabSolutions by right clicking the sample name and selecting File Conversion:Convert to ASCII. These ascii txt files do have a parser in chromConverter already.

Also, if you can generate the ascii file for the .lcd file you sent it would be helpful to have as a point of comparison.

from chromconverter.

ethanbass avatar ethanbass commented on June 12, 2024

Thanks for providing this file! I don't know if you tried to read it yet using chromConverter, but it actually throws an error because it has commas as the decimal separator (european style) rather than periods (american style). I will put up a patch shortly that can read the european-style files.

from chromconverter.

ethanbass avatar ethanbass commented on June 12, 2024

This should be fixed by 725ddff. You should now be able to read in these ascii files at least:

x<-read_chroms(path_to_file_or_files, format_in="shimadzu_dad")

from chromconverter.

silasmellor avatar silasmellor commented on June 12, 2024

Hey Ethan, yep i did try it with the ascii and got an error, but didnt have time to figure out what it was about. Well, you fixed it before i even got that far so thanks once again!

from chromconverter.

silasmellor avatar silasmellor commented on June 12, 2024

edit:fixed the format_in parameter, still get an error...
edit:tried updating from CRAN and github, same thing

Warning in read_chroms(paths = "Anthocyanin_2_MeOH001.txt", format_in = "shimadzu_dad") :
Error in scan(file = file, what = what, sep = sep, quote = quote, dec = dec, :
scan() expected 'a real', got '0,00000'

I feel i should apologize on behalf of european PCs, for some reason comma is default decimal here even though it means we have to jump through all sorts of hoops with our data files...

from chromconverter.

ethanbass avatar ethanbass commented on June 12, 2024

This is the old error -- it should be fixed in the latest version. Did you refresh your R session after reinstalling the package? Usually the old package is still cached if you install a new version of a package and don't reset your R session. The CRAN version will not be updated for a while, so that one will not work.

I'd suggest:

  1. install new version from github: remotes::install_github("ethanbass/chromConverter"
  2. Reset R session (In R studio, you can do this by selecting Session:Restart R).
  3. Reload the package: library(chromConverter)
  4. Try again: read_chroms("Anthocyanin_2_MeOH001.txt", format_in="shimadzu_dad")

from chromconverter.

ethanbass avatar ethanbass commented on June 12, 2024

Excellent! I'm glad to hear it is working now

from chromconverter.

captainsailboat avatar captainsailboat commented on June 12, 2024

Fully willing to do what I can to help with adding a .lcd parser, it would make life a lot easier! Let me know if there is anything I can do to help.

from chromconverter.

ethanbass avatar ethanbass commented on June 12, 2024

Hi @captainsailboat. Do you need a parser for the DAD format or mass spec data? I think there are similarities but the formats aren't exactly the same. I have been working a little bit on the DAD file I got from @silasmellor and have managed to partially decode it but there are still some things I haven't been able to figure out. Do you have any experience decoding binary files? If so, I could try to share with you what I have so far and you could have a look for yourself. Otherwise, it would be helpful to have a few more example .lcd files (along with the corresponding ASCII files) to check the validity of what I've worked out so far.

from chromconverter.

ethanbass avatar ethanbass commented on June 12, 2024

I think I have this mostly figured out. I uploaded the parser to the Shimadzu LCD branch (https://github.com/ethanbass/chromConverter/tree/shimadzu_lcd) if ya'll want to try it out. I haven't figured out yet where the retention times are stored yet in the file but the absorbance values are correct (at least for the file I received from @silasmellor). It is also quite slow, it takes over a minute on my computer to parse one file. You can access the parser (for now) using the read_shimadzu_lcd function.

from chromconverter.

ethanbass avatar ethanbass commented on June 12, 2024

I believe the final retention time should be stored somewhere in these two streams, but I haven't been able to figure out yet how it's encoded.

3D_data_item.txt
2D_data_item_stream.txt

from chromconverter.

captainsailboat avatar captainsailboat commented on June 12, 2024

I am struggling to figure out how to utilize this. I have installed R-studio and opened the R file, but am not sure how to actually carry out the conversion. I am also solely using this to analyze the m/z values of fragments at this time so retention times are of little interest to me. If there are instructions somewhere on how to use this script please do guide me to that location. Thank you!

from chromconverter.

ethanbass avatar ethanbass commented on June 12, 2024

Hi @captainsailboat, sorry for the misunderstanding -- the parser i've written so far can only extract the diode array detector stream as I mentioned above, which was the subject of the original issue.

I'm not sure yet how similar the encoding is for the mass spec data. While i'd be interested in trying to figure out the mass spec stream, I have very limited time to work on this and I also don't have a lot of example files to work with.

You might want to check out ProteoWizard (https://proteowizard.sourceforge.io/doc_users.html), I think they support conversions of (some?) .lcd files to mz(X)ML.

from chromconverter.

captainsailboat avatar captainsailboat commented on June 12, 2024

from chromconverter.

ethanbass avatar ethanbass commented on June 12, 2024

That would be helpful if you could send some example files! You should be able to upload them directly here (you may need to change the extensions to something github likes like .txt) or you could email them to me. Could you also describe in a little more detail what kind of data is contained in the two mzXML files and what form you're trying to get the data into for further analysis? If it's a similar instrument to the one discussed in this thread (rietho/IPO#32) it sounds like maybe the two files contain data from positive and negative ionization modes...?
Ethan

from chromconverter.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.