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 23 forks source link

How to run in CLI mode #111

Closed verl166 closed 1 year ago

verl166 commented 1 year ago

Downloaded the GUI + CLI version of SIRIUS recently, but whenever I run the CLI .exe file, it reads "You run SIRIUS in 'GUI' mode".

How do I get it to run in 'CLI' mode?

verl166 commented 1 year ago

I need the CLI version, since I seem to be unable to 'Export Current Tree View' for all compounds at once (there is only a single button for doing the above for that one compound) on the GUI version, while the online documentation seems to suggest I can do so on the CLI version. The excerpt is below:

_Fragmentation tree export tool

The ftree-export tool exports the fragmentation trees of a given project-space (sirius -i ) in various formats (--json, --dot) to a given output directory (--output

). The --all option specifies whether fragmentation trees of all formula candidates (of a compound) or only of the top formula candidate will be exported.

The following example will export the top ranked fragmentation tree of all compounds in the project space in dot format.

sirius --input <project-space> ftree-export --dot --output <output-dir>_

verl166 commented 1 year ago

I have also tried downloading the "CLI Only" Version, but it did not work.

Here's the error message:

I know it says Sirius 4.9, but I tested with the latest 5.6 version and the same error appeared too. It just tells me about the usage and then says "CLI shut down hook: SIRIUS is cleaning up threads and shuts down..."

Mar 23, 2023 7:41:50 PM org.apache.commons.beanutils.FluentPropertyBeanIntrospector introspect INFO: Error when creating PropertyDescriptor for public final void org.apache.commons.configuration2.AbstractConfiguration.setProperty(java.lang.String,java.lang.Object)! Ignoring this property. INFO 19:41:50 - Sirius Workspace Successfull initialized at: C:\Users\FrogM.sirius-4.9 INFO 19:41:50 - You run SIRIUS 4.9.12 INFO 19:41:50 - Sirius was compiled with the following ILP solvers: GLPK-v1.7.0 (included), Gurobi-v9.1.1, CPLEX-v12.7.1, COIN-OR-v1.17.3 INFO 19:41:59 - Treebuilder priorities loaded from 'sirius.properties' are: [GUROBI, CPLEX, CLP, GLPK] INFO 19:41:59 - CPU check done. 8 cores that handle 16 threads were found. INFO 19:41:59 - Bug reporter initialized. INFO 19:41:59 - Web API initialized. INFO 19:41:59 - Running with following arguments: [--help] INFO 19:41:59 - Job manager successful initialized with 8 CPU thread(s) and 3 IO thread(s). Usage: sirius [[-o=] [--update-fingerprint-version] [--naming-convention=]] [[[--ignore-formula] [--allow-ms1-only] -i=[,

...] [-i=[,...]]...] [-z= [--adduct=] -2=[,...] [-1=[,...]] [-f=]]...] [-hV] [--noCite] [--noSummaries] [--recompute] [--compound-buffer=] [--cores=] [--log=] [--maxmz=] [COMMAND] -h, --help Show this help message and exit. -V, --version Print version information and exit. --log, --loglevel= Set logging level of the Jobs SIRIUS will execute. Valid values: SEVERE, WARNING, INFO, FINER, ALL Default: WARNING --cores, --processors= Number of cpu cores to use. If not specified Sirius uses all available cores. --compound-buffer, --initial-compound-buffer= Number of compounds that will be loaded into the Memory. A larger buffer ensures that there are enough compounds available to use all cores efficiently during computation. A smaller buffer saves Memory. To load all compounds immediately set it to -1. Default (numeric value 0): 3 x --cores. Note that for the compound buffer may have no effect because this tools may have to load compounds simultaneously into the memory. Default: 0 --recompute Recompute results of ALL tools where results are already present. Per default already present results will be preserved and the instance will be skipped for the corresponding Task/Tool --maxmz= Only considers compounds with a precursor m/z lower or equal [--maxmz]. All other compounds in the input will be skipped. Default: Infinity --noSummaries, --no-summaries Do not write summary files to the project-space --noCite, --noCitations, --no-citations Do not write summary files to the project-space Specify OUTPUT Project-Space: -o, --output, --project= Specify the project-space to write into. If no [--input] is specified it is also used as input. For compression use the File ending .zip or . sirius. --naming-convention= Specify a naming scheme for the compound directories ins the project-space. Default % index_%filename_%compoundname --update-fingerprint-version Updates Fingerprint versions of the input project to the one used by this SIRIUS version. WARNING: All Fingerprint related results (CSI: FingerID, CANOPUS) will be lost! Specify multi-compound inputs (.ms, .mgf, .mzML/.mzXml, .sirius): -i, --input=[,...] Specify the input in multi-compound input formats: Preprocessed mass spectra in .ms or .mgf file format, LC/MS runs in .mzML/.mzXml format or already existing SIRIUS project-spaces (uncompressed/compressed) but also any other file type e.g. to provide input for STANDALONE tools. --ignore-formula ignore given molecular formula if present in .ms or .mgf input files. --allow-ms1-only Allow MS1 only data to be imported. Specify generic inputs (CSV) on per compound level: -1, --ms1=[,...] MS1 spectra files -2, --ms2=[,...] MS2 spectra files -z, --mz, --precursor, --parentmass= The mass of the parent ion for the specified ms2 spectra --adduct, --ionization= Specify the adduct for this compound Default: [M+?]+ -f, --formula= Specify the neutralized formula of this compound. This will be used for tree computation. If given no mass decomposition will be performed. Commands: project-space, PS Modify a given project Space: Read project(s) with --input, apply modification and write the result via --output. If either onl --input or --output is give the modifications will be made in-place. custom-db, DB Generate a custom searchable structure database. Import multiple files with compounds as SMILES or InChi into this DB. similarity Computes the similarity between all compounds in the dataset and outputs a matrix of similarities. decomp Small tool to decompose masses with given deviation, ionization, chemical alphabet and chemical filter. mgf-export, MGF Exports the spectra of a given input as mgf. ftree-export Exports the fragmentation trees of a project into various formats config Override all possible default configurations of this toolbox from the command line. lcms-align, A Align and merge compounds of multiple LCMS Runs. Use this tool if you want to import from mzML/mzXml formula, tree, sirius, F Identify molecular formula for each compound individually using fragmentation trees and isotope patterns. zodiac, Z Identify Molecular formulas of all compounds in a dataset together using ZODIAC. canopus, C Predict compound categories for each compound individually based on its predicted molecular fingerprint (CSI:FingerID) using CANOPUS. passatutto, P Compute a decoy spectra based on the fragmentation trees of the given input spectra. If no molecular formula is provided in the input, the top scoring computed formula is used. structure, fingerid, S Identify molecular structure for each compound Individually using CSI:FingerID. INFO 19:42:02 - CLI shut down hook: SIRIUS is cleaning up threads and shuts down...
joXemMx commented 1 year ago

Hi, could you share how exactly you wanted to use the CLI tool? It sound as though you tried using the executable file by opening it inside your file system. In this case, the GUI will open if you have the GUI + CLI version and the CLI only version will simply run sirius --help, which is the same output you described. To use Sirius CLI, you do not need to open the executable but instead go into your systems command line tool. For example, in Windows Powershell, navigate to the folder of your Sirius executable and then execute .\sirius --help. The same way, you would call .\sirius --input <project-space> ftree-export --dot --output <output-dir>. You may also specify the whole path to the executable like so: .\my\path\to\sirius --help.

verl166 commented 1 year ago

Ok thanks, it works now.