Error: could not find function "DMLtest"
2
2
Entering edit mode
kafkaskid ▴ 20
@kafkaskid-10060
Last seen 8.1 years ago

I'm trying to call DMRs using DSS using a snippet from the manual, but I keep getting an error (Error: could not find function "DMLtest"). It doesn't seem like DSS is importing fully? I just upgraded everything yesterday. I paste the block of code below, the full output, and also sessioninfo. Any thoughts? Thanks in advance!

*******CODE******

library(DSS)
require(bsseq)
path <- file.path(system.file(package="DSS"), "extdata")
dat1.1 <- read.table(file.path(path, "cond1_1.txt"), header=TRUE)
dat1.2 <- read.table(file.path(path, "cond1_2.txt"), header=TRUE)
dat2.1 <- read.table(file.path(path, "cond2_1.txt"), header=TRUE)
dat2.2 <- read.table(file.path(path, "cond2_2.txt"), header=TRUE)
BSobj <- makeBSseqData( list(dat1.1, dat1.2, dat2.1, dat2.2),
+ c("C1","C2", "N1", "N2") )[1:10000,]
dmlTest <- DMLtest(BSobj, group1=c("C1", "C2"), group2=c("N1", "N2"))

***********OUTPUT--INCLUDING STARTUP OF R SO YOU CAN SEE THE VERSION***********

R version 3.2.4 Revised (2016-03-16 r70336) -- "Very Secure Dishes"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(DSS)
Loading required package: Biobase
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, unsplit

Welcome to Bioconductor

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

Loading required package: splines
Warning messages:
1: no function found corresponding to methods exports from ‘bsseq’ for: ‘seqlengths’, ‘seqlengths<-’, ‘seqlevels’, ‘seqlevels<-’ 
2: multiple methods tables found for ‘seqnames’ 
3: multiple methods tables found for ‘seqnames<-’ 
4: multiple methods tables found for ‘start<-’ 
5: multiple methods tables found for ‘end<-’ 
6: multiple methods tables found for ‘width’ 
7: multiple methods tables found for ‘width<-’ 
> require(bsseq)
Loading required package: bsseq
Loading required package: IRanges
Loading required package: S4Vectors
Loading required package: stats4
Loading required package: GenomicRanges
Loading required package: GenomeInfoDb
Loading required package: matrixStats
matrixStats v0.50.1 (2015-12-14) successfully loaded. See ?matrixStats for help.

Attaching package: ‘matrixStats’

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

    anyMissing, rowMedians

> path <- file.path(system.file(package="DSS"), "extdata")
> dat1.1 <- read.table(file.path(path, "cond1_1.txt"), header=TRUE)
> dat1.2 <- read.table(file.path(path, "cond1_2.txt"), header=TRUE)
> dat2.1 <- read.table(file.path(path, "cond2_1.txt"), header=TRUE)
> dat2.2 <- read.table(file.path(path, "cond2_2.txt"), header=TRUE)
> BSobj <- makeBSseqData( list(dat1.1, dat1.2, dat2.1, dat2.2),
+ + c("C1","C2", "N1", "N2") )[1:10000,]
> BSobj
An object of type 'BSseq' with
  10000 methylation loci
  4 samples
has not been smoothed
>  dmlTest <- DMLtest(BSobj, group1=c("C1", "C2"), group2=c("N1", "N2"))
Error: could not find function "DMLtest"

************sessionInfo()**************

> sessionInfo()
R version 3.2.4 Revised (2016-03-16 r70336)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 14.04.4 LTS

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=en_US.UTF-8    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] stats4    splines   parallel  stats     graphics  grDevices utils    
 [8] datasets  methods   base     

other attached packages:
[1] bsseq_1.2.0          matrixStats_0.50.1   GenomicRanges_1.18.4
[4] GenomeInfoDb_1.2.5   IRanges_2.0.1        S4Vectors_0.4.0     
[7] DSS_2.4.1            Biobase_2.26.0       BiocGenerics_0.12.1 

