Skip to contents

Update a signature in the database. Only the signature's owner (the user who uploaded it) or an admin can update a signature; users who were given editor access with addUserToSignature() cannot. If the update fails part-way, the original signature is restored, including the users it is shared with and the collections it belongs to.

Usage

updateSignature(
  conn_handler = NULL,
  signature_id,
  omic_signature,
  visibility = NULL,
  metabolomics_nomenclature = NULL,
  verbose = TRUE
)

Arguments

conn_handler

An R object obtained from SigRepo::newConnhandler() (required)

signature_id

Database ID of signature to be updated (required)

omic_signature

An R6 class object from the OmicSignature package (required)

visibility

A logical value indicates whether or not to allow others to view and access one's uploaded signature. Defaults to 'FALSE'.

metabolomics_nomenclature

Optional metabolite dictionary for metabolomics signatures. One of refmet_id, refmet, hmdb, smiles, or inchikey.

verbose

Logical; whether or not to print the diagnostic messages. Defaults to 'TRUE'.

Examples


if (FALSE) { # \dontrun{

# Create a connection handler
conn_handler <- SigRepo::newConnHandler(
  dbname = "sigrepo",
  host = "sigrepo.org",
  port = 3306,
  user = "your_username",
  password = "your_password"
)

# Update a signature in the database
SigRepo::updateSignature(
  conn_handler = conn_handler,
  signature_id = 20,
  omic_signature = test_omic_signature
)

} # }