Question: polyFunctions gate in OpenCyto 1.20
1
6 months ago by
k.teijgeler0 wrote:

Hello,

I am trying to make a csv GatingTemplate using OpenCyto 1.20.2. All gating functions i've used thusfar have worked. The current panel im working on has a lot of polyFunctionality so i would love to use the polyFunctions gate for this.

In the previous csv GatingTemplate style i remember i had a functional polyFunctions gate functional. I am running into some issues when i try to repeat this in the new GatingTemplate style implemented after OpenCyto 1.14.

I've put an part of the GatingTemplate i am using below: GatingTemplate csv

I am getting the following error: [180] "Population '*'"
[181] "adding CD4+IL2+&CD4+TNFa+&CD4+IFNg+ ..."
[182] "Error in parse(text = expr) : <text>:1:9: unexpected '&'"
[183] "1: CD4+IL2+&"
[184] " ^"

See the full warning log below: GateWarnings

Could someone point me to what i am doing wrong :)?

Kind regards, Kasper

modified 6 months ago by Jiang, Mike1.2k • written 6 months ago by k.teijgeler0

Hi, Could you upload the CSV file? The link points to the Excel file and there could be some hidden post-processing. From the warnings, it looks like the ":" was replaced by "&", which is not recognized. HTH

here is the CSV file: Gating Template CSV

Thanks for looking at it !

1

This csv ("Gating Template CSV") has the issue at line78

CD4+CD45RA+-    -+  CD4+IL4-        boolGate


where 'pop' column should be '+' for 'boolGate'. For the 'polyfunctions' version, It loads without problems with the latest Bioc release 3.9

> packageVersion("openCyto")
[1] ‘1.22.0’

ADD REPLYlink modified 6 months ago • written 6 months ago by Jiang, Mike1.2k

Thanks for looking at it, somehow that Gating Template works for me the boolGate is not giving me a problem

The following does not work for me: polyFunctions Test I installed R 3.6 and just tried the Bioc release 3.9 but i am getting the same error: [180] "Population '*'" [181] "adding CD4+IL2+&CD4+TNFa+&CD4+IFNg+ ..." [182] "Error in parse(text = expr) : <text>:1:9: unexpected '&'" [183] "1: CD4+IL2+&" [184] " ^"

I've tried running it in the following ways: Linux, Bioc 3.7 Windows, Bioc 3.7 Windows, Bioc 3.9

It feels as if the problem lies in the fact that the : are converted into & signs. Any idea why this would happen?

Well I don't see the problem.The CSV will help the openCyto team.

I would recommend you to check 2 lines starting with quotes. I am not sure whether it's OK to put comma and space in the alias. May be you can try without those lines.

HTH

"CD4+CD45RA-CCR7+, CD4+CD45RA+CCR7+ , CD4+CD45RA+CCR7- , CD4+CD45RA-CCR7-",*,CD4+,"BV786.A,BV510.A",quadrantGate_tmix2,"K=4,quantile1=0.95,quantile3=0.9,min=c(1.75,1.3),max=c(2,2)",TRUE,PID,,
"CD8+CD45RA-CCR7+, CD8+CD45RA+CCR7+ , CD8+CD45RA+CCR7- , CD8+CD45RA-CCR7-",*,CD8+,"BV786.A,BV510.A",quadrantGate_tmix2,"K=4,quantile1=0.95,quantile3=0.9,min=c(1.5,1.3),max=c(2.5,2)",TRUE,PID,,


Its weird, the problem starts arising when i add the last line, the 2 tmix gates worked fine for me.

To check if those 2 lines are causing the problem i've made the following Gating Template: polyFunctions test Gating Template But i am getting a similar error: [125] "Population '*'"
[126] "adding CD4+IL2+&CD4+TNFa+&CD4+IFNg+ ..."
[127] "Error in parse(text = expr) : <text>:1:9: unexpected '&'"
[128] "1: CD4+IL2+&"
[129] " ^"

Like you say it looks as if the comma's are converted into & signs which causes the problem.

For completeness, i am using the following packages: R package versions

ADD REPLYlink modified 6 months ago • written 6 months ago by k.teijgeler0
Answer: polyFunctions gate in OpenCyto 1.20
2
6 months ago by
Jiang, Mike1.2k
Jiang, Mike1.2k wrote:

I've pushed the fix to trunk and RELEASE_3_8 branches of RGLab's github (unfortunately, I won't be able to push to Bioconductor RELEASE38 since it is not the current active release). Let me know if it works for you.

Hey Jiang, sorry for the delay i am just back from holiday. I just checked and it now works in 3_8. Thanks a lot for the quickfix :)

Answer: polyFunctions gate in OpenCyto 1.20
1
6 months ago by
k.teijgeler0 wrote:

When using Bioconductor 3.7 with openCyto 1.20.2, it is problematic to have + and - in the aliases in combination with polyFunctions.

This example does not work (for me): Gating Template with + and -

alias
CD4+IL2+
CD4+IL2-
CD4+CD45RA-CCR7+, CD4+CD45RA+CCR7+ , CD4+CD45RA+CCR7- , CD4+CD45RA-CCR7-
*
gating_method
rangeGate
refGate
polyFunctions

gating_args
alpha='min', sd=2.5,rare=TRUE
CD4+IL2+
K=4,quantile1=0.95,quantile3=0.9,min=c(1.75,1.3),max=c(2,2)
CD4+IL2+:CD4+TNFa+:CD4+IFNg+


This example works (for me). Gating Template with pos and neg instead

alias
CD4posIL2pos
CD4posIL2neg
CD4posCD45RAnegCCR7pos, CD4posCD45RAposCCR7pos , CD4posCD45RAposCCR7neg , CD4posCD45RAnegCCR7neg
A,B,C,D,E,F,G,H

gating_method
rangeGate
refGate
polyFunctions

gating_args
alpha='min', sd=2.5,rare=TRUE
CD4posIL2pos
K=4,quantile1=0.95,quantile3=0.9,min=c(1.75,1.3),max=c(2,2)
CD4posIL2pos:CD4posTNFapos:CD4posIFNgpos


Lessons learned: Do not use + and - in the Alias in combination with the polyFunctions gatingMethod.

Again, you should use the latest release: openCyto 1.22

I wish that was an easy option for me. I want a solution on an R shiny server i am using, so i am a 100% everyone uses the same packages and files ect. Using separate PC's has always been problematic, some people have more or less recent versions.

Thats why i am currently working on a R shiny server that i myself do not administrate so i have no power over which R version is on the server. Except for a pretty long process in which i have to align multiple users to want to have a newer R version. I do not know how to install a R3.6 package on a R3.5.1 R shiny server. If you could point me in the right direction that would be great :).

Besides that i tried the previous examples in the answer on my windows installation with a fresh R3.6 install with OpenCyto 1.22 i get the same error. For me in terms of this error there is no difference between 1.20.2 or 1.22. The solution for me is also the same for OpenCyto 1.20.2 (Amazon server or Windows) and OpenCyto 1.22 (Windows). Do not use + or - in the alias names when using the polyFunctions gatingMethod.

Did you not have the problem with + and - signs when using the polyFunctions gatingMethod? Because that would mean that it is something else i am doing.

Content
Help
Access

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