flowCore::parameters
1
0
Entering edit mode
@bastian-angermann-3193
Last seen 10.3 years ago
Hi list, I am having trouble with the parameters method in flowCore. When applying parameters to an element of multipleFilterResult generated by a tmixFilter, R will throw the following error: Error in x$parameters : $ operator is invalid for atomic vectors This came up while trying to apply an other filter to the result of a tmixFilter. Best, Bastian Angermann Here's how to reproduce the error (R 2.9.0 flowCore SVN 39752 /flowClust SVN 39598): data(GvHD) fcsData <- GvHD[[1]] tmixGate <- tmixFilter(parameters=c("FSC-H","SSC-H"), K=1) recGate <- rectangleGate(.gate=list("FSC-H"=c(0,1000),"SSC-H"=c(0,1000))) rf <- filter(fcsData,recGate) tf <-filter(fcsData,tmixGate %subset% rf ) > tf A filterResult produced by the filter named 'tmixFilter in defaultRectangleGate' resulting in multiple populations: 1 > class(tf) [1] "multipleFilterResult" attr(,"package") [1] "flowCore" > parameters(tf) [1] "FSC-H" "SSC-H" > parameters(tf[[1]]) Error in x$parameters : $ operator is invalid for atomic vectors -- GRATIS f?r alle GMX-Mitglieder: Die maxdome Movie-FLAT!
flowCore flowCore • 1.8k views
ADD COMMENT
0
Entering edit mode
Florian Hahne ▴ 540
@florian-hahne-2471
Last seen 10.3 years ago
Hi Bastian, I just fixed this issue in the devel branch. Note that you will need to update both flowCore and flowClust. There have been substantial changes to the way things were handled compared to the previous release, so it would be tedious to port this fix back into the release branch. In the meantime, evaluating this before calling the parameters method should fix the issue in a sort of hackish way: setMethod("parameters", signature=signature(object="filterResult"), definition=function(object) unique(unlist(sapply(filterDetails(object), function(x) if(is.list(x)) x$parameters)))) Thanks for reporting the issue, Florian Bastian Angermann wrote: > Hi list, > > I am having trouble with the parameters method in flowCore. When applying parameters to an element of multipleFilterResult generated by a tmixFilter, R will throw the following error: > Error in x$parameters : $ operator is invalid for atomic vectors > > This came up while trying to apply an other filter to the result of a tmixFilter. > > Best, > Bastian Angermann > > Here's how to reproduce the error (R 2.9.0 flowCore SVN 39752 /flowClust SVN 39598): > > data(GvHD) > fcsData <- GvHD[[1]] > > tmixGate <- tmixFilter(parameters=c("FSC-H","SSC-H"), K=1) > > recGate <- rectangleGate(.gate=list("FSC-H"=c(0,1000),"SSC-H"=c(0,1000))) > rf <- filter(fcsData,recGate) > tf <-filter(fcsData,tmixGate %subset% rf ) > > >> tf >> > A filterResult produced by the filter named 'tmixFilter in defaultRectangleGate' > resulting in multiple populations: > 1 > >> class(tf) >> > [1] "multipleFilterResult" > attr(,"package") > [1] "flowCore" > >> parameters(tf) >> > [1] "FSC-H" "SSC-H" > >> parameters(tf[[1]]) >> > Error in x$parameters : $ operator is invalid for atomic vectors > > > > > -- 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 Florian, thanks for the quick reply. I've updated flowCore/Clust to SVN revision 40494/40493. There is a minor issue with the read.FCS function: > read.FCS("../data/Yoav/HDM013 V2 1005 NS no.fcs") Error in sprintf("0,%d", pData(params)[p, "minRange"]) : use format %f, %e, %g or %a for numeric objects I've fixed this by replacing the %d by %g. Best Bastian -------- Original-Nachricht -------- > Datum: Thu, 02 Jul 2009 15:55:29 -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] flowCore::parameters > Hi Bastian, > I just fixed this issue in the devel branch. Note that you will need to > update both flowCore and flowClust. There have been substantial changes > to the way things were handled compared to the previous release, so it > would be tedious to port this fix back into the release branch. > > In the meantime, evaluating this before calling the parameters method > should fix the issue in a sort of hackish way: > > setMethod("parameters", > signature=signature(object="filterResult"), > definition=function(object) > unique(unlist(sapply(filterDetails(object), > function(x) if(is.list(x)) x$parameters)))) > > Thanks for reporting the issue, > Florian > > > Bastian Angermann wrote: > > Hi list, > > > > I am having trouble with the parameters method in flowCore. When > applying parameters to an element of multipleFilterResult generated by a > tmixFilter, R will throw the following error: > > Error in x$parameters : $ operator is invalid for atomic vectors > > > > This came up while trying to apply an other filter to the result of a > tmixFilter. > > > > Best, > > Bastian Angermann > > > > Here's how to reproduce the error (R 2.9.0 flowCore SVN 39752 /flowClust > SVN 39598): > > > > data(GvHD) > > fcsData <- GvHD[[1]] > > > > tmixGate <- tmixFilter(parameters=c("FSC-H","SSC-H"), K=1) > > > > recGate <- > rectangleGate(.gate=list("FSC-H"=c(0,1000),"SSC-H"=c(0,1000))) > > rf <- filter(fcsData,recGate) > > tf <-filter(fcsData,tmixGate %subset% rf ) > > > > > >> tf > >> > > A filterResult produced by the filter named 'tmixFilter in > defaultRectangleGate' > > resulting in multiple populations: > > 1 > > > >> class(tf) > >> > > [1] "multipleFilterResult" > > attr(,"package") > > [1] "flowCore" > > > >> parameters(tf) > >> > > [1] "FSC-H" "SSC-H" > > > >> parameters(tf[[1]]) > >> > > Error in x$parameters : $ operator is invalid for atomic vectors > > > > > > > > > > > > > -- > 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 -- f?r nur 19,99 Euro/mtl.!* http://portal.gmx.net/de/go/dsl02
ADD REPLY
0
Entering edit mode
Could you point me to the file where this needs to be fixed. I couldn't grep it in the code. On 03.07.2009, at 09:18, Bastian Angermann wrote: > sprintf("0,%d", pData(params)[p, "minRange"])
ADD REPLY
0
Entering edit mode
Sorry, that's in the read.FCS function in IO.R line 144. -------- Original-Nachricht -------- > Datum: Mon, 6 Jul 2009 12:54:12 -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] flowCore::parameters > Could you point me to the file where this needs to be fixed. I > couldn't grep it in the code. > > > > On 03.07.2009, at 09:18, Bastian Angermann wrote: > > > sprintf("0,%d", pData(params)[p, "minRange"]) -- f?r nur 19,99 Euro/mtl.!* http://portal.gmx.net/de/go/dsl02
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