Discussion about the GUI implementation details
Clone this wiki locally
We plan to have 3 layers:
- Top layer: the GUI - see https://github.com/lgatto/msGUI/wiki/UseCasesAndMockups
- Middle layer: a common interface for different data source, described here.
- Bottom layer: the data - currently raw data files, accessed via
MSnbase- see respective packages.
About file vs. object access
The data to be plotted can have mixed origins. File access, in memory or a mix of both.
A few suggestions for the middle layer:
- define the data needed to build a complete GUI
- store it in an
environmentfor easy access by the GUI component
- write a wrapper to get the data from raw files via mzR and populate the environment
- create the GUI.
The problem with the above is that the data is duplicated, which we don't want to do. Idea 2 would be something like a set of rules:
if the data is in a file, we access it through mzR like this ...
if the data is in an MSnExp instance, we access it like this ...
For a file access, rule 1 would be the default. For and
MSnExp access, rule 2 would be the default. For mixed access, we would create a set of spectra (their acquisition numbers for example) that access via rule 2, and all the other ones through disk access.
I suggest to start working on the file access only mode. If we restrict
MSnExp visualisation to cases where the raw file is present (*), we can more or less replace that case with the former.
(*) The file name can be obtained with
fileNames(), and we can verify that it is available with