-
Notifications
You must be signed in to change notification settings - Fork 2
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
Convert Spectra
to array of python Spectrum
objects
#3
Comments
The documentation of the |
The additional attributes are just stored in a dict in the Maybe we can schedule an initial meeting to discuss the aims of this project? I think that might be more efficient :) |
Python |
@jorainer The Spectrum object is likely used in Spec2Vec, MS2DeepScore and also in most of our python based tools - the actual peaks are stored in a separate object. So you want something that takes a |
Exactly @hechth ! Ideally with an option to set all, or only a reduced set of additional spectra variables we have in And then also the way back would be cool (list of |
Super simple solution, without carrying any metadata for the moment:
Does any function within matchms, Spec2Vec, MS2DeepScore etc, use any other information, e.g. precursor m/z etc? I guess this has to go to the |
I don't think Spec2Vec and MS2DeepScore do, the MetadataMatch class does |
So, maybe a good solution would be to have a converter function that has a parameter to allow defining which (if any) spectra variables should be converted to Python. I would assume converting just the peaks matrix would be faster than considering also metadata, and if matchms does not use metadata anyway we should also allow to avoid this additional conversion (for performance reasons). |
I have in my branch already some functions. I can modify them to have a selection of metadata to be carried along. |
Matchms does use metadata - it can be used for filters - since metadata is just holding a dict, any kind of metadata can be stored. |
I assume the
Spectrum
class is defined in matchms? is this a general object also used in other packages? @hechth can you maybe provide more info here?Also, is there a documentation on the additional attributes and the expected data types for this type of spectrum?
The text was updated successfully, but these errors were encountered: