Skip to contents

This function replaces the default ID in the example by a user-specified one

Usage

replace_id(
  x,
  user_filename = get_params(step = "prepare_params")$files$pattern,
  user_gnps = get_params(step = "prepare_params")$gnps$id,
  example_gnps = get_default_paths()$gnps$example
)

Arguments

x

a character string containing the default ID

user_filename

a user-specified value for a file name job ID

user_gnps

a user-specified value for a GNPS job ID

example_gnps

an example value for a GNPS job ID

Value

Character string with the GNPS job ID modified according to the rules specified in the function

Examples

tima:::replace_id(
  x = "example/123456_features.tsv",
  user_gnps = NULL,
  user_filename = "Foo"
)
#> [1] "example/Foo_features.tsv"