Description Usage Arguments Value Examples
View source: R/check-annotation-keys.R
Check that a given set of keys are all present in an annotations dictionary
1 2 3 4 5 6 7 8 9 10 | check_keys(
x,
annotations,
whitelist_keys = NULL,
success_msg = "All annotation keys are valid",
fail_msg = "Some annotation keys are invalid",
annots_link = "https://shinypro.synapse.org/users/nsanati/annotationUI/",
return_valid = FALSE,
syn
)
|
x |
A data frame of annotation data |
annotations |
A data frame of annotations to check against |
whitelist_keys |
A character vector of annotation keys to whitelist. If provided, all values for the given keys will be treated as valid. |
success_msg |
Message indicating the check succeeded. |
fail_msg |
Message indicating the check failed. |
annots_link |
Link to a definition of the annotations being used in the project |
return_valid |
Should the function return valid values? Defaults to
|
syn |
Synapse client object |
A condition object indicating whether keys match the given annotation dictionary. Erroneous keys are included as data within the object.
1 2 3 4 5 6 7 8 | annots <- data.frame(
key = c("fileFormat", "fileFormat"),
value = c("txt", "csv"),
columnType = c("STRING", "STRING"),
stringsAsFactors = FALSE
)
check_keys("fileFormat", annots)
check_keys("x", annots)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.