ipb-halle / MetFragR

R package for MetFrag
24 stars 14 forks source link

metfRag 2.0 issues #15

Closed lucanard closed 7 years ago

lucanard commented 8 years ago

Hi, I have tried to use the new metfRag 2.0, but unfortunately I found some bugs (I hope you can fix it). The biggest trouble was using ChemSpider as query database: everything works normal with PubChem, but if I query the same precursors ion and its related spectrum in ChemSpider, R starts to speedlight print some unreadable text, the process never ends and it stopped only when it filled up my hardisk with a temporary file of 29GB (and counting) in the folder C:\Users\username\AppData\Local\Temp. Smaller bugs: I could not use the settingsobject[["IsPositiveIonMode"]] because it reports this error: "Unknown type of parameter IsPositiveIonMode ( logical )". If I set the number of threads I get the error: "java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.Byte" Some of the elements are still in the possible formulas of the candidates, even if I included them in the settingsobject[["FilterExcludedElements"]]

I also would like to know in which format should I included the data regarding the RT, logP? Is the manual available somewhere?

I'm currently using windows 7, R 3.2.2 and Rstudio 0.99.489

Thank you very much

c-ruttkies commented 8 years ago

Howdy,

thanks for reporting.

I have published version 2.0.2 now and indeed I also faced some problems with caching temporary files when using ChemSpider. There are some Java libraries which are stored and needed by the ChemSpider web service. But actually they shouldn't be above several 100MB (sry, but I can't avoid that for the moment). I added a workaround that this happens not more than once and hope this shouldn't be an issue anymore. Nevertheless, it would be nice if you could paste your database parameters (without token!) you used when facing this problem. Btw, make sure you are using a service subscriber token for the ChemSpider query. The unnecessary output messages when using ChemSpider are also suppressed now. Be aware that ChemSpider web service takes some time to prepare and download all compounds. In case there are a couple of candidates (several 1000s) this can take more than a minute or two.

The problem with setting several parameters like NumberThreads should also be fixed now.

If you want to use filters like the ElementExclusionFilter you have to define them via settingsObject[["MetFragPreProcessingCandidateFilter"]]<-c("ElementExclusionFilter") and set the concerned elements e.g.: settingsObject[["FilterExcludedElements"]]<-c("Cl","Br").

I have also added a more detailed description on http://c-ruttkies.github.io/MetFrag/projects/metfragr/. There you also find some more information about including retention time.

Best regards, Christoph