sirius-ms / sirius

SIRIUS is a software for discovering a landscape of de-novo identification of metabolites using tandem mass spectrometry. This repository contains the code of the SIRIUS Software (GUI and CLI)
GNU Affero General Public License v3.0
78 stars 17 forks source link

Question/Request: offline (custom) databases #42

Closed rickhelmus closed 2 years ago

rickhelmus commented 3 years ago

Hi guys,

I was wondering if it is possible to use an offline database with SIRIUS/CSI:FingerID? I tried a test DB created with the custom-db tool, but it seems data is still fetched from the servers.

Background: I am running SIRIUS on CI for automated patRoon tests. It may happen that connection issues make tests fail or slow down considerably, and it doesn't 'feel' very nice either that CI is abusing the CSI servers once in a while... With MetFrag I got around this by using local CSV databases, so I was hoping to do something similar for SIRIUS.

Thanks, Rick

mfleisch commented 3 years ago

Hey Rick, the database is not the main issue here, since it is cached locally and if you would transfer the cache to your test instance, SIRIUS would not fetch the candidates from the Server again.

However, it still checks whether the db is valid. But, more important, the fingerprint predictions are done on the server side anyways.

One solution would be some kind of Mock/Test mode that uses precomputed results instead of querying the server.

One possibility could be starting SIRIUS with fully computed project-space without --recompute flag. this would execute all tools but skip the computation for each compound.

We just need to ensure that no "connection check" prevents the execution which should currently be the case I guess.

I will have a look if something like that is possible with a moderate amount of work.

Would that fit your needs?

rickhelmus commented 3 years ago

Hi Markus,

I think this would be a good solution. Ideally the precomputed results would be created easily (eg to update to new SIRIUS versions), transferable between system environments (eg to CI) and work with batch queries. I think this approach would tick all those boxes.

Thanks, Rick

mfleisch commented 2 years ago

With version 4.9.0 you should be able to run an offline test on a precomputed project-space. You need to use the hidden developer parameter --no-project-check to skip the check of the fingerprint definitions.

The workflow would be like this:

  1. create precomputed project sirius -i <testInput.ms> -o <precomputed-project> sirius fingerid canopus

  2. Test command sirius --no-project-check -o <precomputed-project> sirius fingerid canopus

The second command should run without connection to our servers.

mfleisch commented 2 years ago

fixed with version 4.9.0

Feel free to reopen if the issue remains unresolved.