Browse code

- require annotation packages before getting the objects.

git-svn-id: file:///home/git/hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/rTRM@87434 bc3139a8-67e5-0310-9ffc-ced21a209358

D Diez authored on 14/03/2014 06:48:12
Showing 1 changed files

... ...
@@ -17,8 +17,12 @@ initBiomart = function(filter, biomart = "ensembl", host) {
17 17
 
18 18
 .getMapFromOrg = function(org) {#, map = "SYMBOL") {
19 19
 	switch(org,
20
-    human = get("org.Hs.eg.db"),
21
-    mouse = get("org.Mm.eg.db")
20
+    human = {
21
+      if(require(org.Hs.eg.db)) get("org.Hs.eg.db")
22
+    },
23
+    mouse = {
24
+      if(require(org.Mm.eg.db)) get("org.Mm.eg.db")
25
+    }
22 26
 	)
23 27
 }
24 28