dputhier / scigenex

This repository stores the scigenex R library.
Other
4 stars 2 forks source link

EnrichGo test not passing #84

Closed dputhier closed 1 year ago

dputhier commented 1 year ago

I think this is probably du to the fact that we are not using the same version of org.Mm.eg.db and org.Hs.eg.db. I'm using 3.16. What about you ? Denis

>>> Testing package
ℹ Testing scigenex

✔ | F W S  OK | Context
✔ |        30 | test.ClusterSet-class [0.2s]
✔ |         7 | test.create_3_rnd_clust
✔ |         7 | test.create_4_rnd_clust
✔ |         3 | test.create_rand_str
✔ |       120 | test.dbf [134.6s]
✖ | 66      93 | test.enrich_go [199.2s]
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Failure (test.enrich_go.R:31): Check message printed by enrich_go()
msg[4] not equal to "Number of gene names converted to EntrezId : 20".
1/1 mismatches
x[1]: "\t|--Number of gene names converted to EntrezId : 20"
y[1]: "Number of gene names converted to EntrezId : 20"

Failure (test.enrich_go.R:32): Check message printed by enrich_go()
msg[5] not equal to "Number of gene names not converted to EntrezId : 3 ".
1/1 mismatches
x[1]: "\t|--Number of gene names not converted to EntrezId : 3"
y[1]: "Number of gene names not converted to EntrezId : 3 "

Failure (test.enrich_go.R:34): Check message printed by enrich_go()
msg[6] not equal to "|-- INFO :  Enrichment analysis for cluster 2 ".
1/1 mismatches
x[1]: "\t|-- Calling enrichGO. "
y[1]: "|-- INFO :  Enrichment analysis for cluster 2 "

Failure (test.enrich_go.R:35): Check message printed by enrich_go()
msg[7] not equal to "|-- DEBUG :  Cluster 2".
1/1 mismatches
x[1]: "|-- INFO :  Enrichment analysis for cluster 2 "
y[1]: "|-- DEBUG :  Cluster 2"

Failure (test.enrich_go.R:36): Check message printed by enrich_go()
msg[8] not equal to "Number of gene names converted to EntrezId : 5".
1/1 mismatches
x[1]: "|-- DEBUG :  Cluster 2"
y[1]: "Number of gene names converted to EntrezId : 5"

Failure (test.enrich_go.R:37): Check message printed by enrich_go()
msg[9] not equal to "Number of gene names not converted to EntrezId : 0 ".
1/1 mismatches
x[1]: "\t|--Number of gene names converted to EntrezId : 5"
y[1]: "Number of gene names not converted to EntrezId : 0 "

Failure (test.enrich_go.R:39): Check message printed by enrich_go()
msg[10] not equal to "|-- INFO :  Enrichment analysis for cluster 3 ".
1/1 mismatches
x[1]: "\t|--Number of gene names not converted to EntrezId : 0"
y[1]: "|-- INFO :  Enrichment analysis for cluster 3 "

Failure (test.enrich_go.R:40): Check message printed by enrich_go()
msg[11] not equal to "|-- DEBUG :  Cluster 3".
1/1 mismatches
x[1]: "\t|-- Calling enrichGO. "
y[1]: "|-- DEBUG :  Cluster 3"

Failure (test.enrich_go.R:41): Check message printed by enrich_go()
msg[12] not equal to "Number of gene names converted to EntrezId : 3".
1/1 mismatches
x[1]: "|-- INFO :  Enrichment analysis for cluster 3 "
y[1]: "Number of gene names converted to EntrezId : 3"

Failure (test.enrich_go.R:42): Check message printed by enrich_go()
msg[13] not equal to "Number of gene names not converted to EntrezId : 0 ".
1/1 mismatches
x[1]: "|-- DEBUG :  Cluster 3"
y[1]: "Number of gene names not converted to EntrezId : 0 "

Failure (test.enrich_go.R:76): Check if enrich_go results with all ontologies
length(res_enrich@gene_cluster_annotations$`1`@geneSets) not equal to 1219.
1/1 mismatches
[1] 1119 - 1219 == -100

Failure (test.enrich_go.R:80): Check if enrich_go results with all ontologies
res_enrich@gene_cluster_annotations$`1`@result$Description[1:10] not equal to c(...).
8/10 mismatches
x[2]: "blood coagulation"
y[2]: "platelet degranulation"

x[3]: "coagulation"
y[3]: "blood coagulation"

x[5]: "regulation of body fluid levels"
y[5]: "coagulation"

x[6]: "wound healing"
y[6]: "platelet aggregation"

x[7]: "cellular component assembly involved in morphogenesis"
y[7]: "regulation of megakaryocyte differentiation"

Failure (test.enrich_go.R:95): Check if enrich_go results with all ontologies
res_enrich@gene_cluster_annotations$`1`@result$ONTOLOGY not equal to c(...).
Lengths differ: 15 is not 16

Failure (test.enrich_go.R:99): Check if enrich_go results with all ontologies
res_enrich@gene_cluster_annotations$`1`@result$GeneRatio not equal to c(...).
Lengths differ: 15 is not 16

Failure (test.enrich_go.R:107): Check if enrich_go results with all ontologies
round(...) not equal to 1e-04.
1/1 mismatches
[1] 9e-04 - 1e-04 == 8e-04

Failure (test.enrich_go.R:110): Check if enrich_go results with all ontologies
round(...) not equal to 0.0019.
1/1 mismatches
[1] 0.0134 - 0.0019 == 0.0115

Failure (test.enrich_go.R:113): Check if enrich_go results with all ontologies
round(...) not equal to 2e-04.
1/1 mismatches
[1] 0.0016 - 2e-04 == 0.0014

Failure (test.enrich_go.R:117): Check if enrich_go results with all ontologies
round(...) not equal to 7e-04.
1/1 mismatches
[1] 9e-04 - 7e-04 == 2e-04

Failure (test.enrich_go.R:120): Check if enrich_go results with all ontologies
round(...) not equal to 0.0051.
1/1 mismatches
[1] 0.0121 - 0.0051 == 0.007

Failure (test.enrich_go.R:123): Check if enrich_go results with all ontologies
round(...) not equal to 0.0808.
1/1 mismatches
[1] 0.181 - 0.0808 == 0.1

Failure (test.enrich_go.R:126): Check if enrich_go results with all ontologies
round(...) not equal to 0.0091.
1/1 mismatches
[1] 0.0187 - 0.0091 == 0.0096

Failure (test.enrich_go.R:130): Check if enrich_go results with all ontologies
res_enrich@gene_cluster_annotations$`1`@result$geneID not equal to c(...).
Lengths differ: 15 is not 16

Failure (test.enrich_go.R:141): Check if enrich_go results with all ontologies
unique(res_enrich@gene_cluster_annotations$`1`@result$Count) not equal to c(6, 5, 3, 4).
3/4 mismatches (average diff: 2)
[1] 5 - 6 == -1
[2] 3 - 5 == -2
[3] 6 - 3 ==  3

Failure (test.enrich_go.R:145): Check if enrich_go results with all ontologies
sum(res_enrich@gene_cluster_annotations$`1`@result$Count) not equal to 70.
1/1 mismatches
[1] 63 - 70 == -7

Failure (test.enrich_go.R:161): Check if enrich_go results with all ontologies
length(res_enrich@gene_cluster_annotations$`2`@geneSets) not equal to 130.
1/1 mismatches
[1] 127 - 130 == -3

Failure (test.enrich_go.R:193): Check if enrich_go results with all ontologies
round(...) not equal to 0.0055.
1/1 mismatches
[1] 0.0056 - 0.0055 == 1e-04

Failure (test.enrich_go.R:196): Check if enrich_go results with all ontologies
round(...) not equal to 0.0383.
1/1 mismatches
[1] 0.0394 - 0.0383 == 0.0011

Failure (test.enrich_go.R:199): Check if enrich_go results with all ontologies
round(...) not equal to 0.0041.
1/1 mismatches
[1] 0.0045 - 0.0041 == 4e-04

Failure (test.enrich_go.R:203): Check if enrich_go results with all ontologies
round(...) not equal to 0.015.
1/1 mismatches
[1] 0.0169 - 0.015 == 0.0019

Failure (test.enrich_go.R:206): Check if enrich_go results with all ontologies
round(...) not equal to 0.0193.
1/1 mismatches
[1] 0.0201 - 0.0193 == 8e-04

Failure (test.enrich_go.R:209): Check if enrich_go results with all ontologies
round(...) not equal to 0.1351.
1/1 mismatches
[1] 0.141 - 0.135 == 0.0057

Failure (test.enrich_go.R:212): Check if enrich_go results with all ontologies
round(...) not equal to 0.0064.
1/1 mismatches
[1] 0.0076 - 0.0064 == 0.0012

Failure (test.enrich_go.R:237): Check if enrich_go results with all ontologies
length(res_enrich@gene_cluster_annotations$`3`@geneSets) not equal to 315.
1/1 mismatches
[1] 300 - 315 == -15

