FIORA is an in silico fragmentation algorithm designed to predict tandem mass spectra (MS/MS) with high accuracy. Using a graph neural network, FIORA models bond cleavages, fragment intensities, and estimates retention times (RT) and collision cross section (CCS) values.
The original model and prediction algorithm is implemented in Python and can be found at its GitHub Repo. The full description of the algorithm is published in a Nature Communications article.
The R package {fioRa} provides a wrapper for FIORA, to either run
the Python script using the R function run_script() in the console or
starting a Shiny-App using the R function run_app().
Processing in the App is easy (simply paste a SMILES code to an input
form and click a button). Also, result inspection is fun using annotated
spectra plots. However, to limit computational time the app is limited
to processing 10 compounds at once. For larger numbers please use
run_script().
You can install the development version of {fioRa} from GitHub.
install.packages("devtools")
devtools::install_github("janlisec/fioRa")Before first use you need to set up a python installation and a conda
environment fiora which can be achieved from within R with the help of
the reticulate package and the convenience function install_fiora().
fioRa::install_fiora()
#> No valid 'default_path' provided, using reticulate::miniconda_path 'C:/Users/jlisec/AppData/Local/r-miniconda'.
#> $os
#> [1] "Windows"
#>
#> $python
#> [1] "C:\\Users\\jlisec\\AppData\\Local\\r-miniconda\\envs\\fiora\\python.exe"
#>
#> $script
#> [1] "C:\\Users\\jlisec\\AppData\\Local\\r-miniconda\\envs\\fiora\\Scripts\\fiora-predict"If a valid installation is found install_fioRa() will return a short
list providing the current OS, path of the python executable and
fiora-predict script.
Now, you can launch the application as a Shiny-App.
fioRa::run_app()Alternatively, you can use the exported function run_script() to work
in the R console directly. This will accept R styled input parameters,
generate an appropriate temporary FIORA input file, process it, and
return an R styled list including the predicted MS/MS spectrum.
x <- data.frame(
Name = "Example_0",
SMILES = "CC1=CC(=O)OC2=CC(OS(O)(=O)=O)=CC=C12",
Precursor_type = "[M-H]-",
CE = 17,
Instrument_type = "HCD"
)
fioRa::run_script(x = x, annotation = TRUE)
#> No valid 'default_path' provided, using reticulate::miniconda_path 'C:/Users/jlisec/AppData/Local/r-miniconda'.
#> Adduct definition and formula do not match (insufficient number of H); fml = H2O3S; adduct = [M-3H]-
#> $Example_0
#> $Example_0$TITLE
#> [1] "Example_0"
#>
#> $Example_0$SMILES
#> [1] "CC1=CC(=O)OC2=CC(OS(O)(=O)=O)=CC=C12"
#>
#> $Example_0$FORMULA
#> [1] "C10H8O6S"
#>
#> $Example_0$PRECURSOR_MZ
#> [1] "254.99688252391005"
#>
#> $Example_0$PRECURSORTYPE
#> [1] "[M-H]-"
#>
#> $Example_0$COLLISIONENERGY
#> [1] "17.0"
#>
#> $Example_0$INSTRUMENTTYPE
#> [1] "HCD"
#>
#> $Example_0$COMMENT
#> [1] "\"In silico generated spectrum by FIORA OS v1.0.0\""
#>
#> $Example_0$spec
#> mz int SMILES adduct formula
#> 1 79.95681 0.002825602 O=[SH](=O)O [M-2H]- H2O3S
#> 2 175.03897 0.899893463 Cc1cc(=O)oc2cc(O)ccc12 [M-H]- C10H8O3
#> 3 254.99688 0.102497801 Cc1cc(=O)oc2cc(OS(=O)(=O)O)ccc12 [M-H]- C10H8O6S
#> n_isomers
#> 1 1
#> 2 1
#> 3 1You are reading the doc about version 0.3.9 compiled on 2026-01-29 17:07:26.570788.
