# NOT RUN {
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(x = 1)
dat2 <- data.frame(assay = "rnaSeq")
check_annotation_keys(dat1, annots)
check_annotation_keys(dat2, annots)
# }
# NOT RUN {
syn <- synapse$Synapse()
syn$login()
annots <- get_synapse_annotations(syn = syn)
my_file <- syn$get("syn11931757", downloadFile = FALSE)
check_annotation_keys(my_file, annots, syn)
dat <- data.frame(non_annotation = 5, assay = "rnaSeq")
check_annotation_keys(dat, annots)
fv <- syn$tableQuery("SELECT * FROM syn17020234")
check_annotation_keys(fv, annots)
# If you don't specify an annotations data frame, these functions will
# download annotations automatically using `get_synapse_annotations()` (must
# be logged in to Synapse)
my_file <- syn$get("syn11931757", downloadFile = FALSE)
check_annotation_keys(my_file, syn = syn)
# }
Run the code above in your browser using DataLab