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:
don't replace overlap if it is between a (leaf) class and one of its ancestors. Instead, use leaf class, not ancestor class.
warn the user that more than 15 % of a class is overlapping with another class... ties in with plot_overlap function I am planning I guess?
Bonus feature:
perhaps introduce shortcuts that can be passed to classify's classes argument. For example ..leafs.. or leafs(). Then I could do something like this: classify(classes=c(..leafs.., "T")).
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:
..leafs..
orleafs()
. Then I could do something like this: classify(classes=c(..leafs.., "T")).