Skip to contents

Introduction

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.

Note: This vignette code is not evaluated during package checks. To run it interactively, ensure Sirius 6.3 is installed and running.

Prerequisites

Before using RuSirius, you need:

  1. Sirius 6.3 installed on your system. Download from the official releases page.
  2. 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

If 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)

# View connection details
srs

Managing 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

# Create a new project (or open if it exists)
srs <- Sirius(
    projectId = "my_analysis",
    path = getwd()
)

# Or open a different project later
srs <- openProject(srs, projectId = "another_project", path = getwd())

The project file will be saved as my_analysis.sirius in the specified path.

Project Information

# Get project details
projectInfo(srs)

# List all open projects
listOpenProjects(srs)

Working with Features

After importing data (see the “Importing Spectra” vignette), you can manage features:

# List feature IDs
featuresId(srs)

# Get feature information
featuresInfo(srs)

# Get the mapping between your IDs and Sirius IDs
srs@featureMap

Logging In

If you didn’t provide credentials at connection time:

srs <- logIn(srs, username = "your_email@example.com",
             password = "your_password")

Using the GUI

You can open the Sirius graphical interface for visual exploration:

# Open the GUI
openGUI(srs)

# Close the GUI when done
closeGUI(srs)

Shutting Down

Always properly close your connection when finished:

# Close project and shutdown
shutdown(srs)

# Or just close the project without shutting down Sirius
shutdown(srs, closeProject = TRUE)

Utility Functions

RuSirius provides several utility functions. See ?utils for the full list:

Next Steps

  • See the “Importing Spectra into Sirius” vignette for importing MS data
  • See ?run for running Sirius computations (formula ID, structure search, etc.)
  • See ?results for retrieving annotation results

Session Info

## R version 4.5.2 (2025-10-31)
## Platform: x86_64-pc-linux-gnu
## Running under: Ubuntu 24.04.3 LTS
## 
## Matrix products: default
## BLAS:   /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 
## LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.26.so;  LAPACK version 3.12.0
## 
## locale:
##  [1] LC_CTYPE=C.UTF-8       LC_NUMERIC=C           LC_TIME=C.UTF-8       
##  [4] LC_COLLATE=C.UTF-8     LC_MONETARY=C.UTF-8    LC_MESSAGES=C.UTF-8   
##  [7] LC_PAPER=C.UTF-8       LC_NAME=C              LC_ADDRESS=C          
## [10] LC_TELEPHONE=C         LC_MEASUREMENT=C.UTF-8 LC_IDENTIFICATION=C   
## 
## time zone: UTC
## tzcode source: system (glibc)
## 
## attached base packages:
## [1] stats     graphics  grDevices utils     datasets  methods   base     
## 
## other attached packages:
## [1] BiocStyle_2.38.0
## 
## loaded via a namespace (and not attached):
##  [1] digest_0.6.39       desc_1.4.3          R6_2.6.1           
##  [4] bookdown_0.46       fastmap_1.2.0       xfun_0.56          
##  [7] cachem_1.1.0        knitr_1.51          htmltools_0.5.9    
## [10] rmarkdown_2.30      lifecycle_1.0.5     cli_3.6.5          
## [13] sass_0.4.10         pkgdown_2.2.0       textshaping_1.0.5  
## [16] jquerylib_0.1.4     systemfonts_1.3.2   compiler_4.5.2     
## [19] tools_4.5.2         ragg_1.5.1          bslib_0.10.0       
## [22] evaluate_1.0.5      yaml_2.3.12         BiocManager_1.30.27
## [25] otel_0.2.0          jsonlite_2.0.0      rlang_1.1.7        
## [28] fs_1.6.7            htmlwidgets_1.6.4