Gene similarity by GOSemSim
Entering edit mode
Last seen 3.8 years ago

When I run the mgeneSim function in the GOSemsim package, choose ontology "BP" or "CC" or  "MF"   the error pop up as follows.


d <- godata('org.Sc.sgd.db', ont="BP", computeIC=TRUE)
ORF_dat<-select(org.Sc.sgd.db, keys=k, keytype="ENTREZID", columns="ORF")
sim <- mgeneSim(ORF_vec,semData=d,measure="Wang",drop = NULL)


r in go_matrix[gos[[i]], gos[[j]]] : incorrect number of dimensions

when i run the following code

select(org.Sc.sgd.db, keys=ORF_vec, keytype="ORF", "GO")

got the result

chr [1:20] "YMR084W" "YFL026W" "YPL228W" "YDR110W" "YPL081W" "YDR204W" "YAR009C" "YHR167W" "YLR390W-A" "YLR421C" "YPR089W" ...
1     YMR084W S000004689 GO:0003674       ND       MF
2     YMR084W S000004689 GO:0004360      IEA       MF
3     YMR084W S000004689 GO:0005575       ND       CC
4     YMR084W S000004689 GO:0006048      IEA       BP
5     YMR084W S000004689 GO:0006541      IEA       BP
6     YMR084W S000004689 GO:0008150       ND       BP
7     YMR084W S000004689 GO:0008483      IEA       MF
8     YMR084W S000004689 GO:0016740      IEA       MF
9     YFL026W S000001868 GO:0000750      IMP       BP
10    YFL026W S000001868 GO:0000755      IDA       BP
11    YFL026W S000001868 GO:0000755      IMP       BP
12    YFL026W S000001868 GO:0004871      IEA       MF
13    YFL026W S000001868 GO:0004930      IEA       MF
14    YFL026W S000001868 GO:0004932      IEA       MF
15    YFL026W S000001868 GO:0004934      IDA       MF
16    YFL026W S000001868 GO:0004934      IGI       MF
17    YFL026W S000001868 GO:0004934      IMP       MF
18    YFL026W S000001868 GO:0004934      ISS       MF
19    YFL026W S000001868 GO:0005550      IBA       MF
20    YFL026W S000001868 GO:0005887      IDA       CC
21    YFL026W S000001868 GO:0007165      IEA       BP
22    YFL026W S000001868 GO:0007186      IEA       BP
23    YFL026W S000001868 GO:0016020      IEA       CC
24    YFL026W S000001868 GO:0016021      IEA       CC
25    YFL026W S000001868 GO:0016021      ISM       CC
26    YFL026W S000001868 GO:0019236      IEA       BP
27    YFL026W S000001868 GO:0030031      IMP       BP
28    YFL026W S000001868 GO:0031139      IBA       BP
29    YFL026W S000001868 GO:0035624      IBA       BP
30    YFL026W S000001868 GO:0038038      IBA       CC
31    YFL026W S000001868 GO:0051260      IPI       BP
32    YPL228W S000006149 GO:0004651      IDA       MF
33    YPL228W S000006149 GO:0004651      IEA       MF
34    YPL228W S000006149 GO:0005634      IEA       CC
35    YPL228W S000006149 GO:0006370      IEA       BP
36    YPL228W S000006149 GO:0006370      IPI       BP
37    YPL228W S000006149 GO:0006397      IEA       BP
38    YPL228W S000006149 GO:0016787      IEA       MF
39    YPL228W S000006149 GO:0031533      IGI       CC
40    YPL228W S000006149 GO:0031533      IPI       CC
41    YPL228W S000006149 GO:0032968      IMP       BP
42    YPL228W S000006149 GO:0098501      IDA       BP
43    YPL228W S000006149 GO:0098507      IEA       BP
44    YPL228W S000006149 GO:1900182      IMP       BP
45    YDR110W S000002517 GO:0000183      IDA       BP
46    YDR110W S000002517 GO:0000183      IMP       BP
47    YDR110W S000002517 GO:0001302      IMP       BP
48    YDR110W S000002517 GO:0003677      IEA       MF
49    YDR110W S000002517 GO:0005634      IEA       CC
50    YDR110W S000002517 GO:0005730      IDA       CC
51    YDR110W S000002517 GO:0005730      IEA       CC
52    YDR110W S000002517 GO:0006260      IEA       BP
53    YDR110W S000002517 GO:0006310      IEA       BP
54    YDR110W S000002517 GO:0006310      IMP       BP
55    YDR110W S000002517 GO:0006325      IGI       BP
56    YDR110W S000002517 GO:0007059      IGI       BP
57    YDR110W S000002517 GO:0007580      IMP       BP
58    YDR110W S000002517 GO:0008156      IDA       BP
59    YDR110W S000002517 GO:0031582      IMP       BP
60    YDR110W S000002517 GO:0033553      IDA       CC
61    YDR110W S000002517 GO:0034503      IMP       BP
62    YDR110W S000002517 GO:0043007      IGI       BP
63    YDR110W S000002517 GO:0043110      IDA       MF
64    YDR110W S000002517 GO:0043110      IMP       MF
65    YDR110W S000002517 GO:0045911      IMP       BP
66    YDR110W S000002517 GO:0046872      IEA       MF
67    YDR110W S000002517 GO:0070550      IMP       BP
68    YDR110W S000002517 GO:0090342      IGI       BP
69    YDR110W S000002517 GO:0090342      IMP       BP
70    YDR110W S000002517 GO:0090579      IMP       BP
71    YPL081W S000006002 GO:0000462      IGI       BP
72    YPL081W S000006002 GO:0002181       IC       BP
73    YPL081W S000006002 GO:0003723      IEA       MF
74    YPL081W S000006002 GO:0003735      IDA       MF
75    YPL081W S000006002 GO:0003735      IEA       MF
76    YPL081W S000006002 GO:0005622      IEA       CC
77    YPL081W S000006002 GO:0005634      IEA       CC
78    YPL081W S000006002 GO:0005730      IEA       CC
79    YPL081W S000006002 GO:0005737      IDA       CC
80    YPL081W S000006002 GO:0005737      IEA       CC
81    YPL081W S000006002 GO:0005840      IEA       CC
82    YPL081W S000006002 GO:0006364      IEA       BP
83    YPL081W S000006002 GO:0006412      IEA       BP
84    YPL081W S000006002 GO:0015935      IEA       CC
85    YPL081W S000006002 GO:0019843      IDA       MF
86    YPL081W S000006002 GO:0019843      IEA       MF
87    YPL081W S000006002 GO:0019843      IMP       MF
88    YPL081W S000006002 GO:0022627      IDA       CC
89    YPL081W S000006002 GO:0030529      IEA       CC
90    YPL081W S000006002 GO:0030686      IDA       CC
91    YPL081W S000006002 GO:0032040      IDA       CC
92    YPL081W S000006002 GO:0042254      IEA       BP
93    YPL081W S000006002 GO:0045903      IBA       BP
94    YDR204W S000002612 GO:0003674       ND       MF
95    YDR204W S000002612 GO:0005739      IDA       CC
96    YDR204W S000002612 GO:0005739      IEA       CC
97    YDR204W S000002612 GO:0005743      IDA       CC
98    YDR204W S000002612 GO:0005743      IEA       CC
99    YDR204W S000002612 GO:0006744      IEA       BP
100   YDR204W S000002612 GO:0006744      IMP       BP
101   YDR204W S000002612 GO:0016020      IEA       CC
102   YAR009C S000000067 GO:0000943      ISS       CC
103   YAR009C S000000067 GO:0003676      IEA       MF
104   YAR009C S000000067 GO:0003677      IEA       MF
105   YAR009C S000000067 GO:0003723      IEA       MF
106   YAR009C S000000067 GO:0003723      ISS       MF
107   YAR009C S000000067 GO:0003824      IEA       MF
108   YAR009C S000000067 GO:0003887      IEA       MF
109   YAR009C S000000067 GO:0003887      ISS       MF
110   YAR009C S000000067 GO:0003964      IEA       MF
111   YAR009C S000000067 GO:0003964      ISS       MF
112   YAR009C S000000067 GO:0004518      IEA       MF
113   YAR009C S000000067 GO:0004519      IEA       MF
114   YAR009C S000000067 GO:0004523      IEA       MF
115   YAR009C S000000067 GO:0004540      ISS       MF
116   YAR009C S000000067 GO:0005634      IDA       CC
117   YAR009C S000000067 GO:0005634      IEA       CC
118   YAR009C S000000067 GO:0005737      IDA       CC
119   YAR009C S000000067 GO:0005737      IEA       CC
120   YAR009C S000000067 GO:0006278      IEA       BP
121   YAR009C S000000067 GO:0006310      IEA       BP
122   YAR009C S000000067 GO:0006508      IEA       BP
123   YAR009C S000000067 GO:0008152      IEA       BP
124   YAR009C S000000067 GO:0008233      ISS       MF
125   YAR009C S000000067 GO:0015074      IEA       BP
126   YAR009C S000000067 GO:0016740      IEA       MF
127   YAR009C S000000067 GO:0016779      IEA       MF
128   YAR009C S000000067 GO:0016787      IEA       MF
129   YAR009C S000000067 GO:0032196      IEA       BP
130   YAR009C S000000067 GO:0032197      ISS       BP
131   YAR009C S000000067 GO:0046872      IEA       MF
132   YAR009C S000000067 GO:0071897      IEA       BP
133   YAR009C S000000067 GO:0090305      IEA       BP
134   YAR009C S000000067 GO:0090501      IEA       BP
135   YAR009C S000000067 GO:0090502      IEA       BP
136   YHR167W S000001210 GO:0000445      IMP       CC
137   YHR167W S000001210 GO:0000445      IPI       CC
138   YHR167W S000001210 GO:0000446      IEA       CC
139   YHR167W S000001210 GO:0000446      IMP       CC
140   YHR167W S000001210 GO:0000446      IPI       CC
141   YHR167W S000001210 GO:0000723      IMP       BP
142   YHR167W S000001210 GO:0003676      IDA       MF
143   YHR167W S000001210 GO:0005634      IEA       CC
144   YHR167W S000001210 GO:0006310      IMP       BP
145   YHR167W S000001210 GO:0006351      IEA       BP
146   YHR167W S000001210 GO:0006355      IEA       BP
147   YHR167W S000001210 GO:0006368      IEA       BP
148   YHR167W S000001210 GO:0006368      IMP       BP
149   YHR167W S000001210 GO:0006406      IEA       BP
150   YHR167W S000001210 GO:0006406      IMP       BP
151 YLR390W-A S000006429 GO:0005199      IPI       MF
152 YLR390W-A S000006429 GO:0005576      IEA       CC
153 YLR390W-A S000006429 GO:0005618      IEA       CC
154 YLR390W-A S000006429 GO:0005739      IDA       CC
155 YLR390W-A S000006429 GO:0009277      IDA       CC
156 YLR390W-A S000006429 GO:0016020      IEA       CC
157 YLR390W-A S000006429 GO:0031225      IEA       CC
158 YLR390W-A S000006429 GO:0031505      IMP       BP
159 YLR390W-A S000006429 GO:0031505      ISS       BP
160 YLR390W-A S000006429 GO:0071944      IDA       CC
161   YLR421C S000004413 GO:0000502      IEA       CC
162   YLR421C S000004413 GO:0005634      IEA       CC
163   YLR421C S000004413 GO:0005737      IEA       CC
164   YLR421C S000004413 GO:0006511      IMP       BP
165   YLR421C S000004413 GO:0008541      IDA       CC
166   YLR421C S000004413 GO:0010950      IEA       BP
167   YLR421C S000004413 GO:0034515      IDA       CC
168   YLR421C S000004413 GO:0043130      IDA       MF
169   YLR421C S000004413 GO:0061133      IBA       MF
170   YLR421C S000004413 GO:0070628      IBA       MF
171   YPR089W S000006293 GO:0003674       ND       MF
172   YPR089W S000006293 GO:0005575       ND       CC
173   YPR089W S000006293 GO:0005794      IEA       CC
174   YPR089W S000006293 GO:0008150       ND       BP
175 YPL249C-A S000006438 GO:0002181      IDA       BP
176 YPL249C-A S000006438 GO:0003723      IDA       MF
177 YPL249C-A S000006438 GO:0003735      IDA       MF
178 YPL249C-A S000006438 GO:0003735      IEA       MF
179 YPL249C-A S000006438 GO:0005622      IEA       CC
180 YPL249C-A S000006438 GO:0005737      IEA       CC
181 YPL249C-A S000006438 GO:0005840      IEA       CC
182 YPL249C-A S000006438 GO:0006412      IEA       BP
183 YPL249C-A S000006438 GO:0022625      IDA       CC
184 YPL249C-A S000006438 GO:0030529      IEA       CC
185 YPL183W-A S000007224 GO:0003735      IEA       MF
186 YPL183W-A S000007224 GO:0003735      ISA       MF
187 YPL183W-A S000007224 GO:0005622      IEA       CC
188 YPL183W-A S000007224 GO:0005739      IEA       CC
189 YPL183W-A S000007224 GO:0005762      ISA       CC
190 YPL183W-A S000007224 GO:0005840      IEA       CC
191 YPL183W-A S000007224 GO:0006412      IEA       BP
192 YPL183W-A S000007224 GO:0030529      IEA       CC
193 YPL183W-A S000007224 GO:0032543      ISA       BP
194 YPL183W-A S000007224 GO:0042254      IGI       BP
195 YPL183W-A S000007224 GO:0042254      IMP       BP
196 YOR298C-A S000007253 GO:0003677      IEA       MF
197 YOR298C-A S000007253 GO:0003713      IDA       MF
198 YOR298C-A S000007253 GO:0005634       IC       CC
199 YOR298C-A S000007253 GO:0005634      IEA       CC
200 YOR298C-A S000007253 GO:0005737      IEA       CC
 [ reached getOption("max.print") -- omitted 93 rows ]

