Question: openCyto: Using combination gates (boolean gates)
1
gravatar for juancamilos
4.9 years ago by
juancamilos10
Brazil / Rio de Janeiro / Instituto Oswaldo Cruz
juancamilos10 wrote:

Hi Guys,

Here are some questions.

  1. Is this possible to examine a FlowJo workspace in openCyto only in order to convert it into a gating template?
  2. It is possible to create a combination of gates ie. ifn+/-il2+/-il4+/-il10+/-tnf+/- ? I am trying with refGate-mindensity but it didn't work. Does exists a similar function as "boolean gates" found in FlowJo. When I use refGate-mindensity I am having the following error:

    "expanding pop: cd4-/+cd8+/-

    Error in .preprocess_row(this_row) :
      ifn+/-il2+/-il4+/-il10+/-tnf+/- has invalid number of dimensions: 5"

  3. I am also trying to create new gates with alias-created populations like: ifn+ producing cells from a population CD45RO+CD197+ but it also did not work. I received the following error:

"expanding pop: cd4-/+cd8+/-

expanding pop: cd45ro+/-cd197+/-

expanding pop: cd45ro+/-cd197+/-

Error in .getFullPath(this_row[, parent], new_dt) :
  Non-unique reference to: cd45ro+cd197+"

Using from malaria_gate .csv (link at the end)

> dtTemplate[17,]
      alias      pop        parent    dims gating_method       gating_args collapseDataForGating groupBy preprocessing_method preprocessing_args
1: tcm_ifng tcm_ifng cd45ro+cd197+ fsa,ifn    mindensity gate_range=c(1,3)                    NA      NA                                      NA

I am also sending attached two .csv file with two possible gating structures.

The first one I created worked (https://www.dropbox.com/s/8n21icd4cvps7w4/gate_malaria.csv?dl=0) but I am stuck when trying to apply more complex gates, like in (https://www.dropbox.com/s/cubzfbqq9oan9wm/large_malaria.csv?dl=0) because I think I am being redundant with the populations, and because I couldn't create the combination of gates.

Thanks a lot for any advice or suggestion that you can give me.

Bests

                   
                   
                   
                   
                   
                   
                   
                   
                   
                   
                   
                   
                   
                   
                   
                   
                   
                   
ADD COMMENTlink modified 4.9 years ago by Greg Finak150 • written 4.9 years ago by juancamilos10

Just to clarify, refGate is the geometrical gate (either 1d or 2d rectangleGate) based on the coordinates of other gates. So it is different from the boolGate that is the boolean combinations of gates.

ADD REPLYlink modified 4.9 years ago • written 4.9 years ago by Jiang, Mike1.2k
Answer: openCyto: Using combination gates (boolean gates)
2
gravatar for Jiang, Mike
4.9 years ago by
Jiang, Mike1.2k
(Private Address)
Jiang, Mike1.2k wrote:

1. try 'help(templateGen)'

2. set 'method' to 'boolGate' and 'args' to 'ifn+&il2+&...' (use '|' for 'or' operations)

 

ADD COMMENTlink modified 4.9 years ago • written 4.9 years ago by Jiang, Mike1.2k
Answer: openCyto: Using combination gates (boolean gates)
2
gravatar for Greg Finak
4.9 years ago by
Greg Finak150
(Private Address)
Greg Finak150 wrote:


I'd add

1. Use `templateGen`, but you'll need to parse at least one sample to generate a GatingSet. Write the output to file and fill in the missing details. The generated template is just a skeleton.

2. The `polyFunctions` gate may be what you are looking for, as it will generate all boolean combinations of the inputs. It is there for convenience when there are many markers. Pass the markers to the `gating_args` column in the template. I think the documentation is a bit sparse at the moment on the specific syntax. We'll address that. 

3. Not certain, but you may need to ensure you refer to gates by unique gating paths. In this case, the gate can likely refer to a gate parented by CD4 or CD8.

 

ADD COMMENTlink modified 4.9 years ago • written 4.9 years ago by Greg Finak150

Greg was right.  Parent needs to be more specific, e.g. cd4+cd8-/cd45ro+cd197+ 

Also instead of 

alias pop parent dims gating_method gating_args
* cd4-/+cd8+/- lymph cd4,cd8 mindensity gate_range=c(1,3)

you can do

alias pop parent dims gating_method gating_args
cd4gate cd4 lymph cd4 mindensity gate_range=c(1,3)
cd8gate cd8 lymph cd8 mindensity gate_range=c(1,3)
cd4 cd4+cd8- lymph cd4,cd8 refGate cd4gate:cd8gate
cd8 cd4-cd8+ lymph cd4,cd8 refGate cd4gate:cd8gate

This requires you to write 3 more lines, but in overall, it simplifies your csv given these two populations are referred frequently in downstream gating, 

 

The templates come with the package also gives you some concrete examples to follow.

> list.files(system.file("extdata/gating_template",package = "openCyto"))
[1] "bcell.csv"      "ICS_080.csv"    "ICS.csv"        "ITN_Newell.csv" "tcell.csv"      "treg.csv" 
ADD REPLYlink written 4.9 years ago by Jiang, Mike1.2k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 282 users visited in the last hour