annotateFcsFile.Rd
Sets the annotations on an FCS file.
annotateFcsFile(experimentId, fcsFileId, annotations)
This function overwrites any existing annotations. To add new annotations
while keeping the existing annotations, first use getFcsFile
to get
the existing annotations. Append new annotations with rbind
.
Note: if you retrieve FCS files in bulk, such as with getFcsFiles
,
file$annotations
will return a nested list. Be sure to extract the
annotations from this list before appending new ones (see examples below).
if (FALSE) { # \dontrun{
annotations <- list(
list(name = "annotations 1", value = 1),
list(name = "annotation 2", value = "myValue")
)
annotateFcsFile(experimentId, fcsFileId, annotations)
# or, to append annotations
files <- getFcsFiles(id)
file <- files[1, ]
annos <- file$annotations[[1]]
annos[nrow(annos) + 1, ] <- list("abc", "def")
annotateFcsFile(experimentId, file$`_id`, annos)
} # }