[BioC] Problem with affy mas5 on Linux but not Windows...

James W. MacDonald jmacdon at med.umich.edu
Fri Jan 28 20:39:54 CET 2011


So it is as I surmised. Somehow or another you are ending up with NA 
values in the data passed to the underlying C code. This is 99.9999999% 
likely to be due to problems with your data, as literally thousands of 
people have used this function without problems.

I don't know how to help you any more than I have. You don't seem 
interested in running the debugger on bg.correct.mas(), and without any 
more information than I already know, I am stuck.

So unless you are willing to do some work on your end, my best 
suggestion is to use your Windows box.

Best,

Jim



On 1/28/2011 1:07 PM, James Carman wrote:
>> traceback()
> 10: .C("affy_background_adjust_R", as.double(as.vector(allintensities)),
>          as.integer(allx), as.integer(ally), as.integer(nprobes),
>          as.integer(nchips), as.integer(rows), as.integer(cols),
> as.integer(griddim),
>          PACKAGE = "affy")
> 9: as.vector(data)
> 8: matrix(.C("affy_background_adjust_R", as.double(as.vector(allintensities)),
>         as.integer(allx), as.integer(ally), as.integer(nprobes),
>         as.integer(nchips), as.integer(rows), as.integer(cols),
> as.integer(griddim),
>         PACKAGE = "affy")[[1]], nprobes, nchips)
> 7: bg.correct.mas(object, ...)
> 6: do.call(methodname, alist(object, ...))
> 5: function (object, method, ...)
>     standardGeneric("bg.correct")(afbatch, method = bgcorrect.method)
> 4: function (object, method, ...)
>     standardGeneric("bg.correct")(afbatch, method = bgcorrect.method)
> 3: do.call(affy:::bg.correct, c(alist(afbatch, method = bgcorrect.method),
>         bgcorrect.param))
> 2: expresso(object, bgcorrect.method = "mas", pmcorrect.method = "mas",
>         normalize = FALSE, summary.method = "mas", ...)
> 1: mas5(aff)
>
>
> On Fri, Jan 28, 2011 at 1:04 PM, James W. MacDonald
> <jmacdon at med.umich.edu>  wrote:
>> What do you get from traceback()?
>>
>> On 1/28/2011 12:47 PM, James Carman wrote:
>>>
>>> I tried what you recommended:
>>>
>>>> library(affy)
>>>
>>> Loading required package: Biobase
>>>
>>> Welcome to Bioconductor
>>>
>>>    Vignettes contain introductory material. To view, type
>>>    'openVignette()'. To cite Bioconductor, see
>>>    'citation("Biobase")' and for packages 'citation(pkgname)'.
>>>
>>>> aff = ReadAffy()
>>>> any(is.na(exprs(aff)))
>>>
>>> [1] FALSE
>>>>
>>>> m5 = mas5(aff)
>>>
>>> background correction: mas
>>> PM/MM correction : mas
>>> expression values: mas
>>> background correcting...Error in as.vector(data) : NAs in foreign
>>> function call (arg 2)
>>>
>>> So, no NA values in my data.
>>>
>>> On Fri, Jan 28, 2011 at 12:41 PM, James W. MacDonald
>>> <jmacdon at med.umich.edu>    wrote:
>>>>
>>>> On 1/28/2011 11:47 AM, James Carman wrote:
>>>>>
>>>>> Looks like that worked for me (after it downloaded hgu95av2cdf of
>>>>> course).  So, what does that mean?
>>>>
>>>> It means there isn't any weird Linux/mas5() interaction going on, so we
>>>> can
>>>> look at your data. The error you report indicates you have some NA values
>>>> in
>>>> your data somewhere. So the first step is to check.
>>>>
>>>> any(is.na(exprs(aff)))
>>>>
>>>> This should return TRUE. If so, you can track it down to the 'bad'
>>>> celfile
>>>> by
>>>>
>>>> apply(exprs(aff), 2, function(x) any(is.na(x)))
>>>>
>>>> and then try re-uploading that celfile to your Linux box.
>>>>
>>>> If not, you can try
>>>>
>>>> debug(bg.correct.mas)
>>>> bg.correct.mas(aff)
>>>>
>>>> and step through the function. The error comes at the line
>>>>
>>>>   corrected<- matrix(.C("affy_background_adjust_R",
>>>> as.double(as.vector(allintensities)),
>>>>         as.integer(allx), as.integer(ally), as.integer(nprobes),
>>>>         as.integer(nchips), as.integer(rows), as.integer(cols),
>>>>         as.integer(griddim), PACKAGE = "affy")[[1]], nprobes,
>>>>         nchips)
>>>>
>>>> where the data are passed off to a C function. Right before that step you
>>>> can test the objects 'allx', 'ally' and 'nprobes' for any NA values. Note
>>>> here that while in the debugger, R shows you the *next* line it is going
>>>> to
>>>> interpret, so when you see the above line you can test those objects for
>>>> the
>>>> presence of NA values.
>>>>
>>>> Let us know what you find!
>>>>
>>>> Best,
>>>>
>>>> Jim
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>>
>>>>> On Fri, Jan 28, 2011 at 11:40 AM, James W. MacDonald
>>>>> <jmacdon at med.umich.edu>      wrote:
>>>>>>
>>>>>> Hi James,
>>>>>>
>>>>>> On 1/28/2011 11:00 AM, James Carman wrote:
>>>>>>>
>>>>>>> If I try to run this code on Linux, it fails, but it works on Windows:
>>>>>>>
>>>>>>>> library(affy)
>>>>>>>> aff<- ReadAffy()
>>>>>>>> m5<- mas5(aff)
>>>>>>>
>>>>>>> background correction: mas
>>>>>>> PM/MM correction : mas
>>>>>>> expression values: mas
>>>>>>> background correcting...Error in as.vector(data) : NAs in foreign
>>>>>>> function call (arg 2)
>>>>>>
>>>>>> Let's start with something simple. Can you run mas5() on the Dilution
>>>>>> data
>>>>>> from the affydata package? I get
>>>>>>
>>>>>>> library(affydata)
>>>>>>
>>>>>> Loading required package: affy
>>>>>> Loading required package: Biobase
>>>>>>
>>>>>> Welcome to Bioconductor
>>>>>>
>>>>>>   Vignettes contain introductory material. To view, type
>>>>>>   'openVignette()'. To cite Bioconductor, see
>>>>>>   'citation("Biobase")' and for packages 'citation(pkgname)'.
>>>>>>
>>>>>>> data(Dilution)
>>>>>>> m5<- mas5(Dilution)
>>>>>>
>>>>>> background correction: mas
>>>>>> PM/MM correction : mas
>>>>>> expression values: mas
>>>>>> background correcting...done.
>>>>>> 12625 ids to be processed
>>>>>> |                    |
>>>>>> |####################|
>>>>>>>
>>>>>>> sessionInfo()
>>>>>>
>>>>>> R version 2.12.0 beta (2010-09-30 r53083)
>>>>>> Platform: x86_64-unknown-linux-gnu (64-bit)
>>>>>>
>>>>>> locale:
>>>>>>   [1] LC_CTYPE=en_US.iso885915       LC_NUMERIC=C
>>>>>>   [3] LC_TIME=en_US.iso885915        LC_COLLATE=en_US.iso885915
>>>>>>   [5] LC_MONETARY=C                  LC_MESSAGES=en_US.iso885915
>>>>>>   [7] LC_PAPER=en_US.iso885915       LC_NAME=C
>>>>>>   [9] LC_ADDRESS=C                   LC_TELEPHONE=C
>>>>>> [11] LC_MEASUREMENT=en_US.iso885915 LC_IDENTIFICATION=C
>>>>>>
>>>>>> attached base packages:
>>>>>> [1] stats     graphics  grDevices utils     datasets  methods   base
>>>>>>
>>>>>> other attached packages:
>>>>>> [1] hgu95av2cdf_2.7.0 affydata_1.11.10  affy_1.28.0
>>>>>> Biobase_2.10.0
>>>>>>
>>>>>> loaded via a namespace (and not attached):
>>>>>> [1] affyio_1.18.0         preprocessCore_1.12.0 tools_2.12.0
>>>>>>
>>>>>> Best,
>>>>>>
>>>>>> Jim
>>>>>>
>>>>>>
>>>>>>>
>>>>>>> Here's the result of sessionInfo():
>>>>>>>>
>>>>>>>> sessionInfo()
>>>>>>>
>>>>>>> R version 2.12.1 (2010-12-16)
>>>>>>> Platform: x86_64-redhat-linux-gnu (64-bit)
>>>>>>>
>>>>>>> locale:
>>>>>>>   [1] LC_CTYPE=en_US.utf8       LC_NUMERIC=C
>>>>>>>   [3] LC_TIME=en_US.utf8        LC_COLLATE=en_US.utf8
>>>>>>>   [5] LC_MONETARY=C             LC_MESSAGES=en_US.utf8
>>>>>>>   [7] LC_PAPER=en_US.utf8       LC_NAME=C
>>>>>>>   [9] LC_ADDRESS=C              LC_TELEPHONE=C
>>>>>>> [11] LC_MEASUREMENT=en_US.utf8 LC_IDENTIFICATION=C
>>>>>>>
>>>>>>> attached base packages:
>>>>>>> [1] stats     graphics  grDevices utils     datasets  methods   base
>>>>>>>
>>>>>>> other attached packages:
>>>>>>> [1] hgu133a2cdf_2.7.0 affy_1.28.0       Biobase_2.10.0
>>>>>>>
>>>>>>> loaded via a namespace (and not attached):
>>>>>>> [1] affyio_1.16.0         preprocessCore_1.10.0 tools_2.12.1
>>>>>>>
>>>>>>> Here's my platform:
>>>>>>>
>>>>>>>> uname -a
>>>>>>>
>>>>>>> Linux carman-op755 2.6.35.10-74.fc14.x86_64 #1 SMP Thu Dec 23 16:04:50
>>>>>>> UTC 2010 x86_64 x86_64 x86_64 GNU/Linux
>>>>>>>
>>>>>>> Here's the version of R that I'm running:
>>>>>>>
>>>>>>>> rpm -qa | grep R-
>>>>>>>
>>>>>>> R-core-2.12.1-1.fc14.x86_64
>>>>>>> R-devel-2.12.1-1.fc14.x86_64
>>>>>>> R-2.12.1-1.fc14.x86_64
>>>>>>>
>>>>>>>
>>>>>>> We have used this process in the past and it has worked fine.  I got a
>>>>>>> new computer and installed the latest Bioconductor package(s) on it
>>>>>>> and now I'm getting this failure.  Any ideas?
>>>>>>>
>>>>>>> Thank you,
>>>>>>>
>>>>>>> James Carman
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> 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
>>>>>>
>>>>>> --
>>>>>> James W. MacDonald, M.S.
>>>>>> Biostatistician
>>>>>> Douglas Lab
>>>>>> University of Michigan
>>>>>> Department of Human Genetics
>>>>>> 5912 Buhl
>>>>>> 1241 E. Catherine St.
>>>>>> Ann Arbor MI 48109-5618
>>>>>> 734-615-7826
>>>>>> **********************************************************
>>>>>> Electronic Mail is not secure, may not be read every day, and should
>>>>>> not
>>>>>> be
>>>>>> used for urgent or sensitive issues
>>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> 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
>>>>
>>>> --
>>>> James W. MacDonald, M.S.
>>>> Biostatistician
>>>> Douglas Lab
>>>> University of Michigan
>>>> Department of Human Genetics
>>>> 5912 Buhl
>>>> 1241 E. Catherine St.
>>>> Ann Arbor MI 48109-5618
>>>> 734-615-7826
>>>> **********************************************************
>>>> Electronic Mail is not secure, may not be read every day, and should not
>>>> be
>>>> used for urgent or sensitive issues
>>>>
>>>
>>> _______________________________________________
>>> 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
>>
>> --
>> James W. MacDonald, M.S.
>> Biostatistician
>> Douglas Lab
>> University of Michigan
>> Department of Human Genetics
>> 5912 Buhl
>> 1241 E. Catherine St.
>> Ann Arbor MI 48109-5618
>> 734-615-7826
>> **********************************************************
>> Electronic Mail is not secure, may not be read every day, and should not be
>> used for urgent or sensitive issues
>>

-- 
James W. MacDonald, M.S.
Biostatistician
Douglas Lab
University of Michigan
Department of Human Genetics
5912 Buhl
1241 E. Catherine St.
Ann Arbor MI 48109-5618
734-615-7826
**********************************************************
Electronic Mail is not secure, may not be read every day, and should not be used for urgent or sensitive issues 



More information about the Bioconductor mailing list