rformassspectrometry / Spectra

Low level infrastructure to handle MS spectra
https://rformassspectrometry.github.io/Spectra/
34 stars 24 forks source link

refactor: replace Spectra,DataFrame by Spectra,ANY #156

Closed jorainer closed 3 years ago

jorainer commented 3 years ago

Implement a Spectra,ANY constructor method that imports data using the source backend (eventually converting to backend backend). This supports also to create a Spectra object based on a e.g. database connection, given that the MsBackend specified with source knows how to handle that (issue #152).

I think this will save us from unnecessary additional implementation of constructor methods, e.g. for Spectra,DBIconnection or similar.

lgatto commented 3 years ago

Very elegant, thanks!

jorainer commented 3 years ago

If OK I would also make this change in the release version of the package. This shouldn't break anything but allow us to directly use this new constructor...

lgatto commented 3 years ago

Yes, please go ahead.