Package 'grover'

Title: Web API Framework for Mass Spectrometry Data Transfer
Description: A web based API framework for hosting and interfacing a mass spectrometry raw data data repository. Transfer files, retrieve file information, convert raw mass spectromery data to .mzML format and retrieve sample information from .raw file headers.
Authors: Jasen Finch [aut, cre]
Maintainer: Jasen Finch <[email protected]>
License: GPL-3
Version: 1.1.3
Built: 2026-05-26 06:47:26 UTC
Source: https://github.com/aberHRML/grover

Help Index


Conversion arguments

Description

Helper functions for msconvert arguments for raw data conversion.

Usage

conversionArgsPeakPick()

conversionArgsNegativeMode()

conversionArgsPositiveMode()

conversionArgsMSlevel1()

conversionArgsMSlevel2()

conversionArgsMSlevel3()

Details

These functions return character strings suitable for supplying to the args argument of convertFile for passing to msconvert.

Examples

conversionArgsPeakPick()

Convert raw files to mzML format

Description

Convert a raw MS file using a grover API.

Usage

convertFile(
  grover_client,
  instrument,
  directory,
  file,
  args = "",
  outDir = ".",
  zip = TRUE,
  overwrite = FALSE
)

convertDirectory(
  grover_client,
  instrument,
  directory,
  args = "",
  outDir = ".",
  zip = TRUE,
  overwrite = FALSE,
  exclude = character()
)

convertDirectorySplitModes(
  grover_client,
  instrument,
  directory,
  args = "",
  outDir = ".",
  zip = TRUE
)

## S4 method for signature 'GroverClient'
convertFile(
  grover_client,
  instrument,
  directory,
  file,
  args = NULL,
  outDir = ".",
  zip = TRUE,
  overwrite = FALSE
)

## S4 method for signature 'GroverClient'
convertDirectory(
  grover_client,
  instrument,
  directory,
  args = "",
  outDir = ".",
  zip = TRUE,
  overwrite = FALSE,
  exclude = character()
)

## S4 method for signature 'GroverClient'
convertDirectorySplitModes(
  grover_client,
  instrument,
  directory,
  args = "",
  outDir = ".",
  zip = TRUE
)

Arguments

grover_client

S4 object of class GroverClient

instrument

instrument name

directory

directory name

file

file name

args

arguments to pass to msconverteR::convert_files

outDir

output directory path for converted files

zip

zip converted file

overwrite

overwrite local mzML files that already exist at the outDir path that have the same file name as the raw files to be converted

exclude

A character vector of regular expression patterns for which raw files with matching patterns will not be converted.

Value

A vector of file paths to converted data files.


Check the existance of a grover API

Description

Check grover API is still extistant.

Usage

extant(grover_client)

## S4 method for signature 'GroverClient'
extant(grover_client)

Arguments

grover_client

S4 object of class GroverGlient

Value

TRUE if the API host is accessible and FALSE if not.


Retrieve file information

Description

Return file information for a given file using the grover API.

Usage

fileInfo(grover_client, instrument, directory, file)

directoryFileInfo(grover_client, instrument, directory)

instrumentFileInfo(grover_client, instrument)

repositoryFileInfo(grover_client)

## S4 method for signature 'GroverClient'
fileInfo(grover_client, instrument, directory, file)

## S4 method for signature 'GroverClient'
directoryFileInfo(grover_client, instrument, directory)

## S4 method for signature 'GroverClient'
instrumentFileInfo(grover_client, instrument)

## S4 method for signature 'GroverClient'
repositoryFileInfo(grover_client)

Arguments

grover_client

S4 object of class GroverClient

instrument

instrument name

directory

directory name

file

file name


GroverClient and GroverHost class constructor

Description

Create a GroverClient or GroverHost class object containing API host information.

Usage

grover(host, port, auth, repository = NULL)

Arguments

host

host address

port

port on which the API is hosted

auth

authentication key

repository

data repository directory path

Examples

## Grover client 
grover_client <- grover(host = "127.0.0.1",
                     port = 8000,
                     auth = "1234")

## Grover host
grover_host <- grover(host = "127.0.0.1",
                     port = 8000,
                     auth = "1234",
                     repository = system.file('repository',
                                               package = 'grover'))

Grover API

Description

Run the grover REST API for file conversion.

Usage

groverAPI(
  grover_host,
  background = FALSE,
  log_dir = "~/.grover/logs",
  temp_dir = tempdir()
)

Arguments

grover_host

S4 object of class Grover

background

Run as a background process.

log_dir

directory path for API logs

temp_dir

temporary directory for converted files

Examples

