valid_annotation_values: Valid annotation values

Description Usage Arguments Value Methods (by class) Examples

View source: R/check-annotation-values.R

Description

Checks for and returns the valid annotation valaues in a data frame, Synapse file, or Synapse file view.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
valid_annotation_values(x, annotations, ...)

## S3 method for class ''NULL''
valid_annotation_values(x, annotations, ...)

## S3 method for class 'synapseclient.entity.File'
valid_annotation_values(x, annotations, syn, ...)

## S3 method for class 'data.frame'
valid_annotation_values(x, annotations, ...)

## S3 method for class 'synapseclient.table.CsvFileTable'
valid_annotation_values(x, annotations, ...)

Arguments

x

An object to check.

annotations

A data frame of annotation definitions. Must contain at least three columns: key, value, and columnType.

...

Additional options to check_values()

syn

Synapse client object

Value

A named list of valid annotation values.

Methods (by class)

Examples

1
2
3
4
5
6
7
8
9
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)
valid_annotation_values(dat2, annots)

dccvalidator documentation built on July 2, 2020, 4:05 a.m.