4
4
import pandas as pd
5
5
import scipy .stats as stats
6
6
7
- from batchglm .api .models .glm_nb import Simulator
8
7
import diffxpy .api as de
9
8
10
9
@@ -23,6 +22,7 @@ def test_null_distribution_wald(self, n_cells: int = 2000, n_genes: int = 100, n
23
22
logging .getLogger ("tensorflow" ).setLevel (logging .ERROR )
24
23
logging .getLogger ("batchglm" ).setLevel (logging .WARNING )
25
24
logging .getLogger ("diffxpy" ).setLevel (logging .WARNING )
25
+ from batchglm .api .models .glm_nb import Simulator
26
26
27
27
sim = Simulator (num_observations = n_cells , num_features = n_genes )
28
28
sim .generate_sample_description (num_batches = 0 , num_conditions = 0 )
@@ -65,6 +65,7 @@ def test_null_distribution_lrt(self, n_cells: int = 2000, n_genes: int = 100):
65
65
logging .getLogger ("tensorflow" ).setLevel (logging .ERROR )
66
66
logging .getLogger ("batchglm" ).setLevel (logging .WARNING )
67
67
logging .getLogger ("diffxpy" ).setLevel (logging .WARNING )
68
+ from batchglm .api .models .glm_nb import Simulator
68
69
69
70
sim = Simulator (num_observations = n_cells , num_features = n_genes )
70
71
sim .generate_sample_description (num_batches = 0 , num_conditions = 0 )
@@ -107,6 +108,7 @@ def test_null_distribution_wilcoxon(self, n_cells: int = 2000, n_genes: int = 10
107
108
logging .getLogger ("tensorflow" ).setLevel (logging .ERROR )
108
109
logging .getLogger ("batchglm" ).setLevel (logging .WARNING )
109
110
logging .getLogger ("diffxpy" ).setLevel (logging .WARNING )
111
+ from batchglm .api .models .glm_nb import Simulator
110
112
111
113
sim = Simulator (num_observations = n_cells , num_features = n_genes )
112
114
sim .generate_sample_description (num_batches = 0 , num_conditions = 0 )
@@ -133,7 +135,7 @@ def test_null_distribution_wilcoxon(self, n_cells: int = 2000, n_genes: int = 10
133
135
134
136
return True
135
137
136
- def test_null_distribution_ttest (self , n_cells : int = 2000 , n_genes : int = 10000 , n_groups : int = 2 ):
138
+ def test_null_distribution_ttest (self , n_cells : int = 2000 , n_genes : int = 100 , n_groups : int = 2 ):
137
139
"""
138
140
Test if de.test_wald_loc() generates a uniform p-value distribution
139
141
if it is given data simulated based on the null model. Returns the p-value
@@ -146,6 +148,7 @@ def test_null_distribution_ttest(self, n_cells: int = 2000, n_genes: int = 10000
146
148
logging .getLogger ("tensorflow" ).setLevel (logging .ERROR )
147
149
logging .getLogger ("batchglm" ).setLevel (logging .WARNING )
148
150
logging .getLogger ("diffxpy" ).setLevel (logging .WARNING )
151
+ from batchglm .api .models .glm_norm import Simulator
149
152
150
153
sim = Simulator (num_observations = n_cells , num_features = n_genes )
151
154
sim .generate_sample_description (num_batches = 0 , num_conditions = 0 )
0 commit comments