Closed Close-your-eyes closed 3 years ago
accessing the directly s4 slots through @
should be avoided (since it is internal data structure subject to changes). Use public methods instead, in this case keyword(gh_pop_get_data(gs[[x]]))[["FILENAME"]]
execute = F
only parse the xml and doesn't load FCS files, thus no keyword available for gs.
but you can Retrieve keywords associated with that xml workspace, see ?fj_ws_get_keywords
Dear all,
for the ordinary not-R-user the filename of an FCS file as seen in the explorer (windows) or finder (mac) is the primary way to identify files and their content. This filename may be subject changes as generally opposed to the "name" or "sampleName" in the meta data (aka "$FIL" keyword).
In order to communicate with these not-R-users about samples I am asking to how to pull out these FCS filenames from a GatingSet.
I used to do it this way, but this has stopped working as of BioConductor 3.12. Maybe it only worked in 3.11:
sampleNames(gs) <- unlist(lapply(1:length(gs), function(x) {basename(flowWorkspace::gh_pop_get_data(gs[[x]])@description[["FILENAME"]])}))
Also, this does not work when the
gs <- CytoML::flowjo_to_gatingset()
is run withexecute = F
.So, is there an elegant way to pull out the actual filenames of fcs files in a gatingset?