Open lgatto opened 1 year ago
Or should we go directly for MsExperiment
instead? IMO a spectra without sample information might not be too useful.
I suppose you refer to this issue.
But we can't necessarily anticipate what the developer is sharing their data for. And your suggestion requires two inputs (and mzML and the sample annotation), and I'm not sure this fits the bill here, as the hub infrastructure is mean to share (individual) files. To fit your suggestion, we should share two files, one that could be loaded as a Spectra
object directly (as per my message above) and a second one loaded as a data.frame
, and both can be used to construct an MsExperiment
.
Hm, agree - and needing two separate files would not be ideal. So, we might go for Spectra
and have one Spectra
object for each mzML file then?
Yes, I think that's the basic idea - I share a file and it get loaded automatically as the best object. If, as a developer, I want a Spectra object containing data from multiple files, it would be my job to create that files beforehand.
yes. makes sense.
I want a Spectra object containing data from multiple files, it would be my job to create that files beforehand.
Or simply join the Spectra
from the individual files using c
.
When creating an ExperimentHub package, it is possible to define dispatch classes, so that some file types can be loaded automatically and returned as predefined objects. See
AnnotationHub::DispatchClassList()
:For
MsDataHub
, we want"FilePath"
, as we want to get the file path and then load the data ourselves. We could also directly get the desired object, for example aSpectra
object created bySpectra()
if the file is anmzML
.Should we ask to add
Spectra
(and possibly others such asPSM
formzid
files) to the default dispatch classes?Ping @jorainer