RGLab / openCyto

A package that provides data analysis pipeline for flow cytometry.
GNU Affero General Public License v3.0
77 stars 29 forks source link

gate_quad_sequential as parent gate for downstream gating in opencyto CSV template #241

Closed noeldtz closed 2 weeks ago

noeldtz commented 2 years ago

Hi all,

I'm new to this forum so please forgive me if I'm not posting this question in the right place. I have recently started working with Opencyto package for automated data analysis of FACS data in R. I'm really enthousiastic about the package, but I'm running into an issue that i cannot seem to fix. It regards the usage of a CSV template to define the gating strategy. In this CSV file, I'm able to create relatively simple gates, but when i try to make a gate with the gate_quad_sequential gating method, things get a bit tricky. When i define the following in the CSV:

alias: A,B,C,D pop: * parent: parent dims: markerA,markerB gating_method: gate_quad_sequential gating_args: gFunc = 'mindensity'

i get the following error: Error in pops[[2]] : subscript out of bounds

when i define the following:

alias: A,B,C,D pop: +/-+/- parent: parent dims: markerA,markerB gating_method: gate_quad_sequential gating_args: gFunc = 'mindensity'

it works, but the alias of the population is overwritten by * and no further gating can be done on any of the quad gates as i cannot use them as parent in the CSV template due to the overwriting if the alias.

So basically what i want is to make a quadgate with the gate_quad_sequential method (and not the regular mindensity function in two dimensions) and i also want to be able to create subgates with these quadgates as parents within the CSV file.

Any help is greatly appreciated!

Thanks!

djhammill commented 1 year ago

Thanks for reporting this issue @noeldtz.

Looks like pop = "*" is not currently supported for quadrant gating methods. I have added a PR to add support for this, see #245 for details.

Once merged, you will be able to manually label each quadrant through alias (top left, top right, bottom right and bottom left order) and set pop = "*".

Alternatively, you can use the default quadrant names by setting alias = "*" as well - which matches the behaviour of alias ="-/+-/+".