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
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
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).
and then
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
.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!