Open avdvloet opened 1 year ago
@avdvloet in order to save the gates to the gatingTemplate correctly, you should avoid subsetting the samples in cyto_gate_draw()
. Also, the GatingSet is designed to stored the same set of gates for all samples (i.e. the same gating strategy), the locations of these gates may differ per sample but all samples must contain the same set of gates.
cyto_gate_draw()
supports gating samples separately through the group_by
argument - in your case setting group_by = "name"
will allow you set a different gate for each sample. Alternatively, group_by
can merge data into groups for gating based on experiment variables stored in cyto_details()
.
P.S. cyto_extract()
will return a cytoset
object not a GatingSet
object. Passing a cytoset
to cyto_gate_draw()
will allow you to draw gates (and return them) but they cannot be attached to cytoset
objects.
I have a problem with gating a subset within a previous gated subset, also obtained via gating. Below is the code I already have. For all samples, I want to first obtain the nuclei, denoted each time by the name
nuclei_{n}
. Within the nuclei of each sample, I now want to obtain the 'filtered nuclei', denoted by the aliasf1_nuclei_{i}
. Everything seems to be running, and I can pull the second gate nicely inside on what appear to be my nuclei, within my roots (in other words, the gating hierarchy works and the second gate is effectively taken from the nuclei and not from the roots). However, does not store the data correctly in the gatingTemplate. Do you have an answer to this? thanks in advance!My code: