You can use this script with the following example:
  Rscript inst/scripts/annotate_spectra.R --fil-spe-raw data/source/examples/spectra.mgf --fil-lib-spe-pos data/interim/libraries/spectra/is/lotus_pos.rds --fil-ann-raw-spe-spe data/interim/annotations/example_spectralMatches.tsv.gz --ms-tol-mas-dal-ms2 0.01 --ms-tol-mas-ppm-ms2 10 --ann-thr-ms2-sim-ann 0.0 --ms-thr-ms2-int 5 --ann-ms2-app false

Usage:
  annotate_spectra.R [--ann-ms2-app=<ann-ms2-app>] [--ann-thr-ms2-sim-ann=<ann-thr-ms2-sim-ann>] [--fil-ann-raw-spe=<fil-ann-raw-spe>] [--fil-lib-spe-neg=<fil-lib-spe-neg>] [--fil-lib-spe-pos=<fil-lib-spe-pos>] [--fil-spe-raw=<fil-spe-raw>] [--ms-thr-ms2-int=<ms-thr-ms2-int>] [--ms-pol=<ms-pol>] [--ms-tol-mas-ppm-ms2=<ms-tol-mas-ppm-ms2>] [--ms-tol-mas-dal-ms2=<ms-tol-mas-dal-ms2>] [--ms-tol-rt-min=<ms-tol-rt-min>]

Arguments:
  ann-ms2-app                Perform approximative matching without precursor matching? BOOLEAN
  ann-thr-ms2-sim-ann        Similarity threhsold for annotation. FLOAT

  fil-ann-raw-spe-spe        List of spectral matching results. STRING
  fil-lib-spe-neg            List of negative spectral libraries. STRING
  fil-lib-spe-pos            List of positive spectral libraries. STRING
  fil-spe-raw                Raw spectral file. STRING

  ms-pol                     Polarity used. Must be "pos" or "neg". STRING
  ms-thr-ms2-int             Intensity threshold for MS2. INTEGER
  ms-tol-mas-ppm-ms2         Relative mass tolerance for MS2 in ppm. FLOAT
  ms-tol-mas-dal-ms2         Absolute mass tolerance for MS2 in Dalton. FLOAT
  ms-tol-rt-min              Retention time tolerance in minutes. FLOAT

Options:
  -h --help                  Shows this screen.
  -v --version               Shows version.