Failure (test.enrich_go.R:241): Check if enrich_go results with all ontologies
res_enrich@gene_cluster_annotations$`3`@result$Description[1:10] not equal to c(...).
4/10 mismatches
x[1]: "regulation of matrix metallopeptidase secretion"
y[1]: "negative regulation of macrophage migration"

x[2]: "matrix metallopeptidase secretion"
y[2]: "regulation of matrix metallopeptidase secretion"

x[3]: "negative regulation of macrophage migration"
y[3]: "matrix metallopeptidase secretion"

x[10]: "regulation of transforming growth factor beta production"
y[10]: "T cell homeostasis"

Failure (test.enrich_go.R:259): Check if enrich_go results with all ontologies
res_enrich@gene_cluster_annotations$`3`@result$ONTOLOGY not equal to c(...).
Lengths differ: 33 is not 35

Failure (test.enrich_go.R:265): Check if enrich_go results with all ontologies
res_enrich@gene_cluster_annotations$`3`@result$GeneRatio not equal to c(...).
Lengths differ: 33 is not 35

Failure (test.enrich_go.R:272): Check if enrich_go results with all ontologies
round(...) not equal to 0.007.
1/1 mismatches
[1] 0.0078 - 0.007 == 8e-04

Failure (test.enrich_go.R:275): Check if enrich_go results with all ontologies
round(...) not equal to 0.0077.
1/1 mismatches
[1] 0.0083 - 0.0077 == 6e-04

Failure (test.enrich_go.R:278): Check if enrich_go results with all ontologies
round(...) not equal to 0.2699.
1/1 mismatches
[1] 0.275 - 0.27 == 0.0047

Failure (test.enrich_go.R:281): Check if enrich_go results with all ontologies
round(...) not equal to 0.0049.
1/1 mismatches
[1] 0.0058 - 0.0049 == 9e-04

Failure (test.enrich_go.R:285): Check if enrich_go results with all ontologies
round(...) not equal to 0.0412.
1/1 mismatches
[1] 0.0439 - 0.0412 == 0.0027

Failure (test.enrich_go.R:288): Check if enrich_go results with all ontologies
round(...) not equal to 0.0371.
1/1 mismatches
[1] 0.038 - 0.0371 == 9e-04

Failure (test.enrich_go.R:291): Check if enrich_go results with all ontologies
round(...) not equal to 1.297.
1/1 mismatches
[1] 1.25 - 1.3 == -0.0427

Failure (test.enrich_go.R:294): Check if enrich_go results with all ontologies
round(...) not equal to 0.0102.
1/1 mismatches
[1] 0.0106 - 0.0102 == 4e-04

Failure (test.enrich_go.R:298): Check if enrich_go results with all ontologies
res_enrich@gene_cluster_annotations$`3`@result$geneID not equal to c(...).
Lengths differ: 33 is not 35

Failure (test.enrich_go.R:308): Check if enrich_go results with all ontologies
sum(res_enrich@gene_cluster_annotations$`3`@result$Count) not equal to 35.
1/1 mismatches
[1] 33 - 35 == -2

Failure (test.enrich_go.R:329): Check if enrich_go results with all ontologies
round(sum(plot_res_enrich[[1]]$data$GeneRatio), 4) not equal to 3.6395.
1/1 mismatches
[1] 3.24 - 3.64 == -0.403

Failure (test.enrich_go.R:330): Check if enrich_go results with all ontologies
round(mean(plot_res_enrich[[1]]$data$GeneRatio), 4) not equal to 0.2275.
1/1 mismatches
[1] 0.216 - 0.228 == -0.0117

Failure (test.enrich_go.R:331): Check if enrich_go results with all ontologies
round(median(plot_res_enrich[[1]]$data$GeneRatio), 4) not equal to 0.2105.
1/1 mismatches
[1] 0.25 - 0.21 == 0.0395

Failure (test.enrich_go.R:332): Check if enrich_go results with all ontologies
round(sd(plot_res_enrich[[1]]$data$GeneRatio), 4) not equal to 0.0685.
1/1 mismatches
[1] 0.0579 - 0.0685 == -0.0106

Failure (test.enrich_go.R:363): Check if enrich_go results with all ontologies
round(sum(plot_res_enrich[[4]]$data$GeneRatio), 4) not equal to 3.6395.
1/1 mismatches
[1] 3.24 - 3.64 == -0.403

Failure (test.enrich_go.R:364): Check if enrich_go results with all ontologies
round(mean(plot_res_enrich[[4]]$data$GeneRatio), 4) not equal to 0.2275.
1/1 mismatches
[1] 0.216 - 0.228 == -0.0117

