FelixTheStudent / cellpypes

Cell type pipes for R
GNU General Public License v3.0
51 stars 3 forks source link

plot_classes/classify: Handle overlap between parent and child #14

Closed FelixTheStudent closed 2 years ago

FelixTheStudent commented 2 years ago

Here is a minimal example with the problem:

simulated_umis %>% rule("B", "MS4A1", ">", 1e-4) %>% rule("T", "CD3E", ">", .1e-4) %>% rule("Treg", "FOXP3", ">", .05e-4, parent="T") %>% plot_classes(c("B","T","Treg"))

As you can see, we can't plot Tregs and all other Tcells in the same plot, because all Tregs are removed as overlap this way.

Possible solutions:

Bonus feature:

FelixTheStudent commented 2 years ago

Solved with commit 67560f48f3bb7d76ef9d0513d3a3f7c059394d5e (overlap with ancestor does not get replaced).