Browse code

tracking down motif name equality bug

paul-shannon authored on 04/10/2017 22:07:08
Showing2 changed files

... ...
@@ -1,7 +1,7 @@
1 1
 Package: MotifDb
2 2
 Type: Package
3 3
 Title: An Annotated Collection of Protein-DNA Binding Sequence Motifs
4
-Version: 1.19.14
4
+Version: 1.19.15
5 5
 Date: 2017-10-04
6 6
 Author: Paul Shannon, Matt Richards
7 7
 Maintainer: Paul Shannon <pshannon@systemsbiology.org>
... ...
@@ -784,7 +784,18 @@ test.motifToGene <- function()
784 784
       # MotifDb mode uses the MotifDb metadata "providerId",
785 785
    tbl.mdb <- motifToGene(MotifDb, motifs, source="MotifDb")
786 786
    checkEquals(dim(tbl.mdb), c(3, 6))
787
-   checkEquals(tbl.mdb$motif, c("MA0592.2", "ELF1.SwissRegulon", "UP00022"))
787
+   expected <- sort(c("MA0592.2", "ELF1.SwissRegulon", "UP00022"))
788
+   actual <- sort(tbl.mdb$motif)
789
+
790
+   print("--- expected")
791
+   print(expected)
792
+   print(lapply(expected, charToRaw))
793
+
794
+   print("--- actual")
795
+   print(actual)
796
+   print(lapply(actual, charToRaw))
797
+
798
+   checkEquals(actual, expected)
788 799
    checkEquals(tbl.mdb$geneSymbol, c("Esrra", "ELF1", "Zfp740"))
789 800
    checkEquals(tbl.mdb$dataSource, c("jaspar2016", "SwissRegulon", "UniPROBE"))
790 801
    checkEquals(tbl.mdb$organism,   c("Mmusculus", "Hsapiens", "Mmusculus"))