Browse code

latest available flybase identifers no longer map FBgn029750 to ab

git-svn-id: https://hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/MotifDb@86068 bc3139a8-67e5-0310-9ffc-ced21a209358

p.shannon authored on 04/02/2014 19:30:18
Showing 1 changed files

... ...
@@ -8,7 +8,7 @@ run.tests = function (dataDir)
8 8
 {
9 9
     dataDir <- file.path(dataDir, "flyFactorSurvey")
10 10
     freshStart ()
11
-    #test.fbgnToIDs()
11
+    test.fbgnToIDs()
12 12
     x.list.BD <- test.createXrefBindingDomain (dataDir)
13 13
     x.xref <- test.createXref ()
14 14
     x.filenames <- test.getMatrixFilenames (dataDir)
... ...
@@ -234,17 +234,16 @@ test.fbgnToIDs <- function()
234 234
     checkEquals(tbl.ids$symbol, c("ro", "exd", "pdm2", "Six4", "da"))
235 235
     checkEquals(tbl.ids$geneIdType, rep("ENTREZ", 5))
236 236
 
237
-         # 0259750 is obsolete, replace by 0264442
238
-    tbl.ids <- fbgnToIDs("FBgn0259750")
239
-    checkEquals(as.list(tbl.ids),
240
-                list(flybase_id="FBgn0264442", symbol="ab", gene_id="34560",
241
-                     geneIdType="ENTREZ"))
237
+         # 0259750 is obsolete, replaced by 0264442
238
+    x <- "FBgn0259750"
239
+    tbl.ids <- fbgnToIDs(x)
240
+    checkEquals(as.character(tbl.ids[1,]), c(rep(x,3), "FLYBASE"))
242 241
 
243 242
        # http://flybase.org/static_pages/downloads/IDConv.html
244 243
        # FBgn0003986 	 FBgn0261930 	FBgn0261930	 vnd 
245
-    tbl.ids <- fbgnToIDs("FBgn0003986")
246
-    checkEquals(as.character(as.list(tbl.ids[1,],)),
247
-                c(rep("FBgn0003986", 3), "FLYBASE"))
244
+    x <- "FBgn0003986"
245
+    tbl.ids <- fbgnToIDs(x)
246
+    checkEquals(as.character(tbl.ids[1,]), c(rep(x, 3), "FLYBASE"))
248 247
     
249 248
     serializedFbgnsForTesting <- system.file(package="MotifDb", "scripts",
250 249
                                              "import", "fbgns.RData")
... ...
@@ -260,7 +259,7 @@ test.fbgnToIDs <- function()
260 259
        # what percentage of the 326 ids fail to map?  do NOT convert NAs
261 260
     tbl.ids <- fbgnToIDs(fbgns, useInputForMissingValues=FALSE)
262 261
     failure.count <- length(which(is.na(tbl.ids$flybase_id)))
263
-    checkEquals(failure.count, 18)
262
+    checkEquals(failure.count, 23)   # as of (3 feb 2014)
264 263
 
265 264
 } # test.fbgnToIDsp
266 265
 #-------------------------------------------------------------------------------