openCyto: Using combination gates (boolean gates)
2
1
Entering edit mode
juancamilos ▴ 10
@juancamilos-7231
Last seen 10.0 years ago
Brazil / Rio de Janeiro / Instituto Osw…

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

                   
                   
                   
                   
                   
                   
                   
                   
                   
                   
                   
                   
                   
                   
                   
                   
                   
                   
opencyto opencyto gating FlowJo • 3.4k views
ADD COMMENT
0
Entering edit mode

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 REPLY
2
Entering edit mode
Jiang, Mike ★ 1.3k
@jiang-mike-4886
Last seen 3.2 years ago
(Private Address)

1. try 'help(templateGen)'

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

 

ADD COMMENT
2
Entering edit mode
Greg Finak ▴ 150
@greg-finak-4594
Last seen 6.4 years ago
(Private Address)


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 COMMENT
0
Entering edit mode

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 REPLY

Login before adding your answer.

Traffic: 811 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6