[BioC] estimateLogicle from flowCore produces \"Error in eval(expr, envir, enclos) : object \'tr\' not found\" error

Martin Morgan mtmorgan at fhcrc.org
Sun Jun 3 19:59:59 CEST 2012


On 06/03/2012 05:30 AM, Juliet [guest] wrote:
>
> I am trying to analyse some flow cytometry data using flowCore.
>
> The problem I have is that I am using the estimateLogicle function and this is giving me an error with one of my files when I run it from within a function:
>
> gating<- function(file, name, results.dir){
>     fcs<- read.FCS(file)
>     tr<- estimateLogicle(fcs, col)
>     fcs<- transform(fcs, tr)
> }
>
> For one of my files, I get the following error message:
>
> "Error in eval(expr, envir, enclos) : object 'tr' not found"
>
> I think that this comes from the transform function when you are trying to the apply the results from estimateLogicle...
>
> The weird thing is that when I actually run these arguments by hand then it works without giving me an error... but when I run it from within the function it gives me an error.
>
> Do you know what the problem is?

You are using an old version of R, so update to 2.15.0 and install 
current packages using

   source("http://bioconductor.org/biocLite.R")
   biocLite("flowCore")

In your function 'col' is not defined, perhaps you meant to pass it as 
an argument?

Try and provide a fully reproducible example. For instance even in 
2.13.1 I can say

   library(flowCore)
   example(estimateLogicle)

   f <- function(fcs, col) {
       tr <- estimateLogicle(fcs, col)
       transform(fcs, tr)
   }

   f(samp, "FL1-H")

and there is no error; what do I need to do to make your error occur on 
my machine?

Martin

 > sessionInfo()
R version 2.13.1 Patched (2011-09-04 r56932)
Platform: x86_64-unknown-linux-gnu (64-bit)

locale:
  [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C
  [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8
  [5] LC_MONETARY=C              LC_MESSAGES=en_US.UTF-8
  [7] LC_PAPER=en_US.UTF-8       LC_NAME=C
  [9] LC_ADDRESS=C               LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

other attached packages:
[1] flowCore_1.18.0  rrcov_1.3-00     pcaPP_1.8-3      mvtnorm_0.9-999
[5] robustbase_0.7-3 Biobase_2.12.1

loaded via a namespace (and not attached):
[1] feature_1.2.8 graph_1.30.0  ks_1.8.8      MASS_7.3-12   stats4_2.13.1
[6] tools_2.13.1


>
>   -- output of sessionInfo():
>
> R version 2.13.1 (2011-07-08)
> Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)
>
> locale:
> [1] C/en_US.UTF-8/C/C/C/C
>
> attached base packages:
> [1] stats     graphics  grDevices utils     datasets  methods   base
>
> other attached packages:
> [1] flowCore_1.18.0  rrcov_1.3-01     pcaPP_1.9-43     mvtnorm_0.9-9991 robustbase_0.7-6 Biobase_2.12.2
>
> loaded via a namespace (and not attached):
> [1] MASS_7.3-14   feature_1.2.7 graph_1.30.0  ks_1.8.2      stats4_2.13.1 tools_2.13.1
>
> --
> Sent via the guest posting facility at bioconductor.org.
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at r-project.org
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor


-- 
Computational Biology
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N. PO Box 19024 Seattle, WA 98109

Location: M1-B861
Telephone: 206 667-2793



More information about the Bioconductor mailing list