View source: R/annotateFcsFile.R
annotateFcsFile | R Documentation |
Sets the annotations on an FCS file.
annotateFcsFile(experimentId, fcsFileId, annotations)
experimentId |
ID of experiment. |
fcsFileId |
ID of FCS file. |
annotations |
List of 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).
## Not run:
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)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.