Skip to contents

Add signature to database

Usage

addSignature(
  conn_handler = NULL,
  omic_signature,
  visibility = TRUE,
  add_users = NULL,
  metabolomics_nomenclature = NULL,
  return_signature_id = FALSE,
  return_missing_features = FALSE,
  verbose = TRUE
)

Arguments

conn_handler

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

omic_signature

An OmicSignature R6 object from the OmicSignature package (required).

visibility

Logical; whether the uploaded collection should be visible and accessible to others, Defaults to 'FALSE'

add_users

A Data Frame; must contain the following column names: 'user_name', 'access'. Access types are owner, viewer, or editor.This argument is only relevant when visibility is set to 'FALSE'.

metabolomics_nomenclature

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

return_signature_id

Logical; if 'TRUE', the function will return the ID generated for the newly uploaded signature. Defaults to 'FALSE'.

return_missing_features

Logical; if set to 'TRUE' the function will return a list of missing features present in the OmicSignature. Defaults to 'FALSE'

verbose

Logical; whether to print 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"
)

# Add signatures to database
SigRepo::addSignature(
  conn_handler = conn_handler,
  omic_signature = omc_signature_1,
  visibility = FALSE, # default is false
  add_users = c("John", "Jane"),
  return_signature_id = TRUE,
  verbose = TRUE
)

} # }