Introduction
Note: this vignette is pre-computed. See the session info for information on packages used and the date the vignette was rendered. The vignette requires a running Sirius instance. To reproduce this analysis, you will need Sirius 6.5 installed and running.
RuSirius provides an R interface to the Sirius mass spectrometry software for metabolite identification. This vignette covers the basics of connecting to Sirius and managing projects.
Prerequisites
Before using RuSirius, you need:
- Sirius 6.5 installed on your system. Download from the official releases page.
- A Sirius account (free registration at bright-giant.com)
Connecting to Sirius
The Sirius() function creates a connection to the Sirius
application. If Sirius is not running, it will attempt to start it
automatically. The port parameter allows to configure the
Sirius application to use a particular port; this is required when using
the Docker container (where Sirius is pre-started on port 9999), but
generally the function can be used without specifying a port.
# Basic connection - Sirius will start if not running
srs <- Sirius(port = 9999)
srs
#> Sirius object
#> Valid connection to Sirius: TRUE
#> Logged In: TRUE
#> Sirius version: 6.5.4
#> Sirius update available: FALSE
#> No project is currently loadedIf you have credentials, you can log in during connection:
srs <- Sirius(
username = "your_email@example.com",
password = "your_password",
port = 9999
)Checking Connection Status
You can verify your connection is valid with
checkConnection(srs):
# Check if connected
checkConnection(srs)
#> [1] TRUE
# View connection details
srs
#> Sirius object
#> Valid connection to Sirius: TRUE
#> Logged In: TRUE
#> Sirius version: 6.5.4
#> Sirius update available: FALSE
#> No project is currently loadedManaging Projects
Sirius organizes data and results into projects. You can create new
projects or open existing ones during connection, or later using the
openProject() function. Parameters projectId
and path allow to set the name (ID) of the project and the
path to the directory where the project file should be stored in.
Creating/Opening a Project
# Open a project on the existing connection
srs <- openProject(srs, projectId = "my_analysis", path = getwd())The project file will be saved as my_analysis.sirius in
the specified path.
Project Information
# Get project details
projectInfo(srs)
#> $projectId
#> [1] "my_analysis"
#>
#> $location
#> [1] "C:\\Users\\phili\\AppData\\Local\\Temp\\claude\\E--GitHub-RuSirius\\1afa4ba5-deea-4f05-82c3-5cfe3d2bdc91\\scratchpad\\vig_run\\my_analysis.sirius"
#>
#> $type
#> [1] "UNIMPORTED"
#>
#> $compatible
#> [1] TRUE
#>
#> $numOfFeatures
#> [1] 0
#>
#> $numOfCompounds
#> [1] 0
#>
#> $numOfBytes
#> [1] 8192
# List all open projects
listOpenProjects(srs)
#> [1] "my_analysis"Working with Features
After importing data (see the “Importing Spectra” vignette), you can manage features:
# List feature IDs
featuresId(srs)
#> character(0)
# Get feature information
featuresInfo(srs)
#> NULL
# Get the mapping between your IDs and Sirius IDs
srs@featureMap
#> data frame with 0 columns and 0 rowsLogging In
If you didn’t provide credentials at connection time:
srs <- logIn(srs, username = "your_email@example.com",
password = "your_password")Shutting Down
Always properly close your connection when finished:
# Close project and shutdown
shutdown(srs, closeProject = TRUE)
#> There does not seem to be any process or process_id to shut down...Utility Functions
RuSirius provides several utility functions. See
?utils for the full list:
-
checkConnection()- Verify connection status -
logIn()- Log in to Sirius -
openProject()/listOpenProjects()- Project management -
projectInfo()- Get project details -
featuresId()/featuresInfo()- Feature management -
deleteFeatures()- Remove features -
mapFeatures()- Get ID mappings -
openGUI()/closeGUI()- GUI control -
shutdown()- Clean shutdown
Session Info
sessionInfo()
#> R version 4.6.0 (2026-04-24 ucrt)
#> Platform: x86_64-w64-mingw32/x64
#> Running under: Windows 11 x64 (build 26300)
#>
#> Matrix products: default
#> LAPACK version 3.12.1
#>
#> locale:
#> [1] LC_COLLATE=English_United Kingdom.utf8
#> [2] LC_CTYPE=English_United Kingdom.utf8
#> [3] LC_MONETARY=English_United Kingdom.utf8
#> [4] LC_NUMERIC=C
#> [5] LC_TIME=English_United Kingdom.utf8
#>
#> time zone: Europe/Paris
#> tzcode source: internal
#>
#> attached base packages:
#> [1] stats4 stats graphics grDevices utils datasets methods
#> [8] base
#>
#> other attached packages:
#> [1] RuSirius_1.0.6 Spectra_1.22.2 BiocParallel_1.46.0
#> [4] S4Vectors_0.50.1 BiocGenerics_0.58.1 generics_0.1.4
#> [7] RSirius_6.5.4 ProtGenerics_1.44.0
#>
#> loaded via a namespace (and not attached):
#> [1] tidyselect_1.2.1 dplyr_1.2.1
#> [3] farver_2.1.2 blob_1.3.0
#> [5] Biostrings_2.80.1 filelock_1.0.3
#> [7] S7_0.2.2 bitops_1.0-9
#> [9] fastmap_1.2.0 lazyeval_0.2.3
#> [11] RCurl_1.98-1.19 BiocFileCache_3.2.0
#> [13] digest_0.6.39 lifecycle_1.0.5
#> [15] cluster_2.1.8.2 rsvg_2.7.0
#> [17] KEGGREST_1.52.2 RSQLite_3.53.3
#> [19] magrittr_2.0.5 compiler_4.6.0
#> [21] rlang_1.2.0 tools_4.6.0
#> [23] yaml_2.3.12 igraph_2.3.3
#> [25] data.table_1.18.4 knitr_1.51
#> [27] S4Arrays_1.12.0 htmlwidgets_1.6.4
#> [29] curl_7.1.0 bit_4.6.0
#> [31] DelayedArray_0.38.2 plyr_1.8.9
#> [33] xml2_1.6.0 RColorBrewer_1.1-3
#> [35] abind_1.4-8 purrr_1.2.2
#> [37] grid_4.6.0 ggplot2_4.0.3
#> [39] scales_1.4.0 MASS_7.3-65
#> [41] MultiAssayExperiment_1.38.0 SummarizedExperiment_1.42.0
#> [43] cli_3.6.6 crayon_1.5.3
#> [45] otel_0.2.0 httr_1.4.8
#> [47] reshape2_1.4.5 rjson_0.2.23
#> [49] DBI_1.3.0 cachem_1.1.0
#> [51] stringr_1.6.0 parallel_4.6.0
#> [53] AnnotationDbi_1.74.0 BiocManager_1.30.27
#> [55] XVector_0.52.0 AnnotationFilter_1.36.0
#> [57] matrixStats_1.5.0 base64enc_0.1-6
#> [59] vctrs_0.7.3 Matrix_1.7-5
#> [61] jsonlite_2.0.0 IRanges_2.46.0
#> [63] bit64_4.8.2 clue_0.3-68
#> [65] tidyr_1.3.2 glue_1.8.1
#> [67] codetools_0.2-20 QFeatures_1.22.0
#> [69] DT_0.34.0 stringi_1.8.7
#> [71] gtable_0.3.6 BiocVersion_3.23.1
#> [73] GenomicRanges_1.64.0 tibble_3.3.1
#> [75] MetaboAnnotation_1.16.0 pillar_1.11.1
#> [77] rappdirs_0.3.4 htmltools_0.5.9
#> [79] Seqinfo_1.2.0 R6_2.6.1
#> [81] dbplyr_2.6.0 httr2_1.2.3
#> [83] evaluate_1.0.5 Biobase_2.72.0
#> [85] lattice_0.22-9 AnnotationHub_4.2.1
#> [87] png_0.1-9 memoise_2.0.1
#> [89] MetaboCoreUtils_1.20.1 Rcpp_1.1.1-1.1
#> [91] SparseArray_1.12.2 gridExtra_2.3.1
#> [93] CompoundDb_1.16.0 ChemmineR_3.64.0
#> [95] xfun_0.59 MsCoreUtils_1.24.0
#> [97] fs_2.1.0 MatrixGenerics_1.24.0
#> [99] pkgconfig_2.0.3