Browse code

updated test.geneIdsAndTypes to comport with new entrez geneIDs discovered for flyFactorSurvey

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

p.shannon authored on 09/04/2013 23:53:54
Showing 1 changed files

... ...
@@ -150,15 +150,14 @@ test.geneSymbols = function ()
150 150
 test.geneIdsAndTypes = function ()
151 151
 {
152 152
   print ('--- test.getGeneIdsAndTypes')
153
-  mdb = MotifDb # ()
153
+  mdb = MotifDb
154 154
   geneIds = values (mdb)$geneId
155 155
   geneIdTypes = values (mdb)$geneIdType
156
-  tbl.types = as.data.frame (table (geneIdTypes, useNA='always'), stringsAsFactors=FALSE)
157
-  checkEquals (sort (tbl.types$geneIdTypes), sort (c ('comment', 'ENTREZ', 'FLYBASE', 'SGD', NA)))
158
-  checkEquals (sort (tbl.types$Freq),  sort (c (683, 763, 614, 453, 256)))
156
+  typeCounts = as.list (table (geneIdTypes))
157
+  checkEquals(typeCounts, list(ENTREZ=1354, FLYBASE=30, SGD=453, comment=683))
159 158
 
160 159
   na.count = length (which (is.na (geneIds)))
161
-  checkEquals (na.count, 256)   # see geneIdTypes == NA, just above
160
+  checkEquals (na.count, 249) 
162 161
   empty.count = length (which (geneIds == ''))
163 162
   checkEquals (empty.count, 0)
164 163