Entering edit mode
crowsreign42
•
0
@crowsreign42-15742
Last seen 6.5 years ago
Hi! I am trying to do PCA which uses DESeq2. I installed the package directly from Bioconductor, and but when running the script, I get an error that the function rlog() couldn't be found. What should I do?
Thank you in advance
You should copy/paste the code you used, along with the error, as well as the output from sessionInfo().
But do note that any time R says a function can't be found, it's because you either haven't installed or loaded the package that contains that function.
source("https://bioconductor.org/biocLite.R")
biocLite("DESeq2")
library(DESeq2)
rld = rlog(samples, blind=TRUE)
Output: Error in rlog(samples, blind = TRUE) : could not find function "rlog"
> sessionInfo()
R version 3.5.0 (2018-04-23)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)
Matrix products: default
locale:
[1] LC_COLLATE=English_United Kingdom.1252 LC_CTYPE=English_United Kingdom.1252 LC_MONETARY=English_United Kingdom.1252 LC_NUMERIC=C
[5] LC_TIME=English_United Kingdom.1252
attached base packages:
[1] parallel stats4 stats graphics grDevices utils datasets methods base
other attached packages:
[1] IRanges_2.14.1 S4Vectors_0.18.1 BiocGenerics_0.26.0 BiocInstaller_1.30.0
loaded via a namespace (and not attached):
[1] compiler_3.5.0 tools_3.5.0 RCurl_1.95-4.10 bitops_1.0-6
Note that DESeq2 isn't loaded.
What can I do to load it?
Shouldn't it work with the following commands?
source("https://bioconductor.org/biocLite.R")
biocLite("DESeq2")
library(DESeq2)
You tell me. Do you get an error when you run library(DESeq2) ?
I also have the same problem. This is the output I get:
> library(DESeq2)
Loading required package: GenomicRanges
Loading required package: GenomeInfoDb
Error: package or namespace load failed for ‘GenomeInfoDb’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]):
there is no package called ‘GenomeInfoDbData’
Error: package ‘GenomeInfoDb’ could not be loaded
But I don't know how to fix it
Perhaps you installed R-3.5.0 and copied over packages installed from a previous version?
If that is the case do you know what can I do to fix it?
First question is, did you (or whoever installed R) copy the packages over? R does not copy packages from older installations by itself.
The safest way to fix a broken installation is to uninstall R, remove your personal library (which is usually the culprit) - your personal R library usually sits in the first folder returned by .libPaths() - then reinstall R and reinstall all packages.
The GenomeInfoDb package doesn't currently have a Windows binary version. You can either wait for that to get fixed, or you can install the Rtools and then you will be able to compile yourself.
Hmm.. there seems to be one on the package page https://www.bioconductor.org/packages/release/bioc/html/GenomeInfoDb.html - or am I missing something?
Both BiocParallel and GenomeInfoDb were missing the win binaries earlier today.
Well, that was a quick fix! So the OP should be able to install GenomeInfoDb and try again, and if that doesn't work, I would reinstall everything.