OpenCyto
1
0
Entering edit mode
Jiang, Mike ★ 1.3k
@jiang-mike-4886
Last seen 2.6 years ago
(Private Address)
Eisa, As the error shows, you want to make sure the dimension used in 'pop' and 'dim' column to be consistent, that said, you want to change 'dims' from 'B4-A,B3-A' to ''CD4,CD8'. In general, I'd recommend you to use the partial marker name (e.g. 'CD3') for `dims` column since it is more meaningful than channel name. As long as this partial string is uniquely identifiable within your flow data, openCyto should be able to match it without problem. Another suggestion is to use the partial ('Tcells') instead of full path ('/Boundry/nonDebris/DumpClean/SmallLymphocytes/Tcells'), again, as long as it is uniquely identifiable within the gating tree, it should further simplify your template. Let me know if it helps, Mike > > On Wed, Jun 18, 2014 at 2:27 PM, Eisa Mahyari <mahyarie@ohsu.edu> <mailto:mahyarie@ohsu.edu>> wrote: > > Hi Dr. Gottardo, > > My name is Eisa Mahyari and I am a graduate student down at > OHSU. I am using OpenCyto and have hit some problems using it > with the data I have available. I was wondering if I could > troubleshoot it with someone in your lab; I would greatly > appreciate the help. Below please note that I have attached my > procedure. > > Thank you in advance, > Sincerely, > Eisa > > > > ########## > #I load the xml made by flowjo > > ws <-openWorkspace("HTflowR_easygate3.xml"); ws > gating_set<-parseWorkspace(ws,name="DEMOTRY",path="sampledat aset/DEMOFCS/",isNcdf=TRUE) > > #load & attach annotations > > #load the template (please see below; it is pasted as a csv) > gt<-gatingTemplate("sampledataset/KCHS10451_140114/gt_080.man4.csv") > auto_gating<-clone(gating_set) > gating(x = gt, y = auto_gating) > > The error I get is : > > Error in FUN(gh, ...) : > X,Y axis do not match between 'dims'(B4-A,B3-A) and > 'pop'(CD4+CD8-) > > I have tried the other method of defining CD4 and 8 (I.e., * > as the alias) as a first try, and that was not working. > > > I have a simple FCS file with the colnames as (the person who > collected the data did not name them correctly). > "HDR-T" "FSC-A" "SSC-A" "V1-A" "B1-A" "B2-A" "*_B3-A_*" > "*B4-A*" "R1-A" "R2-A" > But this list corresponds to: > "time" "FSC-A" "SSC-A" "DumpPacBlueA" "IfngFITCA" > "TNFaPEA" "*_CD8PercpCy55A_*" "*CD4PECy7A*" "IL2APCA" "CD3APCCy7A" > > The template I made: > > alias,pop,parent,dims,gating_method,gating_args,collapseData ForGating,groupBy,preprocessing_method,preprocessing_args > Boundry,Boundry,root,"FSC-A,SSC-A",boundary,"max=c(2.5e5,2.5e5)",,,, > nonDebris,nonDebris+,/Boundry,FSC-A,mindensity,"gate_range=c (5e4,1e5),adjust=1.5",,,, > DumpClean,DumpClean,/Boundry/nonDebris,V1-A,mindensity,"gate _range=c(10e2,10e4),adjust=1.5",,,, > SmallLymphocytes,SmallLymphocytes,/Boundry/nonDebris/DumpCle an,"FSC-A,SSC-A",flowClust,"K=2,quantile=0.95,target=c(1e5,5e4)",,,pri or_flowClust,K=2 > Tcells,CD3+,/Boundry/nonDebris/DumpClean/SmallLymphocytes,R2 -A,mindensity,"gate_range=c(10e3,10e4)",,,, > CD8+,CD8+,/Boundry/nonDebris/DumpClean/SmallLymphocytes/Tcel ls,B3-A,mindensity,"gate_range=c(200,9000)",,,, > CD8-,CD8-,/Boundry/nonDebris/DumpClean/SmallLymphocytes/Tcel ls,B3-A,mindensity,"gate_range=c(-5000,190)",,,, > CD4+,CD4+,/Boundry/nonDebris/DumpClean/SmallLymphocytes/Tcel ls,B4-A,mindensity,"gate_range=c(200,9000)",,,, > CD4-,CD4-,/Boundry/nonDebris/DumpClean/SmallLymphocytes/Tcel ls,B4-A,mindensity,"gate_range=c(-5000,190)",,,, > CD4,CD4+CD8-,/Boundry/nonDebris/DumpClean/SmallLymphocytes/T cells,"B4-A,B3-A",refGate,CD4+:CD8-,,,, > CD8,CD4-CD8+,/Boundry/nonDebris/DumpClean/SmallLymphocytes/T cells,"B4-A,B3-A",refGate,CD4-:CD8+,,,, > TNFa,TNFa,/Boundry/nonDebris/DumpClean/SmallLymphocytes/Tcel ls/CD8,B2-A,cytokine,"adjust=2,tol=1e-4",TRUE,PTID:VISITNO,, > TNFa,TNFa,/Boundry/nonDebris/DumpClean/SmallLymphocytes/Tcel ls/CD4,B2-A,cytokine,"adjust=2,tol=1e-4",TRUE,PTID:VISITNO,, > IL2,IL2,/Boundry/nonDebris/DumpClean/SmallLymphocytes/Tcells /CD8,R1-A,cytokine,"adjust=2,tol=1e-4",TRUE,PTID:VISITNO,, > IL2,IL2,/Boundry/nonDebris/DumpClean/SmallLymphocytes/Tcells /CD4,R1-A,cytokine,"adjust=2,tol=1e-4",TRUE,PTID:VISITNO,, > IFNg,IFNg,/Boundry/nonDebris/DumpClean/SmallLymphocytes/Tcel ls/CD8,B1-A,cytokine,"adjust=2,tol=1e-4",TRUE,PTID:VISITNO,, > IFNg,IFNg,/Boundry/nonDebris/DumpClean/SmallLymphocytes/Tcel ls/CD4,B1-A,cytokine,"adjust=2,tol=1e-4",TRUE,PTID:VISITNO,, > > > > R version 3.1.0 (2014-04-10) > Platform: x86_64-apple-darwin10.8.0 (64-bit) > > locale: > [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8 > > attached base packages: > [1] grid stats graphics grDevices utils datasets > methods base > > other attached packages: > [1] data.table_1.9.2 openCyto_1.2.4 > flowWorkspace_3.10.08 gridExtra_0.9.1 > [5] ncdfFlow_2.10.30 flowViz_1.28.21 > lattice_0.20-29 flowCore_1.30.7 > > loaded via a namespace (and not attached): > [1] Biobase_2.24.0 BiocGenerics_0.10.0 car_2.0-20 > clue_0.3-48 > [5] cluster_1.15.2 coda_0.16-1 corpcor_1.6.6 > DEoptimR_1.0-1 > [9] fda_2.4.3 flowClust_3.4.10 flowStats_3.22.4 > graph_1.42.0 > [13] gtools_3.4.1 hexbin_1.26.3 > IDPmisc_1.1.17 KernSmooth_2.23-12 > [17] ks_1.9.2 latticeExtra_0.6-26 MASS_7.3-33 Matrix_1.1-3 > [21] MCMCpack_1.3-3 misc3d_0.8-4 mvoutlier_2.0.4 > mvtnorm_0.9-99992 > [25] nnet_7.3-8 parallel_3.1.0 pcaPP_1.9-49 > pls_2.4-3 > [29] plyr_1.8.1 R.methodsS3_1.6.1 R.oo_1.18.0 R.utils_1.32.4 > [33] RBGL_1.40.0 RColorBrewer_1.0-5 Rcpp_0.11.2 reshape2_1.4 > [37] rgl_0.93.996 Rgraphviz_2.8.1 robCompositions_1.8.0 > robustbase_0.91-1 > [41] rrcov_1.3-4 sgeostat_1.0-25 stats4_3.1.0 > stringr_0.6.2 > [45] tools_3.1.0 XML_3.98-1.1 zlibbioc_1.10.0 > > > > > > -- > Raphael Gottardo, PhD > Associate Member > Vaccine and Infectious Disease Division > Fred Hutchinson Cancer Research Center > Phone: 206-667-4076 <tel:206-667-4076> > Web: www.rglab.org <http: www.rglab.org=""> > > > > > -- > Raphael Gottardo, PhD > Associate Member > Vaccine and Infectious Disease Division > Fred Hutchinson Cancer Research Center > Phone: 206-667-4076 > Web: www.rglab.org <http: www.rglab.org=""> [[alternative HTML version deleted]]
Cancer eisa openCyto Cancer eisa openCyto • 1.4k views
ADD COMMENT
0
Entering edit mode
Jiang, Mike ★ 1.3k
@jiang-mike-4886
Last seen 2.6 years ago
(Private Address)
You want to remove the manual gates before call |gating| on the |auto_gating| object. Say the first manual gate was |singlet|, simply |Rm("singlet", auto_gating)| will do. By the way, given that you might need to save the gating results later on anyway, instead of |clone|, you can use |archiving| functions to achieve the same: |#save the manual gating set to a different disc copy #Note that we use symbolic link option here for cdf file to avoid the unnecessary copy of flow data #since they can be shared by both manual and auto gating sets archive_dir <-"/your/directory/auto_gating/" save_gs(gating_set, path = archive_dir, cdf ="link") #load it back to a different gatingset object auto_gs <- load_gs(archive_dir) Rm("singlet", auto_gs) #do the auto gating ... #re-save it save_gs(auto_gs, archive_dir, overwrite =TRUE) | Mike On 06/21/2014 06:27 PM, Eisa Mahyari wrote: > Hi Mike, > > Thank you for your answer and it worked! However, now that it finished > automated gating of my data I want to plot it, thus I used as an example: > > plotGate(auto_gating, c("CD4"), path = "auto", projections = > list("CD4" = c(x = "CD8", y = "CD4")), gpar = c(nrow = 2)) > > > But the gate shown in the figure is the manual gate; even though I use > the variable auto_gating not gating_set; the latter is the variable > that has the manual gating. > > Does this has to with the fact that I used the clone function? Is > there another way to populate this variable or a manual gate is always > needed? Because if the manual gate has gates with identical names, it > skips the gating as it says its already found a gate with that name. > > auto_gating<-clone(gating_set) > > > Basically I want to show how it gated. > > > > Thank you, > -Eisa > > > > > > > From: Mike <wjiang2@fhcrc.org <mailto:wjiang2@fhcrc.org="">> > Date: Thu, 19 Jun 2014 13:46:31 -0700 > To: <rgottard@fhcrc.org <mailto:rgottard@fhcrc.org="">>, Eisa Mahyari > <mahyarie@ohsu.edu <mailto:mahyarie@ohsu.edu="">>, Greg Finak > <gfinak@fhcrc.org <mailto:gfinak@fhcrc.org="">>, > <bioconductor@r-project.org <mailto:bioconductor@r-project.org="">> > Subject: Re: OpenCyto > > Eisa, > > As the error shows, you want to make sure the dimension used in 'pop' > and 'dim' column to be consistent, that said, you want to change > 'dims' from 'B4-A,B3-A' to ''CD4,CD8'. > > In general, I'd recommend you to use the partial marker name (e.g. > 'CD3') for `dims` column since it is more meaningful than channel > name. As long as this partial string is uniquely identifiable within > your flow data, openCyto should be able to match it without problem. > > Another suggestion is to use the partial ('Tcells') instead of full > path ('/Boundry/nonDebris/DumpClean/SmallLymphocytes/Tcells'), again, > as long as it is uniquely identifiable within the gating tree, it > should further simplify your template. > > Let me know if it helps, > > Mike >> >> On Wed, Jun 18, 2014 at 2:27 PM, Eisa Mahyari <mahyarie@ohsu.edu>> <mailto:mahyarie@ohsu.edu>> wrote: >> >> Hi Dr. Gottardo, >> >> My name is Eisa Mahyari and I am a graduate student down at >> OHSU. I am using OpenCyto and have hit some problems using it >> with the data I have available. I was wondering if I could >> troubleshoot it with someone in your lab; I would greatly >> appreciate the help. Below please note that I have attached >> my procedure. >> >> Thank you in advance, >> Sincerely, >> Eisa >> >> >> >> ########## >> #I load the xml made by flowjo >> >> ws <-openWorkspace("HTflowR_easygate3.xml"); ws >> gating_set<-parseWorkspace(ws,name="DEMOTRY",path="sampleda taset/DEMOFCS/",isNcdf=TRUE) >> >> #load & attach annotations >> >> #load the template (please see below; it is pasted as a csv) >> gt<-gatingTemplate("sampledataset/KCHS10451_140114/gt_080.man4.csv") >> auto_gating<-clone(gating_set) >> gating(x = gt, y = auto_gating) >> >> The error I get is : >> >> Error in FUN(gh, ...) : >> X,Y axis do not match between 'dims'(B4-A,B3-A) and >> 'pop'(CD4+CD8-) >> >> I have tried the other method of defining CD4 and 8 (I.e., * >> as the alias) as a first try, and that was not working. >> >> >> I have a simple FCS file with the colnames as (the person who >> collected the data did not name them correctly). >> "HDR-T" "FSC-A" "SSC-A" "V1-A" "B1-A" "B2-A" "*_B3-A_*" >> "*B4-A*" "R1-A" "R2-A" >> But this list corresponds to: >> "time" "FSC-A" "SSC-A" "DumpPacBlueA" "IfngFITCA" >> "TNFaPEA" "*_CD8PercpCy55A_*" "*CD4PECy7A*" "IL2APCA" >> "CD3APCCy7A" >> >> The template I made: >> >> alias,pop,parent,dims,gating_method,gating_args,collapseDat aForGating,groupBy,preprocessing_method,preprocessing_args >> Boundry,Boundry,root,"FSC-A,SSC-A",boundary,"max=c(2.5e5,2.5e5)",,,, >> nonDebris,nonDebris+,/Boundry,FSC-A,mindensity,"gate_range= c(5e4,1e5),adjust=1.5",,,, >> DumpClean,DumpClean,/Boundry/nonDebris,V1-A,mindensity,"gat e_range=c(10e2,10e4),adjust=1.5",,,, >> SmallLymphocytes,SmallLymphocytes,/Boundry/nonDebris/DumpCl ean,"FSC-A,SSC-A",flowClust,"K=2,quantile=0.95,target=c(1e5,5e4)",,,pr ior_flowClust,K=2 >> Tcells,CD3+,/Boundry/nonDebris/DumpClean/SmallLymphocytes,R 2-A,mindensity,"gate_range=c(10e3,10e4)",,,, >> CD8+,CD8+,/Boundry/nonDebris/DumpClean/SmallLymphocytes/Tce lls,B3-A,mindensity,"gate_range=c(200,9000)",,,, >> CD8-,CD8-,/Boundry/nonDebris/DumpClean/SmallLymphocytes/Tce lls,B3-A,mindensity,"gate_range=c(-5000,190)",,,, >> CD4+,CD4+,/Boundry/nonDebris/DumpClean/SmallLymphocytes/Tce lls,B4-A,mindensity,"gate_range=c(200,9000)",,,, >> CD4-,CD4-,/Boundry/nonDebris/DumpClean/SmallLymphocytes/Tce lls,B4-A,mindensity,"gate_range=c(-5000,190)",,,, >> CD4,CD4+CD8-,/Boundry/nonDebris/DumpClean/SmallLymphocytes/ Tcells,"B4-A,B3-A",refGate,CD4+:CD8-,,,, >> CD8,CD4-CD8+,/Boundry/nonDebris/DumpClean/SmallLymphocytes/ Tcells,"B4-A,B3-A",refGate,CD4-:CD8+,,,, >> TNFa,TNFa,/Boundry/nonDebris/DumpClean/SmallLymphocytes/Tce lls/CD8,B2-A,cytokine,"adjust=2,tol=1e-4",TRUE,PTID:VISITNO,, >> TNFa,TNFa,/Boundry/nonDebris/DumpClean/SmallLymphocytes/Tce lls/CD4,B2-A,cytokine,"adjust=2,tol=1e-4",TRUE,PTID:VISITNO,, >> IL2,IL2,/Boundry/nonDebris/DumpClean/SmallLymphocytes/Tcell s/CD8,R1-A,cytokine,"adjust=2,tol=1e-4",TRUE,PTID:VISITNO,, >> IL2,IL2,/Boundry/nonDebris/DumpClean/SmallLymphocytes/Tcell s/CD4,R1-A,cytokine,"adjust=2,tol=1e-4",TRUE,PTID:VISITNO,, >> IFNg,IFNg,/Boundry/nonDebris/DumpClean/SmallLymphocytes/Tce lls/CD8,B1-A,cytokine,"adjust=2,tol=1e-4",TRUE,PTID:VISITNO,, >> IFNg,IFNg,/Boundry/nonDebris/DumpClean/SmallLymphocytes/Tce lls/CD4,B1-A,cytokine,"adjust=2,tol=1e-4",TRUE,PTID:VISITNO,, >> >> >> >> R version 3.1.0 (2014-04-10) >> Platform: x86_64-apple-darwin10.8.0 (64-bit) >> >> locale: >> [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8 >> >> attached base packages: >> [1] grid stats graphics grDevices utils datasets >> methods base >> >> other attached packages: >> [1] data.table_1.9.2 openCyto_1.2.4 flowWorkspace_3.10.08 >> gridExtra_0.9.1 >> [5] ncdfFlow_2.10.30 flowViz_1.28.21 lattice_0.20-29 >> flowCore_1.30.7 >> >> loaded via a namespace (and not attached): >> [1] Biobase_2.24.0 BiocGenerics_0.10.0 car_2.0-20 clue_0.3-48 >> [5] cluster_1.15.2 coda_0.16-1 corpcor_1.6.6 DEoptimR_1.0-1 >> [9] fda_2.4.3 flowClust_3.4.10 flowStats_3.22.4 graph_1.42.0 >> [13] gtools_3.4.1 hexbin_1.26.3 IDPmisc_1.1.17 >> KernSmooth_2.23-12 >> [17] ks_1.9.2 latticeExtra_0.6-26 MASS_7.3-33 Matrix_1.1-3 >> [21] MCMCpack_1.3-3 misc3d_0.8-4 mvoutlier_2.0.4 >> mvtnorm_0.9-99992 >> [25] nnet_7.3-8 parallel_3.1.0 pcaPP_1.9-49 pls_2.4-3 >> [29] plyr_1.8.1 R.methodsS3_1.6.1 R.oo_1.18.0 R.utils_1.32.4 >> [33] RBGL_1.40.0 RColorBrewer_1.0-5 Rcpp_0.11.2 reshape2_1.4 >> [37] rgl_0.93.996 Rgraphviz_2.8.1 robCompositions_1.8.0 >> robustbase_0.91-1 >> [41] rrcov_1.3-4 sgeostat_1.0-25 stats4_3.1.0 stringr_0.6.2 >> [45] tools_3.1.0 XML_3.98-1.1 zlibbioc_1.10.0 >> >> >> >> >> >> -- >> Raphael Gottardo, PhD >> Associate Member >> Vaccine and Infectious Disease Division >> Fred Hutchinson Cancer Research Center >> Phone: 206-667-4076 <tel:206-667-4076> >> Web: www.rglab.org <http: www.rglab.org=""> >> >> >> >> >> -- >> Raphael Gottardo, PhD >> Associate Member >> Vaccine and Infectious Disease Division >> Fred Hutchinson Cancer Research Center >> Phone: 206-667-4076 >> Web: www.rglab.org <http: www.rglab.org=""> > [[alternative HTML version deleted]]
ADD COMMENT

Login before adding your answer.

Traffic: 669 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