Is possible to use an organism annotation package in simLL function?
1
0
Entering edit mode
@lluis-revilla-sancho
Last seen 1 day ago
European Union

I wanted to use an organism org.Hs.eg.db package when using the function simLL as follows but it is not possible?

>library("GOstats")

>library("org.Hs.eg.db")

>simLL("13331", "1333", "BP", measure = "LP", chip = "org.Hs.eg.db")
Error in .get_eg_to_go_fun(mapfun, chip) :
  either mapfun or chip must be specified
In addition: Warning message:
object 'org.Hs.egGO2PROBE' not found
DB-based version of  org.Hs.eg.db  not found.
Reverting to use of environment-based GO
>simLL("13331", "1333", "BP", measure = "LP", chip = "hgu133plus2.db")

NA

The argument description says:

chip    
The name of a DB-based annotation data package (the name will end in ".db"). This package will be used to generate an Entrez ID to GO ID mapping instead of mapfun.

Is this the expected behavior? I expected to receive a NA or something similar but not an error and a warning when I used the annotation package of the organism.

> sessionInfo()
R version 3.3.1 (2016-06-21)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 14.04.5 LTS

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=es_ES.UTF-8       
 [4] LC_COLLATE=en_US.UTF-8     LC_MONETARY=es_ES.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=es_ES.UTF-8       LC_NAME=C                  LC_ADDRESS=C              
[10] LC_TELEPHONE=C             LC_MEASUREMENT=es_ES.UTF-8 LC_IDENTIFICATION=C       

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

other attached packages:
 [1] GO.db_3.3.0           GOstats_2.38.1        graph_1.50.0          Category_2.38.0      
 [5] Matrix_1.2-6          hgu133plus2.db_3.2.3  org.Hs.eg.db_3.3.0    AnnotationDbi_1.34.4
 [9] IRanges_2.6.1         S4Vectors_0.10.2      Biobase_2.32.0        BiocGenerics_0.18.0  
[13] WGCNA_1.51            fastcluster_1.1.20    dynamicTreeCut_1.63-1

loaded via a namespace (and not attached):
 [1] Rcpp_0.12.6            RColorBrewer_1.1-2     plyr_1.8.4             iterators_1.0.8       
 [5] tools_3.3.1            rpart_4.1-10           annotate_1.50.0        preprocessCore_1.34.0
 [9] RSQLite_1.0.0          gtable_0.2.0           lattice_0.20-33        foreach_1.4.3         
[13] DBI_0.4-1              gridExtra_2.2.1        genefilter_1.54.2      cluster_2.0.4         
[17] grid_3.3.1             nnet_7.3-12            GSEABase_1.34.0        impute_1.46.0         
[21] data.table_1.9.6       RBGL_1.48.1            XML_3.98-1.4           survival_2.39-5       
[25] foreign_0.8-66         latticeExtra_0.6-28    Formula_1.2-1          ggplot2_2.1.0         
[29] Hmisc_3.17-4           scales_0.4.0           codetools_0.2-14       matrixStats_0.50.2    
[33] splines_3.3.1          AnnotationForge_1.14.2 xtable_1.8-2           colorspace_1.2-6      
[37] acepack_1.3-3.3        doParallel_1.0.10      munsell_0.4.3          chron_2.3-47   
gostats • 1.2k views
ADD COMMENT
2
Entering edit mode
@james-w-macdonald-5106
Last seen 3 hours ago
United States

In the case of an orgDb package, it's really simple because you don't have to do the extra probe -> Entrez Gene ID mapping. You just have to give the Entrezid -> GO mapping function, which is provided by the org.Hs.egGO2EG function, so long as you do a revmap on it first, to make it a virtual org.Hs.egEG2GO fuction.

> mapfun <- function(x) mget(x, revmap(org.Hs.egGO2EG), ifnotfound = NA)
> simLL("1","2", mapfun = mapfun)
$sim
[1] NA

$measure
[1] "LP"

$g1
A graphNEL graph with directed edges
Number of Nodes = 2
Number of Edges = 1

$g2
A graphNEL graph with directed edges
Number of Nodes = 23
Number of Edges = 25
ADD COMMENT

Login before adding your answer.

Traffic: 828 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