[BioC] Problem with DESeq : \"Error in FUN(newX[, i], ...) : could not find function \"locfunc\"\"

Benoist [guest] guest at bioconductor.org
Sun May 4 18:20:58 CEST 2014


Dear Madam or Sir,

I am a post-doctorant working on NGS data (from ChIP seq to RNAseq) but I have problems when I use DESeq for differential analysis.  When I want to estimate dispersion I have this error message:
"Error in FUN(newX[, i], ...) : could not find function "locfunc" 

Here is an example of the problem :

# first I just load a matrix of 20000 rows and I select 8 columns
> data = read.csv("H3K27me3-ensembl-59-gene-bodies-counts.txt", sep="\t")
> cols = c(grep("BN", colnames(data)), grep("SHR", colnames(data)))
> data=data[,cols]
> head(data)
                   liver.H3K27me3.BN.male.bio1 liver.H3K27me3.BN.male.bio2 liver.H3K27me3.BN.male.bio3 liver.H3K27me3.BN.male.bio4
ENSRNOG00000005665                           3                           3                          11                          11
ENSRNOG00000023458                          99                          74                         105                         104
ENSRNOG00000031533                          56                          34                          48                          36
ENSRNOG00000032223                           0                           1                           0                           0
ENSRNOG00000040189                           0                           0                           0                           0
ENSRNOG00000005894                        3496                        3874                        3657                        4008
                   liver.H3K27me3.SHR.male.bio1 liver.H3K27me3.SHR.male.bio2 liver.H3K27me3.SHR.male.bio3
ENSRNOG00000005665                            2                            6                            5
ENSRNOG00000023458                           41                          113                          110
ENSRNOG00000031533                           19                           52                           50
ENSRNOG00000032223                            1                            2                            1
ENSRNOG00000040189                            0                            0                            0
ENSRNOG00000005894                         1588                         2990                         3058
                   liver.H3K27me3.SHR.male.bio4
ENSRNOG00000005665                            9
ENSRNOG00000023458                           99
ENSRNOG00000031533                           47
ENSRNOG00000032223                            0
ENSRNOG00000040189                            0
ENSRNOG00000005894                         3732

# then I use DESeq to perform a differential analysis 
> library(DESeq)
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package: ‘BiocGenerics’

The following objects are masked from ‘package:parallel’:

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ, clusterExport, clusterMap, parApply, parCapply,
    parLapply, parLapplyLB, parRapply, parSapply, parSapplyLB

The following object is masked from ‘package:stats’:

    xtabs

The following objects are masked from ‘package:base’:

    anyDuplicated, append, as.data.frame, as.vector, cbind, colnames, do.call, duplicated, eval, evalq, Filter, Find,
    get, intersect, is.unsorted, lapply, Map, mapply, match, mget, order, paste, pmax, pmax.int, pmin, pmin.int,
    Position, rank, rbind, Reduce, rep.int, rownames, sapply, setdiff, sort, table, tapply, union, unique, unlist

Loading required package: Biobase
Welcome to Bioconductor

    Vignettes contain introductory material; view with 'browseVignettes()'. To cite Bioconductor, see
    'citation("Biobase")', and for packages 'citation("pkgname")'.

Loading required package: locfit
locfit 1.5-9.1   2013-03-22
Loading required package: lattice
    Welcome to 'DESeq'. For improved performance, usability and functionality, please consider migrating to 'DESeq2'.


> strain = factor(rep(c("BN", "SHR"), each=4))
> cds = newCountDataSet(data, strain)
> cds=estimateSizeFactors(cds)
Error in FUN(newX[, i], ...) : could not find function "locfunc"


> traceback()
6: FUN(newX[, i], ...)
5: apply(counts, 2, function(cnts) exp(locfunc((log(cnts) - loggeomeans)[is.finite(loggeomeans)])))
4: estimateSizeFactorsForMatrix(counts(object), locfunc)
3: .local(object, ...)
2: estimateSizeFactors(cds)
1: estimateSizeFactors(cds)
> ?locfunc
No documentation for ‘locfunc’ in specified packages and libraries:
you could try ‘??locfunc’


I already try to find an answer by copy and past this error message on google but I didn't find anything.
So I have follow bioconductor advice, I install R again, DESeq again, I check if the package were up to date... but after that nothing change, there is still this error message.
The thing is : I never had this problem with my previous computer when I was performing such analysis on such kind of data.

Thank you for any halp you could provide!

Camille BENOIST

 -- output of sessionInfo(): 

R version 3.1.0 (2014-04-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)

locale:
[1] LC_COLLATE=French_France.1252  LC_CTYPE=French_France.1252    LC_MONETARY=French_France.1252 LC_NUMERIC=C                  
[5] LC_TIME=French_France.1252    

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

other attached packages:
[1] DESeq_1.16.0         lattice_0.20-29      locfit_1.5-9.1       Biobase_2.24.0       BiocGenerics_0.10.0  BiocInstaller_1.14.2

loaded via a namespace (and not attached):
 [1] annotate_1.42.0      AnnotationDbi_1.26.0 DBI_0.2-7            genefilter_1.46.0    geneplotter_1.42.0   GenomeInfoDb_1.0.2  
 [7] grid_3.1.0           IRanges_1.22.6       RColorBrewer_1.0-5   RSQLite_0.11.4       splines_3.1.0        stats4_3.1.0        
[13] survival_2.37-7      tools_3.1.0          XML_3.98-1.1         xtable_1.7-3 

--
Sent via the guest posting facility at bioconductor.org.



More information about the Bioconductor mailing list