get parameters of estimateLogicle
1
1
Entering edit mode
Guest User ★ 13k
@guest-user-4897
Last seen 10.3 years ago
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.
• 1.9k views
ADD COMMENT
1
Entering edit mode
Jiang, Mike ★ 1.3k
@jiang-mike-4886
Last seen 3.2 years ago
(Private Address)
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 COMMENT
0
Entering edit mode
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 REPLY

Login before adding your answer.

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