Failure (test.enrich_go.R:365): Check if enrich_go results with all ontologies
round(median(plot_res_enrich[[4]]$data$GeneRatio), 4) not equal to 0.2105.
1/1 mismatches
[1] 0.25 - 0.21 == 0.0395

Failure (test.enrich_go.R:366): Check if enrich_go results with all ontologies
round(sd(plot_res_enrich[[4]]$data$GeneRatio), 4) not equal to 0.0685.
1/1 mismatches
[1] 0.0579 - 0.0685 == -0.0106

Failure (test.enrich_go.R:414): Check if enrich_go results with all ontologies
nrow(...) not equal to 10.
1/1 mismatches
[1] 7 - 10 == -3

Failure (test.enrich_go.R:420): Check if enrich_go results with all ontologies
nrow(...) not equal to 4.
1/1 mismatches
[1] 8 - 4 == 4

Failure (test.enrich_go.R:438):
sort(unique(res_enrich@gene_cluster_annotations$`1`@result$Count)) not equal to seq(1, 6).
Lengths differ: 4 is not 6

Failure (test.enrich_go.R:441):
sum(res_enrich@gene_cluster_annotations$`1`@result$Count) not equal to 553.
1/1 mismatches
[1] 494 - 553 == -59

Failure (test.enrich_go.R:443):
length(res_enrich@gene_cluster_annotations$`1`@result$Description) not equal to 465.
1/1 mismatches
[1] 426 - 465 == -39

Failure (test.enrich_go.R:449):
res_enrich@gene_cluster_annotations$`1`@result$Description[1:10] not equal to c(...).
8/10 mismatches
x[2]: "blood coagulation"
y[2]: "platelet degranulation"

x[3]: "coagulation"
y[3]: "blood coagulation"

x[5]: "regulation of body fluid levels"
y[5]: "coagulation"

x[6]: "wound healing"
y[6]: "platelet aggregation"

x[7]: "cellular component assembly involved in morphogenesis"
y[7]: "regulation of megakaryocyte differentiation"

Failure (test.enrich_go.R:468):
sum(res_enrich@gene_cluster_annotations$`2`@result$Count) not equal to 12.
1/1 mismatches
[1] 10 - 12 == -2

Failure (test.enrich_go.R:470):
length(res_enrich@gene_cluster_annotations$`2`@result$Description) not equal to 12.
1/1 mismatches
[1] 10 - 12 == -2

Failure (test.enrich_go.R:476):
res_enrich@gene_cluster_annotations$`2`@result$Description[1:10] not equal to c(...).
6/10 mismatches
x[5]: "hexose metabolic process"
y[5]: "Fc-epsilon receptor signaling pathway"

x[6]: "glycosylation"
y[6]: "adenylate cyclase-modulating G protein-coupled receptor signaling pathway"

x[7]: "monosaccharide metabolic process"
y[7]: "Fc receptor signaling pathway"

x[8]: "adenylate cyclase-modulating G protein-coupled receptor signaling pathway"
y[8]: "hexose metabolic process"

x[9]: "positive regulation of GTPase activity"
y[9]: "glycosylation"

Failure (test.enrich_go.R:501):
sum(res_enrich@gene_cluster_annotations$`3`@result$Count) not equal to 96.
1/1 mismatches
[1] 95 - 96 == -1

Failure (test.enrich_go.R:503):
length(res_enrich@gene_cluster_annotations$`3`@result$Description) not equal to 96.
1/1 mismatches
[1] 95 - 96 == -1

Failure (test.enrich_go.R:509):
res_enrich@gene_cluster_annotations$`3`@result$Description[1:10] not equal to c(...).
4/10 mismatches
x[1]: "regulation of matrix metallopeptidase secretion"
y[1]: "negative regulation of macrophage migration"

x[2]: "matrix metallopeptidase secretion"
y[2]: "regulation of matrix metallopeptidase secretion"

x[3]: "negative regulation of macrophage migration"
y[3]: "matrix metallopeptidase secretion"

x[10]: "regulation of transforming growth factor beta production"
y[10]: "T cell homeostasis"
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Maximum number of failures exceeded; quitting at end of file.
ℹ Increase this number with (e.g.) `testthat::set_max_fails(Inf)`

══ Results ═══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
Duration: 335.0 s

[ FAIL 66 | WARN 0 | SKIP 0 | PASS 260 ]
JulieBvs commented 1 year ago

I'm using the 3.13

dputhier commented 1 year ago

That's it. I will try to change to test so that the expected results are in a range.

dputhier commented 1 year ago

Fixed in f8e40b40f90f9648a0b29a2ac5dda27d0d7ca63f