[BioC] Ringo: Error in preprocess() with R-2.7.0, but not with R-2.5.0

Joern Toedling toedling at ebi.ac.uk
Fri Jul 4 11:22:32 CEST 2008


Hello Ulrike,
I agree that background correction does not make much sense here. "MM" 
probes, however, are an Affymetrix thing and I guess you mean that the 
red and green background estimates in the list elements Rb and Gb are 
all zero. I am going to remove the calling of "backgroundCorrect" within 
"preprocess" (currently happens for methods "loess" and "median" only) 
and leave it to the user if they want to call it separately on their 
RGList before calling "preprocess". In general, I did not find "loess" 
normalization very useful for two-color ChIP-chip data, since ChIP and 
input sample are usually very different from each other.
So for the moment, I suggest you use another preprocessing method or, if 
you still want to use "loess", edit the function and remove the 
backgroundCorrect, or wait a few days for the new development version 
1.5.6, which will include this change.
Thanks for pointing out this potential problem.
It's still funny that it worked with R2.5.0 but not with R2.7.0, though.
Regards,
Joern

Ulrike Goebel wrote:
> Hi Joern,
>
> thanks for your suggestion .. but this didn't help: I'm still getting the
>  same error.
>
> Trying to trace it back, I found that it is generated in backgroundCorrect
> debug: res <- .Internal(optim(par, fn1, gr1, method, con, lower, upper))
>
> Stack trace:
>
> where 1: optim(par = c(mu, log(sigma), log(alpha)), fn =
> normexp.m2loglik.saddle,
>     control = list(trace = as.integer(trace)), x = x)
> where 2: switch(method, saddle = optim(par = c(mu, log(sigma), log(alpha)),
>     fn = normexp.m2loglik.saddle, control = list(trace = as.integer(trace)),
>     x = x), neldermean = optim(par = c(mu, log(sigma), log(alpha)),
>     fn = normexp.m2loglik, control = list(trace = as.integer(trace)),
>     x = x), bfgs = optim(par = c(mu, log(sigma), log(alpha)),
>     fn = normexp.m2loglik, gr = normexp.grad, method = c("BFGS"),
>     control = list(trace = as.integer(trace)), x = x))
> where 3: normexp.fit(x, method = method)
> where 4: backgroundCorrect(RG$G - RG$Gb, method = method, verbose = verbose)
> where 5: switch(method, subtract = {
>   [lines omitted]
> where 6: backgroundCorrect(myRG, method = "normexp", offset = 50)
> where 7: preprocess(test2[test2$genes$Status == "Probe", ], method = "loess",
>     returnMAList = TRUE, bc.method = "none")
>
> I realize that preprocess is using backgroundCorrect(myRG, method =
>  "normexp", offset = 50), without a way to change the correction method.
>  Actually, in my datasets (and generally in NimbleGen data ?), the MM probes
>  are not used, and the corresponding column is all-zero. So why at all would
>  one want to apply a background correction method ?
>
> What I still don't understand is that the problem is happening only with this
> one array (I can't see anything special with it) ...
>
> Greetings & thanks for the quick answer !
>
> Ulrike
>
> On Thursday 03 July 2008 18:16, you wrote:
>   
>> Hi Ulrike,
>> I cannot be sure but I guess the problem is related these warnings in
>> 2.5.0, which indicated that there was already something amiss back then.
>>
>>     
>>> Warning messages:
>>> 1: NaNs produced in: log(x)
>>> 2: NaNs produced in: log(x)
>>>       
>> Which probes produce the NaN values? It could be the "Random" ones.
>> Unless there is a good reason, why you want to keep these control probes
>> that do not match the genome in your data for further analyses, I would
>> suggest to drop them before preprocessing.
>>
>> loess_test <- preprocess(test[test$genes$Status=="Probe",],
>> method="loess",returnMAList=TRUE)
>>
>>
>> If you want to keep the Random probes, maybe you should discard only
>> those that have missing values already in the RGList.
>> Hope this helps.
>>
>> Regards,
>> Joern
>>
>> Ulrike Goebel wrote:
>>     
>>> Dear list,
>>>
>>> I find that I cannot normalize one (of several) NimbleGen files in
>>> R-2.7.0 (using the preprocess() function of package Ringo), while I did
>>> normalize this dataset successfully before with R-2.5.0.  I guess this is
>>> not even a problem of Ringo, but rather of normalizeWithinArrays (and
>>> thus of limma), or ?
>>>
>>> Here is what I get with R.2.7.0 (and also with R.6.0, not shown):
>>>       
>>>> test <- readNimblegen("TFL2HA.txt", "spottypes.txt", path=dir[[2]])
>>>>         
>>> Reading targets file...
>>> Reading raw intensities...
>>> Read header information
>>> Read 127612_532.pair
>>> Read 127612_635.pair
>>> Read 1276122_532.pair
>>> Read 1276122_635.pair
>>> Determining probe categories...
>>> Matching patterns for: GENE_EXPR_OPTION PROBE_ID
>>> Found 385991 Probe
>>> Found 0 Negative
>>> Found 0 H_Code
>>> Found 0 V_Code
>>> Found 3316 Random
>>> Setting attributes: values Color
>>>
>>>       
>>>> loess_test <- preprocess(test, method="loess",returnMAList=TRUE )
>>>>         
>>> Background correction...
>>> Green channel
>>> Corrected array 1
>>> Error in if (all(abs(delta) < 1e-10)) break :
>>>   missing value where TRUE/FALSE needed
>>>
>>>       
>>>> sessionInfo()
>>>>         
>>> R version 2.7.0 (2008-04-22)
>>> x86_64-unknown-linux-gnu
>>>
>>> locale:
>>> LC_CTYPE=en_US.UTF-8;LC_NUMERIC=C;LC_TIME=en_US.UTF-8;LC_COLLATE=en_US.UT
>>> F-8;LC_MONETARY=C;LC_MESSAGES=en_US.UTF-8;LC_PAPER=en_US.UTF-8;LC_NAME=C;L
>>> C_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=en_US.UTF-8;LC_IDENTIFICATION=C
>>>
>>> attached base packages:
>>> [1] splines   tools     stats     graphics  grDevices utils     datasets
>>> [8] methods   base
>>>
>>> other attached packages:
>>>  [1] Ringo_1.4.0          SparseM_0.77         RColorBrewer_1.0-2
>>>  [4] vsn_3.6.0            affy_1.18.0          preprocessCore_1.2.0
>>>  [7] affyio_1.8.0         limma_2.14.1         geneplotter_1.18.0
>>> [10] annotate_1.18.0      xtable_1.5-2         AnnotationDbi_1.2.0
>>> [13] RSQLite_0.6-8        DBI_0.2-4            lattice_0.17-6
>>> [16] genefilter_1.20.0    survival_2.34-1      Biobase_2.1.7
>>>
>>> loaded via a namespace (and not attached):
>>> [1] grid_2.7.0         KernSmooth_2.22-22
>>>
>>>       
-- 
Joern Toedling
EMBL - European Bioinformatics Institute
Wellcome Trust Genome Campus
Hinxton, Cambridge CB10 1SD
United Kingdom
Phone  +44(0)1223 492566
Email  toedling at ebi.ac.uk



More information about the Bioconductor mailing list