flowClust results in subset filters
1
0
Entering edit mode
Florian Hahne ▴ 540
@florian-hahne-2471
Last seen 10.3 years ago
Hi Bastian, Kenneth, the problem in this case is that flowClust extends the multipleFilterResult class, adding all the mixture parameters and stuff. The subsetFilter operation is defined in flowCore, which doesn't really know about all these additional slots. We do have a mechanism in place to deal with such cases, i.e, the summarizeFilter method which is called whenever a filter is evaluated. This is basically just a hook that has access to both the input filter and the filterResult, and it can be used to add arbitrary items to the filterDetails slot. I added a summarizeFilter method for tmixFilters which does exactly that. The following will still give you a multipleFilterResult object as the result of the subsetFilter operation but now with additional flowClust parameters attached in the filterDetails. library(flowClust) data(GvHD) foo <- GvHD[[1]] rg <- rectangleGate("FSC-H"=c(100,600), "SSC-H"=c(200, 700)) tm <- tmixFilter(parameters=c("FSC-H", "SSC-H"), K=3) fr <- filter(foo, tm %subset% rg) names(filterDetails(fr, "tmixFilter in defaultRectangleGate")) Note that there are three items in the filterDetails list, one for each of the components of the subsetFilter and one for the subsetFilter itself, and that the latter contains copies of values of the former two. This is intentional, albeit a bit unfortunate in this case, since the additional flowClust parameters contain a lot of information (large matrices, indexing vectors...), which is unnecessarily copied here. bw, Florian Bastian Angermann wrote: > Thank you very much and have a great weekend. > > Bastian > > -------- Original-Nachricht -------- > >> Datum: Fri, 01 May 2009 14:16:01 -0700 >> Von: Florian Hahne <fhahne at="" fhcrc.org=""> >> An: Bastian Angermann <angerb at="" gmx.de=""> >> Betreff: Re: [BioC] flowClust results in subset filters >> > > >> Ok, I will take a look asap, >> Florian >> >> Bastian Angermann wrote: >> >>> Hi Florian, >>> >>> I've come over a minor issue with the current return type of a filter >>> operation that subsets a tmix-filter within an other filter. >>> >>> While the current return type of multipleFilterResult allows to access >>> the class assignment by the tmix-Filter, the results describing >>> the fitted distribution (i.e. means, proportions and >>> covariance matrices) are not accessible. The filter included in the >>> >> filterDetails in the appropriate gate is of type tmixFilter and not >> tmixFilterResult, which would of course have a redundant subSet. >> >>> Access to the parameters of the fitted distributions would be >>> quite usefull. >>> >>> >>> Best, >>> Bastian >>> -------- Original-Nachricht -------- >>> >>> >>>> Datum: Mon, 27 Apr 2009 17:41:43 -0700 >>>> Von: Florian Hahne <fhahne at="" fhcrc.org=""> >>>> An: Bastian Angermann <angerb at="" gmx.de=""> >>>> Betreff: Re: [BioC] flowClust results in subset filters >>>> >>>> >>> >>> >>>> Hi Bastian, >>>> I just committed the changes to the devel branch of the package >>>> >> (version >> >>>> 1.11.1). >>>> It might take a day or two to build, but it would be great if you could >>>> take a look at this version first. I would like to hold off on bumping >>>> things back into release unless we are all happy with it. >>>> If you know how to build the devel package from source you should be >>>> able to get the 1.11.1 version as of now. >>>> Florian >>>> >>>> Bastian Angermann wrote: >>>> >>>> >>>>> Hi Florian, >>>>> >>>>> thanks for your reply. Let me know if I can do any beta testing >>>>> of the new code. >>>>> >>>>> Cheers, >>>>> Bastian. >>>>> >>>>> -------- Original-Nachricht -------- >>>>> >>>>> >>>>> >>>>>> Datum: Sun, 26 Apr 2009 22:49:02 -0700 >>>>>> Von: Florian Hahne <fhahne at="" fhcrc.org=""> >>>>>> An: Bastian Angermann <angerb at="" gmx.de=""> >>>>>> CC: Bioconductor at stat.math.ethz.ch >>>>>> Betreff: Re: [BioC] flowClust results in subset filters >>>>>> >>>>>> >>>>>> >>>>> >>>>> >>>>> >>>>>> Hi Bastian, >>>>>> this is indeed a feature which wasn't implemented yet. I fixed the >>>>>> code and everything seems to be working as intended now, but I want >>>>>> >> to >> >>>>>> give it some more rigorous testing before submitting. I am planning >>>>>> >> to >> >>>>>> push that back into the release branch since it is more of a bug fix >>>>>> than feature addition. >>>>>> If you want to be more independent of the types of comparisons >>>>>> >> between >> >>>>>> gating steps, you might want to take a look at the workFlow stuff (as >>>>>> >> >> >>>>>> described in the package vignette). There you can compute summary >>>>>> statistics for a particular gating operation based on another >>>>>> reference view in the workFlow (via the additional 'reference' >>>>>> argument of the summary method) >>>>>> bw, >>>>>> Florian >>>>>> >>>>>> >>>>>> On 24.04.2009, at 10:30, Bastian Angermann wrote: >>>>>> >>>>>> >>>>>> >>>>>> >>>>>>> Hi, >>>>>>> >>>>>>> I am using R2.9.0 and the 2.4 version of Bioconductor. When I try to >>>>>>> >> >> >>>>>>> run >>>>>>> a tmixfilter subsetted on a rectangular gate the result is of class >>>>>>> logicalFilterResult thus I am unable to access the individual >>>>>>> clusters: >>>>>>> ################################################# >>>>>>> library(flowCore) >>>>>>> library(flowClust) >>>>>>> data(rituximab) >>>>>>> >>>>>>> r_filter <- rectangleGate("FSC.H"=c(100,500),"SSC.H"=c(100,500)) >>>>>>> # gate boundaries are not meant to be meaningful. >>>>>>> t_filter <- tmixFilter("tmix", c("FSC.H", "SSC.H"), K=3) >>>>>>> result <- filter(rituximab,t_filter %subset% r_filter) >>>>>>> >>>>>>> class(result) >>>>>>> ################################################ >>>>>>> >>>>>>> Is that a bug, missing feature or am I missing something? >>>>>>> I'd like to be able to see the result of the >>>>>>> tmixFilter in the context of the ancestor populations, >>>>>>> thus the %subset%. I'am working around that by adding an index >>>>>>> >> vector >> >>>>>>> to the original flowFrame, to be able to do manual subsetting, but >>>>>>> it would be nice to to that without this hack. >>>>>>> >>>>>>> Thanks a lot, >>>>>>> Bastian Angermann >>>>>>> -- >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Bioconductor mailing list >>>>>>> Bioconductor at stat.math.ethz.ch >>>>>>> https://stat.ethz.ch/mailman/listinfo/bioconductor >>>>>>> Search the archives: >>>>>>> >>>>>>> >>>>>>> >>>>>> http://news.gmane.org/gmane.science.biology.informatics.conductor >>>>>> >>>>>> >>>>>> >>>>> >>>>> >>>>> >>>> -- >>>> Florian Hahne, PhD >>>> Computational Biology Program >>>> Division of Public Health Sciences >>>> Fred Hutchinson Cancer Research Center >>>> 1100 Fairview Ave. N, M1-B514 >>>> PO Box 19024 >>>> Seattle, Washington 98109-1024 >>>> 206-667-3148 >>>> fhahne at fhcrc.org >>>> >>>> >>> >>> >> -- >> Florian Hahne, PhD >> Computational Biology Program >> Division of Public Health Sciences >> Fred Hutchinson Cancer Research Center >> 1100 Fairview Ave. N, M1-B514 >> PO Box 19024 >> Seattle, Washington 98109-1024 >> 206-667-3148 >> fhahne at fhcrc.org >> > > -- Florian Hahne, PhD Computational Biology Program Division of Public Health Sciences Fred Hutchinson Cancer Research Center 1100 Fairview Ave. N, M1-B514 PO Box 19024 Seattle, Washington 98109-1024 206-667-3148 fhahne at fhcrc.org
Cancer flowCore flowClust Cancer flowCore flowClust • 1.4k views
ADD COMMENT
0
Entering edit mode
Kenneth Lo ▴ 50
@kenneth-lo-2755
Last seen 10.3 years ago
Hi Florian, Thanks a lot for the fix, which clearly makes the integration of flowClust with flowCore more sense as now it may tell the class assignment from tmixFilter when combining its use with other filtering/ gating operations defined in flowCore. I've just checked out the most updated copy from the devel branch (version 1.11.2), and tried the example code in your email. The filter method in the 2nd last line of the example code does return a multipleFilterResult object now, which is what we desire. However, similar to Bastian's experience, I could only access the tmixFilter object but not the tmixFilterResult object in the filterDetails list. Some slots which describe the fitted distribution using flowClust, e.g., mu, sigma and lambda, are found in the tmixFilterResult class but not in tmixFilter. Are there any means to retrieve these pieces of information? Thanks again, Kenneth On 5-May-09, at 11:41 AM, Florian Hahne wrote: > Hi Bastian, Kenneth, > the problem in this case is that flowClust extends the > multipleFilterResult class, adding all the mixture parameters and > stuff. The subsetFilter operation is defined in flowCore, which > doesn't really know about all these additional slots. We do have a > mechanism in place to deal with such cases, i.e, the summarizeFilter > method which is called whenever a filter is evaluated. This is > basically just a hook that has access to both the input filter and > the filterResult, and it can be used to add arbitrary items to the > filterDetails slot. I added a summarizeFilter method for tmixFilters > which does exactly that. > The following will still give you a multipleFilterResult object as > the result of the subsetFilter operation but now with additional > flowClust parameters attached in the filterDetails. > > library(flowClust) > data(GvHD) > foo <- GvHD[[1]] > rg <- rectangleGate("FSC-H"=c(100,600), "SSC-H"=c(200, 700)) > tm <- tmixFilter(parameters=c("FSC-H", "SSC-H"), K=3) > fr <- filter(foo, tm %subset% rg) > names(filterDetails(fr, "tmixFilter in defaultRectangleGate")) > > Note that there are three items in the filterDetails list, one for > each of the components of the subsetFilter and one for the > subsetFilter itself, and that the latter contains copies of values > of the former two. This is intentional, albeit a bit unfortunate in > this case, since the additional flowClust parameters contain a lot > of information (large matrices, indexing vectors...), which is > unnecessarily copied here. > > bw, > Florian > > > Bastian Angermann wrote: >> Thank you very much and have a great weekend. >> >> Bastian >> >> -------- Original-Nachricht -------- >> >>> Datum: Fri, 01 May 2009 14:16:01 -0700 >>> Von: Florian Hahne <fhahne at="" fhcrc.org=""> >>> An: Bastian Angermann <angerb at="" gmx.de=""> >>> Betreff: Re: [BioC] flowClust results in subset filters >>> >> >> >>> Ok, I will take a look asap, >>> Florian >>> >>> Bastian Angermann wrote: >>> >>>> Hi Florian, >>>> >>>> I've come over a minor issue with the current return type of a >>>> filter operation that subsets a tmix-filter within an other filter. >>>> >>>> While the current return type of multipleFilterResult allows to >>>> access >>>> the class assignment by the tmix-Filter, the results describing >>>> the fitted distribution (i.e. means, proportions and covariance >>>> matrices) are not accessible. The filter included in the >>>> >>> filterDetails in the appropriate gate is of type tmixFilter and not >>> tmixFilterResult, which would of course have a redundant subSet. >>>> Access to the parameters of the fitted distributions would be >>>> quite usefull. >>>> >>>> Best, >>>> Bastian >>>> -------- Original-Nachricht -------- >>>> >>>>> Datum: Mon, 27 Apr 2009 17:41:43 -0700 >>>>> Von: Florian Hahne <fhahne at="" fhcrc.org=""> >>>>> An: Bastian Angermann <angerb at="" gmx.de=""> >>>>> Betreff: Re: [BioC] flowClust results in subset filters >>>>> >>>> >>>>> Hi Bastian, >>>>> I just committed the changes to the devel branch of the package >>>>> >>> (version >>>>> 1.11.1). >>>>> It might take a day or two to build, but it would be great if >>>>> you could >>>>> take a look at this version first. I would like to hold off on >>>>> bumping things back into release unless we are all happy with it. >>>>> If you know how to build the devel package from source you >>>>> should be able to get the 1.11.1 version as of now. >>>>> Florian >>>>> >>>>> Bastian Angermann wrote: >>>>> >>>>>> Hi Florian, >>>>>> >>>>>> thanks for your reply. Let me know if I can do any beta testing >>>>>> of the new code. >>>>>> >>>>>> Cheers, >>>>>> Bastian. >>>>>> -------- Original-Nachricht -------- >>>>>> >>>>>>> Datum: Sun, 26 Apr 2009 22:49:02 -0700 >>>>>>> Von: Florian Hahne <fhahne at="" fhcrc.org=""> >>>>>>> An: Bastian Angermann <angerb at="" gmx.de=""> >>>>>>> CC: Bioconductor at stat.math.ethz.ch >>>>>>> Betreff: Re: [BioC] flowClust results in subset filters >>>>>>> >>>>>> >>>>>>> Hi Bastian, >>>>>>> this is indeed a feature which wasn't implemented yet. I fixed >>>>>>> the code and everything seems to be working as intended now, >>>>>>> but I want >>>>>>> >>> to >>>>>>> give it some more rigorous testing before submitting. I am >>>>>>> planning >>>>>>> >>> to >>>>>>> push that back into the release branch since it is more of a >>>>>>> bug fix than feature addition. >>>>>>> If you want to be more independent of the types of comparisons >>>>>>> >>> between >>>>>>> gating steps, you might want to take a look at the workFlow >>>>>>> stuff (as >>>>>>> >>> >>>>>>> described in the package vignette). There you can compute >>>>>>> summary statistics for a particular gating operation based on >>>>>>> another reference view in the workFlow (via the additional >>>>>>> 'reference' argument of the summary method) >>>>>>> bw, >>>>>>> Florian >>>>>>> >>>>>>> >>>>>>> On 24.04.2009, at 10:30, Bastian Angermann wrote: >>>>>>> >>>>>>> >>>>>>>> Hi, >>>>>>>> >>>>>>>> I am using R2.9.0 and the 2.4 version of Bioconductor. When I >>>>>>>> try to >>>>>>>> >>> >>>>>>>> run >>>>>>>> a tmixfilter subsetted on a rectangular gate the result is of >>>>>>>> class logicalFilterResult thus I am unable to access the >>>>>>>> individual clusters: >>>>>>>> ################################################# >>>>>>>> library(flowCore) >>>>>>>> library(flowClust) >>>>>>>> data(rituximab) >>>>>>>> >>>>>>>> r_filter <- >>>>>>>> rectangleGate("FSC.H"=c(100,500),"SSC.H"=c(100,500)) >>>>>>>> # gate boundaries are not meant to be meaningful. >>>>>>>> t_filter <- tmixFilter("tmix", c("FSC.H", "SSC.H"), K=3) >>>>>>>> result <- filter(rituximab,t_filter %subset% r_filter) >>>>>>>> >>>>>>>> class(result) >>>>>>>> ################################################ >>>>>>>> >>>>>>>> Is that a bug, missing feature or am I missing something? >>>>>>>> I'd like to be able to see the result of the >>>>>>>> tmixFilter in the context of the ancestor populations, >>>>>>>> thus the %subset%. I'am working around that by adding an index >>>>>>>> >>> vector >>> >>>>>>>> to the original flowFrame, to be able to do manual >>>>>>>> subsetting, but >>>>>>>> it would be nice to to that without this hack. >>>>>>>> >>>>>>>> Thanks a lot, >>>>>>>> Bastian Angermann >>>>>>>> -- >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> Bioconductor mailing list >>>>>>>> Bioconductor at stat.math.ethz.ch >>>>>>>> https://stat.ethz.ch/mailman/listinfo/bioconductor >>>>>>>> Search the archives: >>>>>>>> >>>>>>> http://news.gmane.org/ >>>>>>> gmane.science.biology.informatics.conductor >>>>>>> >>>>>> >>>>> -- >>>>> Florian Hahne, PhD >>>>> Computational Biology Program >>>>> Division of Public Health Sciences >>>>> Fred Hutchinson Cancer Research Center >>>>> 1100 Fairview Ave. N, M1-B514 >>>>> PO Box 19024 >>>>> Seattle, Washington 98109-1024 >>>>> 206-667-3148 >>>>> fhahne at fhcrc.org >>>>> >>>> >>> -- >>> Florian Hahne, PhD >>> Computational Biology Program >>> Division of Public Health Sciences >>> Fred Hutchinson Cancer Research Center >>> 1100 Fairview Ave. N, M1-B514 >>> PO Box 19024 >>> Seattle, Washington 98109-1024 >>> 206-667-3148 >>> fhahne at fhcrc.org >>> >> >> > > > -- > Florian Hahne, PhD > Computational Biology Program > Division of Public Health Sciences > Fred Hutchinson Cancer Research Center > 1100 Fairview Ave. N, M1-B514 > PO Box 19024 > Seattle, Washington 98109-1024 > 206-667-3148 > fhahne at fhcrc.org >
ADD COMMENT
0
Entering edit mode
Hi Kenneth, did you also update your flowClust? I had to add the summarizeFilter method there. The version you need is 2.3.1. When running the last command of the example code I get this names(filterDetails(fr, "tmixFilter in defaultRectangleGate")) [1] "filter" "populations" "expName" "varNames" "K" [6] "w" "mu" "sigma" "lambda" "nu" [11] "z" "u" "label" "uncertainty" "ruleOutliers" [16] "flagOutliers" "rm.min" "rm.max" "logLike" "BIC" [21] "ICL" Those are all the additional slots from the tmixFilterResult class. Florian Kenneth Lo wrote: > Hi Florian, > > Thanks a lot for the fix, which clearly makes the integration of > flowClust with flowCore more sense as now it may tell the class > assignment from tmixFilter when combining its use with other > filtering/gating operations defined in flowCore. I've just checked > out the most updated copy from the devel branch (version 1.11.2), and > tried the example code in your email. The filter method in the 2nd > last line of the example code does return a multipleFilterResult > object now, which is what we desire. However, similar to Bastian's > experience, I could only access the tmixFilter object but not the > tmixFilterResult object in the filterDetails list. Some slots which > describe the fitted distribution using flowClust, e.g., mu, sigma and > lambda, are found in the tmixFilterResult class but not in > tmixFilter. Are there any means to retrieve these pieces of information? > > Thanks again, > > Kenneth > > > > > On 5-May-09, at 11:41 AM, Florian Hahne wrote: > >> Hi Bastian, Kenneth, >> the problem in this case is that flowClust extends the >> multipleFilterResult class, adding all the mixture parameters and >> stuff. The subsetFilter operation is defined in flowCore, which >> doesn't really know about all these additional slots. We do have a >> mechanism in place to deal with such cases, i.e, the summarizeFilter >> method which is called whenever a filter is evaluated. This is >> basically just a hook that has access to both the input filter and >> the filterResult, and it can be used to add arbitrary items to the >> filterDetails slot. I added a summarizeFilter method for tmixFilters >> which does exactly that. >> The following will still give you a multipleFilterResult object as >> the result of the subsetFilter operation but now with additional >> flowClust parameters attached in the filterDetails. >> >> library(flowClust) >> data(GvHD) >> foo <- GvHD[[1]] >> rg <- rectangleGate("FSC-H"=c(100,600), "SSC-H"=c(200, 700)) >> tm <- tmixFilter(parameters=c("FSC-H", "SSC-H"), K=3) >> fr <- filter(foo, tm %subset% rg) >> names(filterDetails(fr, "tmixFilter in defaultRectangleGate")) >> >> Note that there are three items in the filterDetails list, one for >> each of the components of the subsetFilter and one for the >> subsetFilter itself, and that the latter contains copies of values of >> the former two. This is intentional, albeit a bit unfortunate in this >> case, since the additional flowClust parameters contain a lot of >> information (large matrices, indexing vectors...), which is >> unnecessarily copied here. >> >> bw, >> Florian >> >> >> Bastian Angermann wrote: >>> Thank you very much and have a great weekend. >>> >>> Bastian >>> >>> -------- Original-Nachricht -------- >>> >>>> Datum: Fri, 01 May 2009 14:16:01 -0700 >>>> Von: Florian Hahne <fhahne at="" fhcrc.org=""> >>>> An: Bastian Angermann <angerb at="" gmx.de=""> >>>> Betreff: Re: [BioC] flowClust results in subset filters >>>> >>> >>> >>>> Ok, I will take a look asap, >>>> Florian >>>> >>>> Bastian Angermann wrote: >>>> >>>>> Hi Florian, >>>>> >>>>> I've come over a minor issue with the current return type of a >>>>> filter operation that subsets a tmix-filter within an other filter. >>>>> >>>>> While the current return type of multipleFilterResult allows to >>>>> access >>>>> the class assignment by the tmix-Filter, the results describing >>>>> the fitted distribution (i.e. means, proportions and covariance >>>>> matrices) are not accessible. The filter included in the >>>>> >>>> filterDetails in the appropriate gate is of type tmixFilter and not >>>> tmixFilterResult, which would of course have a redundant subSet. >>>>> Access to the parameters of the fitted distributions would be >>>>> quite usefull. >>>>> >>>>> Best, >>>>> Bastian >>>>> -------- Original-Nachricht -------- >>>>> >>>>>> Datum: Mon, 27 Apr 2009 17:41:43 -0700 >>>>>> Von: Florian Hahne <fhahne at="" fhcrc.org=""> >>>>>> An: Bastian Angermann <angerb at="" gmx.de=""> >>>>>> Betreff: Re: [BioC] flowClust results in subset filters >>>>>> >>>>> >>>>>> Hi Bastian, >>>>>> I just committed the changes to the devel branch of the package >>>>>> >>>> (version >>>>>> 1.11.1). >>>>>> It might take a day or two to build, but it would be great if you >>>>>> could >>>>>> take a look at this version first. I would like to hold off on >>>>>> bumping things back into release unless we are all happy with it. >>>>>> If you know how to build the devel package from source you should >>>>>> be able to get the 1.11.1 version as of now. >>>>>> Florian >>>>>> >>>>>> Bastian Angermann wrote: >>>>>> >>>>>>> Hi Florian, >>>>>>> >>>>>>> thanks for your reply. Let me know if I can do any beta testing >>>>>>> of the new code. >>>>>>> >>>>>>> Cheers, >>>>>>> Bastian. >>>>>>> -------- Original-Nachricht -------- >>>>>>> >>>>>>>> Datum: Sun, 26 Apr 2009 22:49:02 -0700 >>>>>>>> Von: Florian Hahne <fhahne at="" fhcrc.org=""> >>>>>>>> An: Bastian Angermann <angerb at="" gmx.de=""> >>>>>>>> CC: Bioconductor at stat.math.ethz.ch >>>>>>>> Betreff: Re: [BioC] flowClust results in subset filters >>>>>>>> >>>>>>> >>>>>>>> Hi Bastian, >>>>>>>> this is indeed a feature which wasn't implemented yet. I fixed >>>>>>>> the code and everything seems to be working as intended now, >>>>>>>> but I want >>>>>>>> >>>> to >>>>>>>> give it some more rigorous testing before submitting. I am >>>>>>>> planning >>>>>>>> >>>> to >>>>>>>> push that back into the release branch since it is more of a >>>>>>>> bug fix than feature addition. >>>>>>>> If you want to be more independent of the types of comparisons >>>>>>>> >>>> between >>>>>>>> gating steps, you might want to take a look at the workFlow >>>>>>>> stuff (as >>>>>>>> >>>> >>>>>>>> described in the package vignette). There you can compute >>>>>>>> summary statistics for a particular gating operation based on >>>>>>>> another reference view in the workFlow (via the additional >>>>>>>> 'reference' argument of the summary method) >>>>>>>> bw, >>>>>>>> Florian >>>>>>>> >>>>>>>> >>>>>>>> On 24.04.2009, at 10:30, Bastian Angermann wrote: >>>>>>>> >>>>>>>> >>>>>>>>> Hi, >>>>>>>>> >>>>>>>>> I am using R2.9.0 and the 2.4 version of Bioconductor. When I >>>>>>>>> try to >>>>>>>>> >>>> >>>>>>>>> run >>>>>>>>> a tmixfilter subsetted on a rectangular gate the result is of >>>>>>>>> class logicalFilterResult thus I am unable to access the >>>>>>>>> individual clusters: >>>>>>>>> ################################################# >>>>>>>>> library(flowCore) >>>>>>>>> library(flowClust) >>>>>>>>> data(rituximab) >>>>>>>>> >>>>>>>>> r_filter <- rectangleGate("FSC.H"=c(100,500),"SSC.H"=c(100,500)) >>>>>>>>> # gate boundaries are not meant to be meaningful. >>>>>>>>> t_filter <- tmixFilter("tmix", c("FSC.H", "SSC.H"), K=3) >>>>>>>>> result <- filter(rituximab,t_filter %subset% r_filter) >>>>>>>>> >>>>>>>>> class(result) >>>>>>>>> ################################################ >>>>>>>>> >>>>>>>>> Is that a bug, missing feature or am I missing something? >>>>>>>>> I'd like to be able to see the result of the >>>>>>>>> tmixFilter in the context of the ancestor populations, >>>>>>>>> thus the %subset%. I'am working around that by adding an index >>>>>>>>> >>>> vector >>>> >>>>>>>>> to the original flowFrame, to be able to do manual subsetting, >>>>>>>>> but >>>>>>>>> it would be nice to to that without this hack. >>>>>>>>> >>>>>>>>> Thanks a lot, >>>>>>>>> Bastian Angermann >>>>>>>>> -- >>>>>>>>> >>>>>>>>> _______________________________________________ >>>>>>>>> Bioconductor mailing list >>>>>>>>> Bioconductor at stat.math.ethz.ch >>>>>>>>> https://stat.ethz.ch/mailman/listinfo/bioconductor >>>>>>>>> Search the archives: >>>>>>>>> >>>>>>>> http://news.gmane.org/gmane.science.biology.informatics.conductor >>>>>>>> >>>>>>> >>>>>> -- >>>>>> Florian Hahne, PhD >>>>>> Computational Biology Program >>>>>> Division of Public Health Sciences >>>>>> Fred Hutchinson Cancer Research Center >>>>>> 1100 Fairview Ave. N, M1-B514 >>>>>> PO Box 19024 >>>>>> Seattle, Washington 98109-1024 >>>>>> 206-667-3148 >>>>>> fhahne at fhcrc.org >>>>>> >>>>> >>>> -- >>>> Florian Hahne, PhD >>>> Computational Biology Program >>>> Division of Public Health Sciences >>>> Fred Hutchinson Cancer Research Center >>>> 1100 Fairview Ave. N, M1-B514 >>>> PO Box 19024 >>>> Seattle, Washington 98109-1024 >>>> 206-667-3148 >>>> fhahne at fhcrc.org >>>> >>> >>> >> >> >> -- >> Florian Hahne, PhD >> Computational Biology Program >> Division of Public Health Sciences >> Fred Hutchinson Cancer Research Center >> 1100 Fairview Ave. N, M1-B514 >> PO Box 19024 >> Seattle, Washington 98109-1024 >> 206-667-3148 >> fhahne at fhcrc.org >> > -- Florian Hahne, PhD Computational Biology Program Division of Public Health Sciences Fred Hutchinson Cancer Research Center 1100 Fairview Ave. N, M1-B514 PO Box 19024 Seattle, Washington 98109-1024 206-667-3148 fhahne at fhcrc.org
ADD REPLY
0
Entering edit mode
Hi Florian, Yeap, I should have updated flowClust, too. I was not aware that the summarizeFilter method needed to be defined in flowClust because of the tmixFilter class. It works perfectly now. Thanks again for the fix. Kenneth On 5-May-09, at 4:36 PM, Florian Hahne wrote: > Hi Kenneth, > did you also update your flowClust? I had to add the summarizeFilter > method there. The version you need is 2.3.1. > When running the last command of the example code I get this > names(filterDetails(fr, "tmixFilter in defaultRectangleGate")) > [1] "filter" "populations" "expName" "varNames" > "K" [6] "w" "mu" "sigma" > "lambda" "nu" [11] "z" "u" > "label" "uncertainty" "ruleOutliers" > [16] "flagOutliers" "rm.min" "rm.max" "logLike" > "BIC" [21] "ICL" > > Those are all the additional slots from the tmixFilterResult class. > > Florian > > Kenneth Lo wrote: >> Hi Florian, >> >> Thanks a lot for the fix, which clearly makes the integration of >> flowClust with flowCore more sense as now it may tell the class >> assignment from tmixFilter when combining its use with other >> filtering/gating operations defined in flowCore. I've just checked >> out the most updated copy from the devel branch (version 1.11.2), >> and tried the example code in your email. The filter method in the >> 2nd last line of the example code does return a >> multipleFilterResult object now, which is what we desire. However, >> similar to Bastian's experience, I could only access the tmixFilter >> object but not the tmixFilterResult object in the filterDetails >> list. Some slots which describe the fitted distribution using >> flowClust, e.g., mu, sigma and lambda, are found in the >> tmixFilterResult class but not in tmixFilter. Are there any means >> to retrieve these pieces of information? >> >> Thanks again, >> >> Kenneth >> >> >> >> >> On 5-May-09, at 11:41 AM, Florian Hahne wrote: >> >>> Hi Bastian, Kenneth, >>> the problem in this case is that flowClust extends the >>> multipleFilterResult class, adding all the mixture parameters and >>> stuff. The subsetFilter operation is defined in flowCore, which >>> doesn't really know about all these additional slots. We do have a >>> mechanism in place to deal with such cases, i.e, the >>> summarizeFilter method which is called whenever a filter is >>> evaluated. This is basically just a hook that has access to both >>> the input filter and the filterResult, and it can be used to add >>> arbitrary items to the filterDetails slot. I added a >>> summarizeFilter method for tmixFilters which does exactly that. >>> The following will still give you a multipleFilterResult object as >>> the result of the subsetFilter operation but now with additional >>> flowClust parameters attached in the filterDetails. >>> >>> library(flowClust) >>> data(GvHD) >>> foo <- GvHD[[1]] >>> rg <- rectangleGate("FSC-H"=c(100,600), "SSC-H"=c(200, 700)) >>> tm <- tmixFilter(parameters=c("FSC-H", "SSC-H"), K=3) >>> fr <- filter(foo, tm %subset% rg) >>> names(filterDetails(fr, "tmixFilter in defaultRectangleGate")) >>> >>> Note that there are three items in the filterDetails list, one for >>> each of the components of the subsetFilter and one for the >>> subsetFilter itself, and that the latter contains copies of values >>> of the former two. This is intentional, albeit a bit unfortunate >>> in this case, since the additional flowClust parameters contain a >>> lot of information (large matrices, indexing vectors...), which is >>> unnecessarily copied here. >>> >>> bw, >>> Florian >>> >>> >>> Bastian Angermann wrote: >>>> Thank you very much and have a great weekend. >>>> >>>> Bastian >>>> >>>> -------- Original-Nachricht -------- >>>> >>>>> Datum: Fri, 01 May 2009 14:16:01 -0700 >>>>> Von: Florian Hahne <fhahne at="" fhcrc.org=""> >>>>> An: Bastian Angermann <angerb at="" gmx.de=""> >>>>> Betreff: Re: [BioC] flowClust results in subset filters >>>>> >>>> >>>> >>>>> Ok, I will take a look asap, >>>>> Florian >>>>> >>>>> Bastian Angermann wrote: >>>>> >>>>>> Hi Florian, >>>>>> >>>>>> I've come over a minor issue with the current return type of a >>>>>> filter operation that subsets a tmix-filter within an other >>>>>> filter. >>>>>> >>>>>> While the current return type of multipleFilterResult allows to >>>>>> access >>>>>> the class assignment by the tmix-Filter, the results describing >>>>>> the fitted distribution (i.e. means, proportions and covariance >>>>>> matrices) are not accessible. The filter included in the >>>>>> >>>>> filterDetails in the appropriate gate is of type tmixFilter and >>>>> not >>>>> tmixFilterResult, which would of course have a redundant subSet. >>>>>> Access to the parameters of the fitted distributions would be >>>>>> quite usefull. >>>>>> >>>>>> Best, >>>>>> Bastian >>>>>> -------- Original-Nachricht -------- >>>>>> >>>>>>> Datum: Mon, 27 Apr 2009 17:41:43 -0700 >>>>>>> Von: Florian Hahne <fhahne at="" fhcrc.org=""> >>>>>>> An: Bastian Angermann <angerb at="" gmx.de=""> >>>>>>> Betreff: Re: [BioC] flowClust results in subset filters >>>>>>> >>>>>> >>>>>>> Hi Bastian, >>>>>>> I just committed the changes to the devel branch of the package >>>>>>> >>>>> (version >>>>>>> 1.11.1). >>>>>>> It might take a day or two to build, but it would be great if >>>>>>> you could >>>>>>> take a look at this version first. I would like to hold off on >>>>>>> bumping things back into release unless we are all happy with >>>>>>> it. >>>>>>> If you know how to build the devel package from source you >>>>>>> should be able to get the 1.11.1 version as of now. >>>>>>> Florian >>>>>>> >>>>>>> Bastian Angermann wrote: >>>>>>> >>>>>>>> Hi Florian, >>>>>>>> >>>>>>>> thanks for your reply. Let me know if I can do any beta >>>>>>>> testing of the new code. >>>>>>>> >>>>>>>> Cheers, >>>>>>>> Bastian. >>>>>>>> -------- Original-Nachricht -------- >>>>>>>> >>>>>>>>> Datum: Sun, 26 Apr 2009 22:49:02 -0700 >>>>>>>>> Von: Florian Hahne <fhahne at="" fhcrc.org=""> >>>>>>>>> An: Bastian Angermann <angerb at="" gmx.de=""> >>>>>>>>> CC: Bioconductor at stat.math.ethz.ch >>>>>>>>> Betreff: Re: [BioC] flowClust results in subset filters >>>>>>>>> >>>>>>>> >>>>>>>>> Hi Bastian, >>>>>>>>> this is indeed a feature which wasn't implemented yet. I >>>>>>>>> fixed the code and everything seems to be working as >>>>>>>>> intended now, but I want >>>>>>>>> >>>>> to >>>>>>>>> give it some more rigorous testing before submitting. I am >>>>>>>>> planning >>>>>>>>> >>>>> to >>>>>>>>> push that back into the release branch since it is more of a >>>>>>>>> bug fix than feature addition. >>>>>>>>> If you want to be more independent of the types of comparisons >>>>>>>>> >>>>> between >>>>>>>>> gating steps, you might want to take a look at the workFlow >>>>>>>>> stuff (as >>>>>>>>> >>>>> >>>>>>>>> described in the package vignette). There you can compute >>>>>>>>> summary statistics for a particular gating operation based >>>>>>>>> on another reference view in the workFlow (via the >>>>>>>>> additional 'reference' argument of the summary method) >>>>>>>>> bw, >>>>>>>>> Florian >>>>>>>>> >>>>>>>>> >>>>>>>>> On 24.04.2009, at 10:30, Bastian Angermann wrote: >>>>>>>>> >>>>>>>>> >>>>>>>>>> Hi, >>>>>>>>>> >>>>>>>>>> I am using R2.9.0 and the 2.4 version of Bioconductor. When >>>>>>>>>> I try to >>>>>>>>>> >>>>> >>>>>>>>>> run >>>>>>>>>> a tmixfilter subsetted on a rectangular gate the result is >>>>>>>>>> of class logicalFilterResult thus I am unable to access the >>>>>>>>>> individual clusters: >>>>>>>>>> ################################################# >>>>>>>>>> library(flowCore) >>>>>>>>>> library(flowClust) >>>>>>>>>> data(rituximab) >>>>>>>>>> >>>>>>>>>> r_filter <- >>>>>>>>>> rectangleGate("FSC.H"=c(100,500),"SSC.H"=c(100,500)) >>>>>>>>>> # gate boundaries are not meant to be meaningful. >>>>>>>>>> t_filter <- tmixFilter("tmix", c("FSC.H", "SSC.H"), K=3) >>>>>>>>>> result <- filter(rituximab,t_filter %subset% r_filter) >>>>>>>>>> >>>>>>>>>> class(result) >>>>>>>>>> ################################################ >>>>>>>>>> >>>>>>>>>> Is that a bug, missing feature or am I missing something? >>>>>>>>>> I'd like to be able to see the result of the >>>>>>>>>> tmixFilter in the context of the ancestor populations, >>>>>>>>>> thus the %subset%. I'am working around that by adding an >>>>>>>>>> index >>>>>>>>>> >>>>> vector >>>>> >>>>>>>>>> to the original flowFrame, to be able to do manual >>>>>>>>>> subsetting, but >>>>>>>>>> it would be nice to to that without this hack. >>>>>>>>>> >>>>>>>>>> Thanks a lot, >>>>>>>>>> Bastian Angermann >>>>>>>>>> -- >>>>>>>>>> >>>>>>>>>> _______________________________________________ >>>>>>>>>> Bioconductor mailing list >>>>>>>>>> Bioconductor at stat.math.ethz.ch >>>>>>>>>> https://stat.ethz.ch/mailman/listinfo/bioconductor >>>>>>>>>> Search the archives: >>>>>>>>>> >>>>>>>>> http://news.gmane.org/gmane.science.biology.informatics.conductor >>>>>>>>> >>>>>>>> >>>>>>> -- >>>>>>> Florian Hahne, PhD >>>>>>> Computational Biology Program >>>>>>> Division of Public Health Sciences >>>>>>> Fred Hutchinson Cancer Research Center >>>>>>> 1100 Fairview Ave. N, M1-B514 >>>>>>> PO Box 19024 >>>>>>> Seattle, Washington 98109-1024 >>>>>>> 206-667-3148 >>>>>>> fhahne at fhcrc.org >>>>>>> >>>>>> >>>>> -- >>>>> Florian Hahne, PhD >>>>> Computational Biology Program >>>>> Division of Public Health Sciences >>>>> Fred Hutchinson Cancer Research Center >>>>> 1100 Fairview Ave. N, M1-B514 >>>>> PO Box 19024 >>>>> Seattle, Washington 98109-1024 >>>>> 206-667-3148 >>>>> fhahne at fhcrc.org >>>>> >>>> >>>> >>> >>> >>> -- >>> Florian Hahne, PhD >>> Computational Biology Program >>> Division of Public Health Sciences >>> Fred Hutchinson Cancer Research Center >>> 1100 Fairview Ave. N, M1-B514 >>> PO Box 19024 >>> Seattle, Washington 98109-1024 >>> 206-667-3148 >>> fhahne at fhcrc.org >>> >> > > > -- > Florian Hahne, PhD > Computational Biology Program > Division of Public Health Sciences > Fred Hutchinson Cancer Research Center > 1100 Fairview Ave. N, M1-B514 > PO Box 19024 > Seattle, Washington 98109-1024 > 206-667-3148 > fhahne at fhcrc.org >
ADD REPLY

Login before adding your answer.

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