## Not run: 
grover_host <- grover(host = "127.0.0.1",
                     port = 8000,
                     auth = "1234",
                     repository = system.file('repository',
                                               package = 'grover'))
groverAPI(grover_host) 

## End(Not run)

GroverClient class

Description

A simple S4 class containing grover API host information for client-side use.

Slots

host

host address

port

port on which the API is hosted

auth

authentication key


GroverHost class

Description

A simple S4 class containing host information for configuring a grover API.

Details

This class inherits from the GroverClient class so GroverClient accessor methods are applicable.

Slots

host

host address

port

port on which the API is hosted

auth

authentication key

repository

directory path to the raw mass spectrometry data repository


GroverClient get and set methods

Description

Retrieve or set host information for a GroverClient objects.

Usage

host(grover_client)

host(grover_client) <- value

port(grover_client)

port(grover_client) <- value

auth(grover_client)

auth(grover_client) <- value

## S4 method for signature 'GroverClient'
host(grover_client)

## S4 replacement method for signature 'GroverClient'
host(grover_client) <- value

## S4 method for signature 'GroverClient'
port(grover_client)

## S4 replacement method for signature 'GroverClient'
port(grover_client) <- value

## S4 method for signature 'GroverClient'
auth(grover_client)

## S4 replacement method for signature 'GroverClient'
auth(grover_client) <- value

Arguments

grover_client

S4 object of class GroverClient

value

new host value to set


List raw data repository contents

Description

List available instruments, experiment directories or samples using a grover API.

Usage

listInstruments(grover_client)

listDirectories(grover_client, instrument)

listFiles(grover_client, instrument, directory)

listRawFiles(grover_client, instrument, directory)

## S4 method for signature 'GroverClient'
listInstruments(grover_client)

## S4 method for signature 'GroverClient'
listDirectories(grover_client, instrument)

## S4 method for signature 'GroverClient'
listFiles(grover_client, instrument, directory)

## S4 method for signature 'GroverClient'
listRawFiles(grover_client, instrument, directory)

Arguments

grover_client

S4 object of class GroverClient

instrument

instrument name

directory

directory name


Parse a grover configuration file

Description

Read grover API host information from a text file.

Usage

readGrover(path = "grover.yml")

Arguments

path

file path to text file containing host information

Details

The text file should contain 3 lines, the first the host address, the second the port on which it is hosted and lastly the authentication key needed

Examples

## Grover client
grover_client <- system.file('grover_client.yml',
                              package = 'grover')
grover_client <- readGrover(grover_client)

## Grover host
grover_host <- system.file('grover_host.yml',
                              package = 'grover')
grover_host <- readGrover(grover_host)

GroverHost get and set methods

Description

Retrieve or set host information for GroverHost objects.

Usage

repository(grover_host)

repository(grover_host) <- value

## S4 method for signature 'GroverHost'
repository(grover_host)

## S4 replacement method for signature 'GroverHost'
repository(grover_host) <- value

Arguments

grover_host

S4 object of class GroverHost

value

new host value to set


Retrieve sample raw file header information

Description

Get sample header information for a given raw file or directory using a grover API.

Usage

sampleInfo(grover_client, instrument, directory, file)

runInfo(grover_client, instrument, directory, exclude = character())

## S4 method for signature 'GroverClient'
sampleInfo(grover_client, instrument, directory, file)

## S4 method for signature 'GroverClient'
runInfo(grover_client, instrument, directory, exclude = character())

Arguments

grover_client

S4 object of class GroverClient

instrument

instrument name

directory

directory name

file

file name

exclude

A character vector of regular expression patterns for which the information matching files will not be retrieved.


Grover class show methods

Description

Show method for class S4 Grover.

Usage

## S4 method for signature 'GroverClient'
show(object)

## S4 method for signature 'GroverHost'
show(object)

Arguments

object

S4 object of class Grover


Transfer files

Description

Transfer a file or directory using a grover API.

Usage

transferFile(grover_client, instrument, directory, file, outDir = ".")

transferDirectory(grover_client, instrument, directory, outDir = ".")

## S4 method for signature 'GroverClient'
transferFile(grover_client, instrument, directory, file, outDir = ".")

## S4 method for signature 'GroverClient'
transferDirectory(grover_client, instrument, directory, outDir = ".")

Arguments

grover_client

S4 object of class GroverClient

instrument

instrument name

directory

directory name

file

file name

outDir

output directory path for transferred file


Return the version of a grover API

Description

Return the version number of a grover API.

Usage

version(grover_client)

## S4 method for signature 'GroverClient'
version(grover_client)

Arguments

grover_client

S4 object of class GroverGlient

Value

The version number of the grover API.