You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Nir (@AharoniLab) had the excellent idea that it might be good to allow matching against several reference databases in one go. The idea would be to allow calls like:
where references would be a set of reference databases against which the function would sequentially match the experimental spectra sps_exp. While an easy solution would be to use simply e.g. a list of Spectra objects as references, we thought it might be even better to introduce a further abstraction to simplify the use also for the user: instead of having to e.g. download a database or make a connection to a database, annotation source object should be used instead. These contain the information how to connect to the database and perform all the necessary steps (i.e. connect to the database or download the file, ...).
A further advantage is that this would allow to match against reference databases that are not fully open because the user will never get a Spectra object with all the reference data. Example: WeizMass: instead of needing a Spectra object with the full WeizMass data a WeizMass annotation source object is provided to matchSpectra and this object takes care of connecting to the database. As a result only matching data from WeizMass are provided, but not the full WeizMass library.
Thus, by introducing annotation source objects that don't contain or provide any data themself we could enable also matching against databases for which no full data access is possible and it could also simplify the use for the user (see example below).
Implementation notes
What I would propose is the following:
Define a (virtual) S4 class CompoundAnnotationSource.
Define a WeizMassSource S4 class extending CompoundAnnotationSource.
This WeizMassSource class should implement a matchSpectra method. This function should compare then the experimental spectra against WeizMass using the provided param and return the results. Connecting to the database, getting a Spectra object to enable comparison etc will all be performed within that function and the full WeizMass data will thus never be exposed to the user.
In addition, define a CompDbSource S4 class extending CompoundAnnotationSource. The CompDbSource constructor function takes the name of the CompDb SQLite database as input parameter. In the longer run CompDb databases (e.g. for MassBank or MoNA) should be retrieved from Bioconductor's AnnotationHub.
To make life for the user easier we could add a MassBank function that retrieves the CompDb for MassBank (for a certain release) from AnnotationHub and returns a CompDbSource with that data.
A call to match against WeizMass could then e.g. look like:
Note: I've now made a first PR (#89 ) to add the basic concept of the annotation sources and examples to integrate MassBank. Development to integrate WeizMass continues in the weizmass_source branch.
Nir (@AharoniLab) had the excellent idea that it might be good to allow matching against several reference databases in one go. The idea would be to allow calls like:
where
references
would be a set of reference databases against which the function would sequentially match the experimental spectrasps_exp
. While an easy solution would be to use simply e.g. alist
ofSpectra
objects asreferences
, we thought it might be even better to introduce a further abstraction to simplify the use also for the user: instead of having to e.g. download a database or make a connection to a database, annotation source object should be used instead. These contain the information how to connect to the database and perform all the necessary steps (i.e. connect to the database or download the file, ...).A further advantage is that this would allow to match against reference databases that are not fully open because the user will never get a
Spectra
object with all the reference data. Example: WeizMass: instead of needing aSpectra
object with the full WeizMass data a WeizMass annotation source object is provided tomatchSpectra
and this object takes care of connecting to the database. As a result only matching data from WeizMass are provided, but not the full WeizMass library.Thus, by introducing annotation source objects that don't contain or provide any data themself we could enable also matching against databases for which no full data access is possible and it could also simplify the use for the user (see example below).
Implementation notes
What I would propose is the following:
CompoundAnnotationSource
.WeizMassSource
S4 class extendingCompoundAnnotationSource
.WeizMassSource
class should implement amatchSpectra
method. This function should compare then the experimental spectra against WeizMass using the providedparam
and return the results. Connecting to the database, getting aSpectra
object to enable comparison etc will all be performed within that function and the full WeizMass data will thus never be exposed to the user.CompDbSource
S4 class extendingCompoundAnnotationSource
. TheCompDbSource
constructor function takes the name of the CompDb SQLite database as input parameter. In the longer runCompDb
databases (e.g. for MassBank or MoNA) should be retrieved from Bioconductor'sAnnotationHub
.MassBank
function that retrieves theCompDb
for MassBank (for a certain release) from AnnotationHub and returns aCompDbSource
with that data.A call to match against WeizMass could then e.g. look like:
Or against WeizMass and MassBank
Input, comments etc highly welcome!
The text was updated successfully, but these errors were encountered: