@@ -679,7 +679,7 @@ GetFlowJoLabels <- function(files,
679679 ... ) {
680680 if (requireNamespace(" CytoML" , quietly = TRUE ) &
681681 requireNamespace(" flowWorkspace" , quietly = TRUE )) {
682- ws <- CytoML :: open_flowjo_xml(wspFile )
682+ ws <- CytoML :: open_flowjo_xml(wspFile , sample_names_from = " sampleNode " )
683683 gates <- CytoML :: flowjo_to_gatingset(ws ,
684684 name = group ,
685685 ... )
@@ -694,7 +694,8 @@ GetFlowJoLabels <- function(files,
694694 if (length(file_id ) == 0 ) {stop(" File " , basename(file ),
695695 " not found. Files available: \n " ,
696696 paste0(files_in_wsp , " \n " ))}
697- gate_names <- flowWorkspace :: gs_get_pop_paths(gates , path = " auto" )
697+ gate_names <- flowWorkspace :: gs_get_pop_paths(gates [[file_id ]],
698+ path = " auto" )
698699
699700 gatingMatrix <- matrix (NA ,
700701 nrow = counts [file_id ],
@@ -707,11 +708,13 @@ GetFlowJoLabels <- function(files,
707708 }
708709
709710 if (is.null(cellTypes )){
710- cellTypes <- flowWorkspace :: gs_get_leaf_nodes(gates ,
711- path = " auto" )
711+ cellTypes_tmp <- flowWorkspace :: gs_get_leaf_nodes(gates [[file_id ]],
712+ path = " auto" )
713+ } else {
714+ cellTypes_tmp <- cellTypes
712715 }
713716
714- manual <- ManualVector(gatingMatrix , cellTypes )
717+ manual <- ManualVector(gatingMatrix , cellTypes_tmp )
715718
716719 result [[file ]] <- list (" matrix" = gatingMatrix ,
717720 " manual" = manual )
0 commit comments