Search
Question: get parameters of estimateLogicle
0
gravatar for Guest User
4.6 years ago by
Guest User12k
Guest User12k wrote:
Hi, I would to get the parameters a, w, m, t that the estimateLogicle computes. The question may be extended to how to get parameters from a transformList or a transformMap. What I would like, is a function that returns the same information as summary applied to a user defined transform. Cheers. > data(GvHD) > samp <- GvHD[[1]] > lgcl <- estimateLogicle(samp, channels = c("FL3-H", "FL4-H")) > str(lgcl) Formal class 'transformList' [package "flowCore"] with 2 slots ..@ transforms :List of 2 .. ..$ FL3-H:Formal class 'transformMap' [package "flowCore"] with 3 slots .. .. .. ..@ output: chr "FL3-H" .. .. .. ..@ input : chr "FL3-H" .. .. .. ..@ f :function (x) .. ..$ FL4-H:Formal class 'transformMap' [package "flowCore"] with 3 slots .. .. .. ..@ output: chr "FL4-H" .. .. .. ..@ input : chr "FL4-H" .. .. .. ..@ f :function (x) ..@ transformationId: chr "defaultTransformation" > > lgcl <- logicleTransform(w = 0.74, t=2^18, m =4.5) > str(lgcl) Formal class 'transform' [package "flowCore"] with 2 slots ..@ transformationId: chr "defaultLogicleTransform" ..@ .Data :function (x) > summary(lgcl) $a [1] 0 $k transform object 'defaultLogicleTransform' $m [1] 4.5 $t [1] 262144 $transformationId [1] "defaultLogicleTransform" $w [1] 0.74 -- output of sessionInfo(): - -- Sent via the guest posting facility at bioconductor.org.
ADD COMMENTlink modified 4.6 years ago by Jiang, Mike1.2k • written 4.6 years ago by Guest User12k
0
gravatar for Jiang, Mike
4.6 years ago by
Jiang, Mike1.2k
(Private Address)
Jiang, Mike1.2k wrote:
There isn't such function available for |transformList|. but you can write something like this: | setMethod("summary", signature=signature(object="transformList"), definition=function(object,...) { sapply(object@transforms,function(transMap) summary(new("transform", .Data = transMap@f)) ,simplify =FALSE) }) | and then |summary(lgcl)| Mike On 02/26/2014 03:00 AM, bioconductor-request@r-project.org wrote: > Hi, > > I would to get the parameters a, w, m, t that the estimateLogicle computes. The question may be extended to how to get parameters from a transformList or a transformMap. What I would like, is a function that returns the same information as summary applied to a user defined transform. > > Cheers. > >> >data(GvHD) >> >samp <- GvHD[[1]] >> >lgcl <- estimateLogicle(samp, channels = c("FL3-H", "FL4-H")) >> >lgcl <- logicleTransform(w = 0.74, t=2^18, m =4.5) >> >summary(lgcl) > $a > [1] 0 > > $k > transform object 'defaultLogicleTransform' > > $m > [1] 4.5 > > $t > [1] 262144 > > $transformationId > [1] "defaultLogicleTransform" > > $w > [1] 0.74 [[alternative HTML version deleted]]
ADD COMMENTlink written 4.6 years ago by Jiang, Mike1.2k
Perfect as usual. Thanks, Samuel > object = lgcl > sapply(object at transforms, function(transMap) summary(new("transform", > .Data = transMap at f)) ,simplify = FALSE) $`FL3-H` $`FL3-H`$a [1] 0 $`FL3-H`$k transform object 'FL3-H_logicleTransform' $`FL3-H`$m [1] 4.5 $`FL3-H`$t [1] 10000 $`FL3-H`$transformationId [1] "FL3-H_logicleTransform" $`FL3-H`$w [1] 0 $`FL4-H` $`FL4-H`$a [1] 0 $`FL4-H`$k transform object 'FL4-H_logicleTransform' $`FL4-H`$m [1] 4.5 $`FL4-H`$t [1] 10000 $`FL4-H`$transformationId [1] "FL4-H_logicleTransform" $`FL4-H`$w [1] 0 On 26-02-2014 20:07, Mike wrote: > There isn't such function available for transformList. but you can > write something like this: > > setMethod("summary", > signature=signature(object="transformList"), > definition=function(object, ...) > { > sapply(object at transforms, function(transMap) > summary(new("transform", .Data = transMap at f)) > ,simplify = FALSE) > }) > > and then summary(lgcl) > > Mike > > On 02/26/2014 03:00 AM, bioconductor-request at r-project.org wrote: > >> Hi, >> >> I would to get the parameters a, w, m, t that the estimateLogicle >> computes. The question may be extended to how to get parameters from >> a transformList or a transformMap. What I would like, is a function >> that returns the same information as summary applied to a user >> defined transform. >> >> Cheers. >> >>>> data(GvHD) >>>> samp <- GvHD[[1]] >>>> lgcl <- estimateLogicle(samp, channels = c("FL3-H", "FL4-H")) >>>> lgcl <- logicleTransform(w = 0.74, t=2^18, m =4.5) >>>> summary(lgcl) >> >> $a >> [1] 0 >> >> $k >> transform object 'defaultLogicleTransform' >> >> $m >> [1] 4.5 >> >> $t >> [1] 262144 >> >> $transformationId >> [1] "defaultLogicleTransform" >> >> $w >> [1] 0.74
ADD REPLYlink written 4.6 years ago by SamGG160
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.2.0
Traffic: 134 users visited in the last hour