DillonHammill / CytoExploreR

Interactive Cytometry Data Analysis
61 stars 13 forks source link

Boolean gate linked to root instead of parent #106

Closed Biomiha closed 3 years ago

Biomiha commented 3 years ago

Hi Dillon,

I've constructed a boolean 'OR' gate using:

 cyto_gate_bool(gs,
           alias = "joint_pop",
           parent = "parent_pop",
           logic = "pop1|pop2",
           gatingTemplate = "gatingTemplate.csv")

When I look at the gating tree the joint_pop is a child gate of root rather than parent_pop. I've tried with or without the parent argument but in both cases it's the same. Not sure if it's meant to be like that but it causes issues plotting the gating scheme. Removing gs from the global environment and applying the saved gating template from gatingTemplate.csv is okay then.

Thanks, Miha

DillonHammill commented 3 years ago

Thanks for reporting this @Biomiha. I did write a new cyto_nodes_ancestor() function to anchor the boolean gates to a more reasonable parent, but it looks like I forgot to change this at the GatingSet level as well. I have pushed the fix to the master branch for you.

devtools::install_github("DillonHammill/CytoExploreR")
Biomiha commented 3 years ago

Thanks @DillonHammill. Works as expected.