Using R-devel for windows, I attempted to run the posted example script for the PoTRa R program, and one of its dependencies is the graphite bioconductor package (graphite is linked to the error). PoTRa's functions, example data and example code, plus some detail can be found here:
http://dinulab.org/tools/potra/
So my main request is if anyone can help me troubleshoot this error message. The developers of PoTRa also do not understand why the error messages below appear on some computers but not in others.
The error messages are the following:
> ##For PoTRA.cor:
>
> results.cor <-PoTRA.cor(mydata=mydata,genelist=genelist,Num.sample.normal=8,Num.sample.case=8,Pathway.database=humanKEGG[1:10],PR.quantile=0.95)
[1] 1
Error in nrow(edges) :
no slot of name "protEdges" for this object of class "Pathway"
> ##For PoTRA.comb:
>
> results.comb <-PoTRA.comb(mydata=mydata,genelist=genelist,Num.sample.normal=8,Num.sample.case=8,Pathway.database=humanKEGG[1:10],PR.quantile=0.95)
[1] 1
Error in nrow(edges) :
no slot of name "protEdges" for this object of class "Pathway"
Here is a link to the graphite info page where protEdges is a slot for Pathway. Note that the 3.6 version issued the same error messages as the 3.7 version in bioconductor:
https://rdrr.io/bioc/graphite/src/R/pathway.R
Code block from pathway.R from Graphite
setClass("Pathway", representation( id = "character", title = "character", database = "character", species = "character", protEdges = "data.frame", protPropEdges = "data.frame", metabolEdges = "data.frame", metabolPropEdges = "data.frame", mixedEdges = "data.frame", timestamp = "Date"))
Here is my sessionInfo():
> sessionInfo()
R Under development (unstable) (2018-03-10 r74380)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 16299)
Matrix products: default
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252 LC_MONETARY=English_United States.1252 LC_NUMERIC=C LC_TIME=English_United States.1252
attached base packages:
[1] stats4 parallel stats graphics grDevices utils datasets methods base
other attached packages:
[1] org.Hs.eg.db_3.5.0 AnnotationDbi_1.41.4 IRanges_2.13.28 S4Vectors_0.17.35 Biobase_2.39.2 igraph_1.2.1 graphite_1.25.1 graph_1.57.1 BiocGenerics_0.25.3
loaded via a namespace (and not attached):
[1] Rcpp_0.12.15 magrittr_1.5 rappdirs_0.3.1 bit_1.1-12 R6_2.2.2 rlang_0.2.0 blob_1.1.0 httr_1.3.1 checkmate_1.8.5 DBI_0.8 bit64_0.9-7 digest_0.6.15
[13] tibble_1.4.2 memoise_1.1.0 RSQLite_2.0 compiler_3.5.0 pillar_1.2.1 backports_1.1.2 pkgconfig_2.0.1
Dear Gabriele,
Thank you for your response. After I removed the workspace object humanKEGG from the PoTRA-example-data.Rdata file, I changed the following code
require(BiocGenerics)
require(graph)
require(graphite)
require(igraph)
see entire code https://github.com/GenomicsPrograms/PoTRA/blob/master/PoTRA%20Code/PoTRA_R.txt)
to something different
(see below and received the following error message (also below))
:devtools::install_deps(deps = TRUE)
devtools::load_all()
devtools::use_package("BiocGenerics", type = "Imports", pkg = ".")
devtools::use_package("graph", type = "Imports", pkg = ".")
devtools::use_package("graphite", type = "Imports", pkg = ".")
devtools::use_package("igraph", type = "Imports", pkg = ".")
devtools::use_package("org.Hs.eg.db", type = "Imports", pkg = ".")
import::from(graphite, humanReactome, humanKEGG, humanBiocarta, .into= graphite)
import::into("", humanReactome, humanKEGG, humanBiocarta, .from = graphite)
Error: Could not find package root
How do I fix this error? Is the devtools and import statements the right way to have humanKEGG retrieved from graphite?
Thanks so much.
Dear user,
I don't think
devtools
are really needed here. Why don't you use the following?library(graphite)
humanReactome <- pathways("hsapiens", "reactome")
You can then obtain other species / databases calling the
pathways
function again, with different arguments.Have a look at
pathwayDatabases()
for a full list.Best,
Gabriele