DillonHammill / CytoExploreR

Interactive Cytometry Data Analysis
60 stars 13 forks source link

cyto_plot_gating_tree does not support pop "*" in GatingTemplate #186

Open RSM151 opened 1 year ago

RSM151 commented 1 year ago

Describe the bug cyto_plot_gating_tree does not function on GatingTemplates where pop "*" is used to generate multiple aliases from one line. During preprocessing, dummy gates are created within the template object (presumably for internal use).

In cyto_plot_gating_tree.GatingTemplate, the template is converted into a data.table. That table has duplicate aliases due to the dummy gates and fails when calling CytoExploreR_.preprocess_csv.

To Reproduce Steps to reproduce the behavior:

  1. Create a GatingTemplate csv containing a row that uses quad_gate_sequential with a list of aliases and pop = "*" Eg. alias = "A,B,C,D", pop = "*"
  2. Create a GatingTemplate object using gatingTemplate(path)
  3. Call cyto_plot_gating_tree on the GatingTemplate object

Expected behavior A plot in the standard form of cyto_plot_gating_tree should be generated with the quad gate represented by the parent node splitting into four separate nodes.

Screenshots image Error message from preprocess_csv. 'A' is the alias name. Missing space is an error in openCyto.

Desktop (please complete the following information):