-
Notifications
You must be signed in to change notification settings - Fork 19
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
Example code to read .mgf file #44
Comments
You can read and parse spectra from MGF files using the
This can then be used as any general PyTorch dataset to provide to your model for training, validation, or testing. How you do this specifically depends on how you use PyTorch, Lightning, etc. Note that the API is currently in heavy development, so there are some breaking changes between various DepthCharge versions. The Lance integration is included in the development version if you install from GitHub, but not in the latest release on PyPI yet. |
Hi @GuptaVishu2002 - I'm planing the next release for after #43 is reviewed and merged and I'm working on documentation this week. Stay tuned! |
Hi @bittremieux , @wfondrie - thank you very much for the reply. Looking forward to the updates. |
Hi @bittremieux @wfondrie, I hope you are doing well. Would it be possible for you to give a sample code on the recommended way to incorporate arbitrary information (such as precursor_mz, precursor_charge) into the spectrum representation for the transformer (via subclassing of SpectrumTransformerEncoder class and overwriting the precursor_hook() method)? Thank You. |
Hi @GuptaVishu2002 - sorry for the delay! We're still trying to merge a major PR, then I'll get cracking on refreshed and more detailed documentation. Thanks. For now, the best place to learn how to use the precursor is to look at the unit tests: depthcharge/tests/unit_tests/test_transformers/test_spectrum_transformers.py Lines 46 to 68 in bd2861f
|
I haven't specifically added how to read an MGF file, but I just added documentation in #47 about working with mass spec data in general. Have a look and let me know if you have other questions! |
Hi, I would like to know how to read and preprocess a .mgf file using the package. Can you please help me by providing an example code for that, which can then be used to pass on other package functions such as Encoder and Transformer? Thank You
The text was updated successfully, but these errors were encountered: