Closed Theodoralee03 closed 3 months ago
Hi,
that is indeed unfortunate.
As the MetFrag installation could be verified on two separate ways, I assume it has something to do with the input data for the command.
Do the log files (stored under log/metfrag/mfcl-M..._R..._....txt
) contain any valuable information?
Kind regards,
Leon
Hi Leon,
Thank you for your help!
Here's the information in the log for one of the txt files
command: java
args: -jar C:/Users/Theodora/AppData/Local/R/win-library/4.2/patRoonExt/ext/MetFragCommandLine-2.5.0.jar C:\Users\Theodora\AppData\Local\Temp\RtmpGOxReM\parameters1f8943c5e4a30.txt
---
output:
standard error output:
Exception in thread "main" java.lang.UnsupportedClassVersionError: de/ipbhalle/metfrag/commandline/CommandLineTool has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)
I realised its a similar issue with https://github.com/rickhelmus/patRoon/issues/91#issue-1952616801 , I'll install a more updated version to try! Thank you so much!
Update: It Works!
An example from my dataset
compounds <- generateCompounds(fGroups, mslists, "metfrag", method = "CL",
+ dbRelMzDev = 5, fragRelMzDev = 5, fragAbsMzDev = 0.002,
+ adduct = "[M+H]+", database = "pubchemlite", maxCandidatesToStop = 2500)
Identifying 1477 feature groups with MetFrag...
Converting to algorithm specific adducts... Done!
|====================================================================================================================================================================| 100%
Loaded 66 compounds from 6 features (0.41%).
I downloaded the latest Java version from here https://www.oracle.com/java/technologies/downloads/#jdk21-windows
Thanks Leon for your help!
Great! Thanks @LeonSaal for the assist!
Hi everyone,
I am currently facing issues with the
generateCompounds( )
function. I am able to run both my own dataset, as well as the tutorial dataset all the way togenerateMSpeakLists()
andgenerateFormulas()
with no issues. Feature groups are recognized in my fGroups (e.g. 488 features groups for the tutorial dataset), however, I repeatedly get this error while running thegenerateCompounds ()
, in which I will obtain 0 compounds from 0 feature groups (0.00%). the warnings indicate that restarting failed MetFrag command, and it could not run MetFrag.I thought it might have to do with the installation of MetFrag; the
verifyDependencies( )
result suggest that it was able to locate the files needed for MetFrag to run. I have also installed it manually usingoptions(patRoon.path.MetFragCL = "~/MetFragCommandLine-2.4.8.jar")
Can anyone share with me any ideas on how I can resolve this issue or let me know if I had done the installation wrongly? I have also tried installing MetFrag on R manually with
install_github("c-ruttkies/MetFragR/metfRag")
to ensure all the necessary packages were installed and updated, but unfortunately, this did not help as well.Another possible reason might be due to my own dataset which is an Agilent all-ion dataset, I am concerned if the formats will be incompatible with this function. Nonetheless, with the patRoon tutorial sample dataset had the same issue, so it is highly likely to do with MetFrag installation on my PC. Please let me know if you have further questions, thank you so much in advance!