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
88 stars 22 forks source link

Cannot import sdf or json files for custom database #203

Closed mik-rad closed 2 weeks ago

mik-rad commented 1 month ago

I have been getting errors when importing molecule files from sdf, msp and json file types which should all be compatible with the custom database imports. Most notably I cannot import downloaded databases from Massbank of North America, from the sdf file I get the following error:

java.lang.Exception: Following files could not be imported: 'MoNA-export-LC-MS_Spectra.sdf' at de.unijena.bioinf.ms.nightsky.sdk.jjobs.SseProgressJJob.updateAndCheckIfDone(SseProgressJJob.java:128) at de.unijena.bioinf.ms.nightsky.sdk.jjobs.SseProgressJJob$1.onNext(SseProgressJJob.java:75) at de.unijena.bioinf.ms.nightsky.sdk.jjobs.SseProgressJJob$1.onNext(SseProgressJJob.java:64) at de.unijena.bioinf.sse.FluxToFlowBroadcast.lambda$onNext$7(FluxToFlowBroadcast.java:103) at java.base/java.lang.Iterable.forEach(Unknown Source) at de.unijena.bioinf.sse.FluxToFlowBroadcast.onNext(FluxToFlowBroadcast.java:99) at de.unijena.bioinf.ms.nightsky.sdk.NightSkyClient.lambda$enableEventListening$3(NightSkyClient.java:198) at reactor.core.publisher.LambdaSubscriber.onNext(LambdaSubscriber.java:160) at reactor.core.publisher.FluxPublishOn$PublishOnSubscriber.runAsync(FluxPublishOn.java:446) at reactor.core.publisher.FluxPublishOn$PublishOnSubscriber.run(FluxPublishOn.java:533) at reactor.core.scheduler.WorkerTask.call(WorkerTask.java:84) at reactor.core.scheduler.WorkerTask.call(WorkerTask.java:37) at java.base/java.util.concurrent.FutureTask.run(Unknown Source) at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.base/java.lang.Thread.run(Unknown Source)

Is there anyway to fix this as it will not import all of the spectra and it is a database that I want to match spectra against. For the json file of the same spectra it has a similar error except for stating that the files do not have associated smiles. I am working with the 6.0.4 version of SIRIUS and had the same problems with v6.0.0.

mfleisch commented 1 month ago

We got some reports where people have problems to load file from network drives. Is your file maybe located on a network drive?

What OS are you using? Can you provide a link to the file you are using?

mik-rad commented 1 month ago

The databases for import are all on the local disk of my computer. I am using the windows version and its version 6.0.5 that I am currently using, just checked. The file size is to big so I have attached the link to where I downloaded it from. Its the LC-MS spectra downloaded in sdf and json format.

https://mona.fiehnlab.ucdavis.edu/downloads

I have previously imported the Massbank Europe dataset which worked fine so I am wondering if the file format MoNA uses is not quite right.


From: Markus Fleischauer @.> Sent: Tuesday, 17 September 2024 5:59 PM To: sirius-ms/sirius @.> Cc: Mikaela Radke @.>; Author @.> Subject: Re: [sirius-ms/sirius] Cannot import sdf or json files for custom database (Issue #203)

You don't often get email from @.*** Learn why this is importanthttps://aka.ms/LearnAboutSenderIdentification

We got some reports where people have problems to load file from network drives. Is your file maybe located on a network drive?

What OS are you using? Can you provide a link to the file you are using?

— Reply to this email directly, view it on GitHubhttps://github.com/sirius-ms/sirius/issues/203#issuecomment-2354815013, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BLLG3JVFP4EEY74DSR54MRDZW7OPNAVCNFSM6AAAAABOK3ULP6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNJUHAYTKMBRGM. You are receiving this because you authored the thread.Message ID: @.***>

MartinHoffmannJena commented 1 month ago

Hi,

The issue here is that many spectra in that file have a Spectrum type set that is not supported by SIRIUS (e.g. MS3 or MS2-MS5 composite, when SIRIUS only supports MS1 and MS2).

Instead of cancelling the import, these unsupported spectra should just be skipped instead, we'll fix that. In the meantime, you can split the .sdf file so that you have 1 .sdf file per compound, that way SIRIUS will parse all spectra that it can.

mik-rad commented 1 month ago

Thank you for finding the problem, great to know it isn’t anything I am doing wrong. I really appreciate it!

Mikaela


From: Martin Hoffmann @.> Sent: Tuesday, September 17, 2024 11:37:25 PM To: sirius-ms/sirius @.> Cc: Mikaela Radke @.>; Author @.> Subject: Re: [sirius-ms/sirius] Cannot import sdf or json files for custom database (Issue #203)

You don't often get email from @.*** Learn why this is importanthttps://aka.ms/LearnAboutSenderIdentification

Hi,

The issue here is that many spectra in that file have a Spectrum type set that is not supported by SIRIUS (e.g. MS3 or MS2-MS5 composite, when SIRIUS only supports MS1 and MS2).

Instead of cancelling the import, these unsupported spectra should just be skipped instead, we'll fix that. In the meantime, you can split the .sdf file so that you have 1 .sdf file per compound, that way SIRIUS will parse all spectra that it can.

— Reply to this email directly, view it on GitHubhttps://github.com/sirius-ms/sirius/issues/203#issuecomment-2355832847, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BLLG3JUKTGUVLTH7KVSVKCTZXAWBLAVCNFSM6AAAAABOK3ULP6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNJVHAZTEOBUG4. You are receiving this because you authored the thread.Message ID: @.***>

MartinHoffmannJena commented 2 weeks ago

This is now fixed in 6.0.7, please reopen this issue if the problem persists