FlowCore: transform() NAs introduced by coercion
3
0
Entering edit mode
@allenby-mark-6637
Last seen 7.3 years ago
All, I have been trying to transform my data by logicle and inverse logicle transformations. However, even when I copy the logicle transformation parameters the software estimates, the transform function still does not work, and brings up the warning NAs introduced by coercion. I am wondering if I am defining my inputs in improper form? Could anyone help me out? An example is below: ------------------ samp <- read.FCSfile.name, transformation=FALSE) lgcl <- estimateLogicle(samp, logchannels) x <- transform(x,lgcl) Wset <- as.list(environment(lgcl at transforms "488-530/30-A"@f))$w Tset <- as.list(environment(lgcl at transforms "488-530/30-A"@f))$t Mset <- as.list(environment(lgcl at transforms "488-530/30-A"@f))$m Aset <- as.list(environment(lgcl at transforms "488-530/30-A"@f))$a logicle <- logicleTransform(t = Tset, w = Wset, m = Mset, a = Aset, 'logicle') invLgcl <- inverseLogicleTransform(trans = logicle) samp <- transform(samp, "488-530/30-A" = invLgcl("488-530/30-A")) ---------------------- The final line produces the warning: 1: In invLgcl("488-530/30-A") : NAs introduced by coercion Would anyone have an idea about what I might be doing incorrectly? I am new to R and flowCore, so it could be a basic problem I am overlooking. Thank you all so much for your help. Sincerely, Mark PhD at ICL -----Original Message----- From: Allenby, Mark Sent: 10 July 2014 16:11 To: bioconductor at r-project.org Subject: FlowCore: Extracting parameters from estimateLogicle All, Is there a way to extract the A, T, M, W logicle parameters from the estimateLogicle function? i.e. lgcl <- estimateLogicle(samp, logchannels) and extract parameters estimated from lgcl. Mark
flowCore flowCore • 1.4k views
0
Entering edit mode
Greg Finak ▴ 240
@greg-finak-4299
Last seen 4.9 years ago
United States
You're trying to inverse transform your raw data rather than your transformed data, which is x, not samp. On Thu, Jul 10, 2014 at 11:14 AM, Allenby, Mark <mark.allenby@imperial.ac.uk> wrote: > All, > > I have been trying to transform my data by logicle and inverse logicle > transformations. However, even when I copy the logicle transformation > parameters the software estimates, the transform function still does not > work, and brings up the warning NAs introduced by coercion. I am wondering > if I am defining my inputs in improper form? Could anyone help me out? An > example is below: > > ------------------ > > samp <- read.FCSfile.name, transformation=FALSE) > lgcl <- estimateLogicle(samp, logchannels) > x <- transform(x,lgcl) > > Wset <- as.list(environment(lgcl@transforms "488-530/30-A"@f))$w > Tset <- as.list(environment(lgcl@transforms "488-530/30-A"@f))$t > Mset <- as.list(environment(lgcl@transforms "488-530/30-A"@f))$m > Aset <- as.list(environment(lgcl@transforms "488-530/30-A"@f))$a > > logicle <- logicleTransform(t = Tset, w = Wset, m = Mset, a = Aset, > 'logicle') > invLgcl <- inverseLogicleTransform(trans = logicle) > samp <- transform(samp, "488-530/30-A" = invLgcl("488-530/30-A")) > > ---------------------- > > The final line produces the warning: > > 1: In invLgcl("488-530/30-A") : NAs introduced by coercion > > Would anyone have an idea about what I might be doing incorrectly? I am > new to R and flowCore, so it could be a basic problem I am overlooking. > Thank you all so much for your help. > > Sincerely, > > Mark > PhD at ICL > > -----Original Message----- > From: Allenby, Mark > Sent: 10 July 2014 16:11 > To: bioconductor@r-project.org > Subject: FlowCore: Extracting parameters from estimateLogicle > > All, > > Is there a way to extract the A, T, M, W logicle parameters from the > estimateLogicle function? > > i.e. lgcl <- estimateLogicle(samp, logchannels) and extract parameters > estimated from lgcl. > > Mark > > _______________________________________________ > Bioconductor mailing list > Bioconductor@r-project.org > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: > http://news.gmane.org/gmane.science.biology.informatics.conductor > -- Greg Finak, PhD Staff Scientist Vaccine and Infectious Disease Division Fred Hutchinson Cancer Research Center Seattle, WA 98109 (206)667-3116 gfinak@fhcrc.org [[alternative HTML version deleted]]
0
Entering edit mode
@allenby-mark-6637
Last seen 7.3 years ago
--------Sorry for double-posting, I didn't space my code properly------------ All, I have been trying to transform my data by logicle and inverse logicle transformations. However, even when I copy the logicle transformation parameters the software estimates, the transform function still does not work, and brings up the warning NAs introduced by coercion. I am wondering if I am defining my inputs in improper form? Could anyone help me out? An example is below: ------------------ samp <- read.FCSfile.name, transformation=FALSE) lgcl <- estimateLogicle(samp, logchannels) x <- transform(x,lgcl) Wset <- as.list(environment(lgcl@transforms "488-530/30-A"@f))$w Tset <- as.list(environment(lgcl@transforms "488-530/30-A"@f))$t Mset <- as.list(environment(lgcl@transforms "488-530/30-A"@f))$m Aset <- as.list(environment(lgcl@transforms "488-530/30-A"@f))$a logicle <- logicleTransform(t = Tset, w = Wset, m = Mset, a = Aset, 'logicle') invLgcl <- inverseLogicleTransform(trans = logicle) samp <- transform(samp, "488-530/30-A" = invLgcl("488-530/30-A")) ---------------------- The final line produces the warning: 1: In invLgcl("488-530/30-A") : NAs introduced by coercion Would anyone have an idea about what I might be doing incorrectly? I am new to R and flowCore, so it could be a basic problem I am overlooking. Thank you all so much for your help. Sincerely, Mark PhD at ICL [[alternative HTML version deleted]]
0
Entering edit mode
Jiang, Mike ★ 1.3k
@jiang-mike-4886
Last seen 8 weeks ago
It can be fixed by using back tics instead of quote marks. i.e. samp <- transform(x, 488-530/30-A = invLgcl(488-530/30-A)) On 07/11/2014 03:00 AM, bioconductor-request@r-project.org wrote: > Subject: > [BioC] FlowCore: transform() NAs introduced by coercion > From: > "Allenby, Mark" <mark.allenby@imperial.ac.uk> > Date: > 07/10/2014 11:14 AM > > To: > "bioconductor@r-project.org" <bioconductor@r-project.org> > > > All, > > I have been trying to transform my data by logicle and inverse logicle transformations. However, even when I copy the logicle transformation parameters the software estimates, the transform function still does not work, and brings up the warning NAs introduced by coercion. I am wondering if I am defining my inputs in improper form? Could anyone help me out? An example is below: > > ------------------ > > samp <- read.FCSfile.name, transformation=FALSE) > lgcl <- estimateLogicle(samp, logchannels) > x <- transform(x,lgcl) > > Wset <- as.list(environment(lgcl@transforms "488-530/30-A"@f))$w > Tset <- as.list(environment(lgcl@transforms "488-530/30-A"@f))$t > Mset <- as.list(environment(lgcl@transforms "488-530/30-A"@f))$m > Aset <- as.list(environment(lgcl@transforms "488-530/30-A"@f))$a > > logicle <- logicleTransform(t = Tset, w = Wset, m = Mset, a = Aset, 'logicle') > invLgcl <- inverseLogicleTransform(trans = logicle) > samp <- transform(samp, "488-530/30-A" = invLgcl("488-530/30-A")) > > ---------------------- > > The final line produces the warning: > > 1: In invLgcl("488-530/30-A") : NAs introduced by coercion > > Would anyone have an idea about what I might be doing incorrectly? I am new to R and flowCore, so it could be a basic problem I am overlooking. Thank you all so much for your help. > > Sincerely, > > Mark > PhD at ICL > > -----Original Message----- > From: Allenby, Mark > Sent: 10 July 2014 16:11 > To:bioconductor@r-project.org > Subject: FlowCore: Extracting parameters from estimateLogicle > > All, > > Is there a way to extract the A, T, M, W logicle parameters from the estimateLogicle function? > > i.e. lgcl <- estimateLogicle(samp, logchannels) and extract parameters estimated from lgcl. > > Mark > > > > ForwardedMessage.eml > > Subject: > [BioC] FlowCore: transform() NAs introduced by coercion > From: > "Allenby, Mark" <mark.allenby@imperial.ac.uk> > Date: > 07/10/2014 11:17 AM > > To: > "bioconductor@r-project.org" <bioconductor@r-project.org> > > > --------Sorry for double-posting, I didn't space my code properly------------ > > > > All, > > > > I have been trying to transform my data by logicle and inverse logicle transformations. However, even when I copy the logicle transformation parameters the software estimates, the transform function still does not work, and brings up the warning NAs introduced by coercion. I am wondering if I am defining my inputs in improper form? Could anyone help me out? An example is below: > > > > ------------------ > > > > samp <- read.FCSfile.name, transformation=FALSE) > > lgcl <- estimateLogicle(samp, logchannels) > > x <- transform(x,lgcl) > > > > Wset <- as.list(environment(lgcl@transforms "488-530/30-A"@f))$w > > Tset <- as.list(environment(lgcl@transforms "488-530/30-A"@f))$t > > Mset <- as.list(environment(lgcl@transforms "488-530/30-A"@f))$m > > Aset <- as.list(environment(lgcl@transforms "488-530/30-A"@f))$a > > > > logicle <- logicleTransform(t = Tset, w = Wset, m = Mset, a = Aset, 'logicle') > > invLgcl <- inverseLogicleTransform(trans = logicle) > > samp <- transform(samp, "488-530/30-A" = invLgcl("488-530/30-A")) > > > > ---------------------- > > > > The final line produces the warning: > > > > 1: In invLgcl("488-530/30-A") : NAs introduced by coercion > > > > Would anyone have an idea about what I might be doing incorrectly? I am new to R and flowCore, so it could be a basic problem I am overlooking. Thank you all so much for your help. > > > > Sincerely, > > > > Mark > > PhD at ICL [[alternative HTML version deleted]]
0
Entering edit mode
Mike and All, If you come back to this email, I have one more question for you. x <- transform(x, 405-525/50-A = invLgcl(405-525/50-A)) I am trying to set a loop to transform all my parameter or channel names (such as 405-525/50-A) which I have indexed by string. What I am currently trying and failing with is: for(i in 1:length(logchannels)){ x <- transform(x, as.name(logchannels[i]) = invLgclas.name(logchannels[i]))) } Error: unexpected '=' in: " invLgcl <- inverseLogicleTransform(trans = logicle) x <- transform(x, as.name(logchannels[i]) =" Any idea how to reference those parameter channels correctly? (logchannels is a vector of strings) Thanks for any help in advance, I'm going to post this to the group board as well. Mark From: Mike [mailto:wjiang2@fhcrc.org] Sent: 11 July 2014 18:43 To: bioconductor@r-project.org Cc: Allenby, Mark Subject: Re: FlowCore: transform() NAs introduced by coercion It can be fixed by using back tics instead of quote marks. i.e. samp <- transform(x, 488-530/30-A = invLgcl(488-530/30-A)) On 07/11/2014 03:00 AM, bioconductor-request@r-project.org<mailto :bioconductor-request@r-project.org=""> wrote: Subject: [BioC] FlowCore: transform() NAs introduced by coercion From: "Allenby, Mark" <mark.allenby@imperial.ac.uk><mailto:mark.allenby@imperial.ac.uk> Date: 07/10/2014 11:14 AM To: "bioconductor@r-project.org"<mailto:bioconductor@r-project.org> <bioconductor@r-project.org><mailto:bioconductor@r-project.org> All, I have been trying to transform my data by logicle and inverse logicle transformations. However, even when I copy the logicle transformation parameters the software estimates, the transform function still does not work, and brings up the warning NAs introduced by coercion. I am wondering if I am defining my inputs in improper form? Could anyone help me out? An example is below: ------------------ samp <- read.FCSfile.name, transformation=FALSE) lgcl <- estimateLogicle(samp, logchannels) x <- transform(x,lgcl) Wset <- as.list(environment(lgcl@transforms "488-530/30-A"@f))$w Tset <- as.list(environment(lgcl@transforms "488-530/30-A"@f))$t Mset <- as.list(environment(lgcl@transforms "488-530/30-A"@f))$m Aset <- as.list(environment(lgcl@transforms "488-530/30-A"@f))$a logicle <- logicleTransform(t = Tset, w = Wset, m = Mset, a = Aset, 'logicle') invLgcl <- inverseLogicleTransform(trans = logicle) samp <- transform(samp, "488-530/30-A" = invLgcl("488-530/30-A")) ---------------------- The final line produces the warning: 1: In invLgcl("488-530/30-A") : NAs introduced by coercion Would anyone have an idea about what I might be doing incorrectly? I am new to R and flowCore, so it could be a basic problem I am overlooking. Thank you all so much for your help. Sincerely, Mark PhD at ICL -----Original Message----- From: Allenby, Mark Sent: 10 July 2014 16:11 To: bioconductor@r-project.org<mailto:bioconductor@r-project.org> Subject: FlowCore: Extracting parameters from estimateLogicle All, Is there a way to extract the A, T, M, W logicle parameters from the estimateLogicle function? i.e. lgcl <- estimateLogicle(samp, logchannels) and extract parameters estimated from lgcl. Mark ForwardedMessage.eml Subject: [BioC] FlowCore: transform() NAs introduced by coercion From: "Allenby, Mark" <mark.allenby@imperial.ac.uk><mailto:mark.allenby@imperial.ac.uk> Date: 07/10/2014 11:17 AM To: "bioconductor@r-project.org"<mailto:bioconductor@r-project.org> <bioconductor@r-project.org><mailto:bioconductor@r-project.org> --------Sorry for double-posting, I didn't space my code properly------------ All, I have been trying to transform my data by logicle and inverse logicle transformations. However, even when I copy the logicle transformation parameters the software estimates, the transform function still does not work, and brings up the warning NAs introduced by coercion. I am wondering if I am defining my inputs in improper form? Could anyone help me out? An example is below: ------------------ samp <- read.FCSfile.name, transformation=FALSE) lgcl <- estimateLogicle(samp, logchannels) x <- transform(x,lgcl) Wset <- as.list(environment(lgcl@transforms "488-530/30-A"@f))$w Tset <- as.list(environment(lgcl@transforms "488-530/30-A"@f))$t Mset <- as.list(environment(lgcl@transforms "488-530/30-A"@f))$m Aset <- as.list(environment(lgcl@transforms "488-530/30-A"@f))$a logicle <- logicleTransform(t = Tset, w = Wset, m = Mset, a = Aset, 'logicle') invLgcl <- inverseLogicleTransform(trans = logicle) samp <- transform(samp, "488-530/30-A" = invLgcl("488-530/30-A")) ---------------------- The final line produces the warning: 1: In invLgcl("488-530/30-A") : NAs introduced by coercion Would anyone have an idea about what I might be doing incorrectly? I am new to R and flowCore, so it could be a basic problem I am overlooking. Thank you all so much for your help. Sincerely, Mark PhD at ICL [[alternative HTML version deleted]]
0
Entering edit mode
You should construct a 'transformList' for transforming multiple channels at a time. transList <- transformList(logchannels, invLgcl) x_trans <- transform(x, transList) On 07/11/2014 11:52 AM, Allenby, Mark wrote: > > Mike and All, > > If you come back to this email, I have one more question for you. > > x <- transform(x, 405-525/50-A = invLgcl(405-525/50-A)) > > I am trying to set a loop to transform all my parameter or channel > names (such as 405-525/50-A) which I have indexed by string. What I > am currently trying and failing with is: > > for(i in 1:length(logchannels)){ > > x <- transform(x, as.name(logchannels[i]) = > invLgclas.name(logchannels[i]))) > > } > > Error: unexpected '=' in: > > " invLgcl <- inverseLogicleTransform(trans = logicle) > > x <- transform(x, as.name(logchannels[i]) =" > > Any idea how to reference those parameter channels correctly? > (logchannels is a vector of strings) > > Thanks for any help in advance, I'm going to post this to the group > board as well. > > Mark > > [[alternative HTML version deleted]]