Couldn't identify where the error occurs....................

> sessionInfo()
R version 3.4.4 (2018-03-15)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 18.04.1 LTS

Matrix products: default
BLAS: /usr/lib/x86_64-linux-gnu/blas/
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/

 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_IN.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_IN.UTF-8    LC_MESSAGES=en_US.UTF-8    LC_PAPER=en_IN.UTF-8       LC_NAME=C                 

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

other attached packages:
 [1] rvcheck_0.1.3        org.Sc.sgd.db_3.5.0   AnnotationDbi_1.40.0 IRanges_2.12.0       S4Vectors_0.16.0    
 [7] Biobase_2.38.0       BiocGenerics_0.24.0  BiocInstaller_1.28.0 GOSemSim_2.9.0       igraph_1.2.2         readr_1.3.1         
[13] Matrix_1.2-15       

loaded via a namespace (and not attached):
 [1] tidyselect_0.2.5   purrr_0.2.5        lattice_0.20-38    colorspace_1.3-2   utf8_1.1.4         blob_1.1.1        
 [7] rlang_0.3.0.1      pillar_1.3.1       glue_1.3.0         withr_2.1.2        DBI_1.0.0          bit64_0.9-7       
[13] bindrcpp_0.2.2     bindr_0.1.1        plyr_1.8.4         MatrixModels_0.4-1 munsell_0.5.0      gtable_0.2.0      
[19] devtools_2.0.1     memoise_1.1.0      knitr_1.21         curl_3.2           fansi_0.4.0        Rcpp_1.0.0        
[25] scales_1.0.0       bit_1.1-14         ggplot2_3.1.0      hms_0.4.2          digest_0.6.18      dplyr_0.7.8       
[31] grid_3.4.4         cli_1.0.1          tools_3.4.4        magrittr_1.5       lazyeval_0.2.1     tibble_1.4.2      
[37] RSQLite_2.1.1      GO.db_3.5.0        crayon_1.3.4       pkgconfig_2.0.2    assertthat_0.2.0   httr_1.4.0        
[43] rstudioapi_0.8     R6_2.3.0           compiler_3.4.4     git2r_0.23.0    
gosemsim mgenesim • 510 views
Entering edit mode

pls provide `k` to make your code reproducible.


Login before adding your answer.

Traffic: 496 users visited in the last hour
Help About
Access RSS

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

Powered by the version 2.3.6