Checks for and returns the valid annotation valaues in a data frame, Synapse file, or Synapse file view.
valid_annotation_values(x, annotations, ...) # S3 method for `NULL` valid_annotation_values(x, annotations, ...) # S3 method for synapseclient.entity.File valid_annotation_values(x, annotations, syn, ...) # S3 method for data.frame valid_annotation_values(x, annotations, ...) # S3 method for synapseclient.table.CsvFileTable valid_annotation_values(x, annotations, ...)
x | An object to check. |
---|---|
annotations | A data frame of annotation definitions. Must contain at
least three columns: |
... | Additional options to |
syn | Synapse client object |
A named list of valid annotation values.
NULL
: Return NULL
synapseclient.entity.File
: Valid annotation values on a Synapse file
data.frame
: Valid annotation values in a data frame
synapseclient.table.CsvFileTable
: Valid annotation values in a Synapse table
annots <- data.frame( key = c("assay", "fileFormat", "fileFormat", "fileFormat", "species"), value = c("rnaSeq", "fastq", "txt", "csv", "Human"), columnType = c("STRING", "STRING", "STRING", "STRING", "STRING") ) dat1 <- data.frame(assay = "not a valid assay") dat2 <- data.frame(assay = "rnaSeq") valid_annotation_values(dat1, annots)#> named list()valid_annotation_values(dat2, annots)#> $assay #> [1] "rnaSeq" #>