GatingSet or GatingSetList.
It expects a regular expression for the node name
(i.e. '/4\+$' would match '/4+' in a node name with the plus
sign at the end of the string. Alternatively, you can supply a
partial path.
The user must supply the individual_id and sample_id,
but they have default values suitable for the data we commonly see.
Sometimes the child node names don't match the marker names exactly.
This function will try to make some guesses about how to match these up.
The filter.fun parameter is a function that does some regular expression string
substitution to try and clean up the node names by removing
various symobls that are often added to gates, {+/-}. The user can provide their
own function to do string cleanup.
Counts are extracted as well as metadata and single cell data, and these are fed into the
COMPASSContainer constructor.
COMPASSContainerFromGatingSet(gs = NULL, node = NULL, filter.fun = NULL, individual_id = "PTID", sample_id = "name", mp = NULL, matchmethod = c("Levenshtein", "regex"), markers = NA, swap = FALSE, countFilterThreshold = 5000)GatingSet or GatingSetListregular expression to match a single node in the gating tree. If more than one node is matched, an error is thrown.function that does string substitution to clean up node names, i.e. turns a 'CD4+' into a 'CD4' to try and
match against the parameters slot of the flowFrames in gscharacter identifying the subject id column in the gs metadatacharacter idetifying the sample id column in the gs metadata.list mapping node names to markers. This function tries to guess, but may fail. The user can override the guesswork.character either 'regex' or 'Levenshtein' for matching nodes to markers.character vector of marker names to include.logical default FALSE. Set to TRUE if the marker and channel names are swapped.numeric threshold. if the number of cells expressing at
least one marker of interest is less than this threshold, we remove that
file. Default is 5000.COMPASSContainer
## Not run:
# ## gs is a GatingSet from flowWorkspace
# COMPASSContainerFromGatingSet(gs, "4+")
# ## End(Not run)
Run the code above in your browser using DataLab