loaded via a namespace (and not attached):
[1] locfit_1.5-9.1   Rcpp_0.12.4      lattice_0.20-33  plyr_1.8.3      
[5] grid_3.2.4       scales_0.4.0     XVector_0.6.0    munsell_0.4.3   
[9] colorspace_1.2-6
dss • 2.0k views
ADD COMMENT
0
Entering edit mode
@martin-morgan-1513
Last seen 17 days ago
United States

I don't really have an answer, but your package versions are 'old' compared to your version of R. For instance, DSS in the current release is version 2.10, in the previous release 2.8 (the first release to use the R-3.2 series). I think you should (unless you have an important deadline!) remove your version of BiocInstaller

remove.packages("BiocInstaller")   # repeat until R says there is no BiocInstaller to remove

then restart R and update your installed packages.

source("https://bioconductor.org/biocLite.R")
biocLite()

If there are issues about write permissions (for other than the 'recommended' R packages) then please report the output of .libPaths().

ADD COMMENT
0
Entering edit mode
kafkaskid ▴ 20
@kafkaskid-10060
Last seen 8.1 years ago

Thank you for the follow! I have tried to do exactly what you said, but I always get a message the first time that "there is no package call 'BincInstaller' (output below at the bottom). I think like you suspect, there is a permissions issue with one of that libpaths.
Output from .libPaths() is:

> .libPaths()
[1] "/home/ckeown/R/x86_64-pc-linux-gnu-library/3.2"
[2] "/usr/local/lib/R/site-library"                 
[3] "/usr/lib/R/site-library"                       
[4] "/usr/lib/R/library"
> remove.packages("BiocInstaller")
Removing package from ‘/home/ckeown/R/x86_64-pc-linux-gnu-library/3.2’
(as ‘lib’ is unspecified)
Error in find.package(pkgs, lib) : 
  there is no package called ‘BiocInstaller’
> source("https://bioconductor.org/biocLite.R")
Bioconductor version 3.0 (BiocInstaller 1.16.5), ?biocLite for help
BiocInstaller version 3.0 is too old for R version 3.2.4;
  remove.packages("BiocInstaller") then
  source("http://bioconductor.org/biocLite.R")
A new version of Bioconductor is available after installing the most recent
  version of R; see http://bioconductor.org/install
> biocLite()
BioC_mirror: http://bioconductor.org
Using Bioconductor version 3.0 (BiocInstaller 1.16.5), R version 3.2.4.
Old packages: 'RMySQL'
Update all/some/none? [a/s/n]: n
> 
ADD COMMENT
0
Entering edit mode

I think that when it says 'there is no package called BiocInstaller' it forgets to add '...that I can remove', and that actually there is a version in one of the system paths; something like

> ii = installed.packages()
> ii[rownames(ii) == "BiocInstaller",, drop=FALSE]

might confirm this. I guess what happened is a new version of R was installed over an old version of R packages; this really needs to be fixed by the system administrator, installing a new version of R and updating all packages, or better creating version-specific paths for R libraries.

As a user, I think you can force an installation of the correct version of BiocInstaller in your path by removing BiocInstaller, and then installing it 'by hand' (in the future, '3.2' in the URL would need to be replaced by the most recent version of Bioconductor available for your version of R, summarized here).

install.packages("BiocInstaller", repos="https://bioconductor.org/packages/3.2/bioc")

and then

source("https://bioconductor.org/biocLite.R")  # should load new BiocInstaller
biocLite()

Also, it might be useful to figure out where the additional system library paths are coming from; some of them might be easy to avoid by starting with R --vanilla.

ADD REPLY
0
Entering edit mode

Yes, this fixed it! Many thanks, Martin! We'll have to dig into the R installation issue some more, but for now, Bioconductor is working!

ADD REPLY

Login before adding your answer.

Traffic: 604 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6