44import pandas as pd
55import scipy .stats as stats
66
7- from batchglm .api .models .glm_nb import Simulator
87import diffxpy .api as de
98
109
@@ -23,6 +22,7 @@ def test_null_distribution_wald(self, n_cells: int = 2000, n_genes: int = 100, n
2322 logging .getLogger ("tensorflow" ).setLevel (logging .ERROR )
2423 logging .getLogger ("batchglm" ).setLevel (logging .WARNING )
2524 logging .getLogger ("diffxpy" ).setLevel (logging .WARNING )
25+ from batchglm .api .models .glm_nb import Simulator
2626
2727 sim = Simulator (num_observations = n_cells , num_features = n_genes )
2828 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):
6565 logging .getLogger ("tensorflow" ).setLevel (logging .ERROR )
6666 logging .getLogger ("batchglm" ).setLevel (logging .WARNING )
6767 logging .getLogger ("diffxpy" ).setLevel (logging .WARNING )
68+ from batchglm .api .models .glm_nb import Simulator
6869
6970 sim = Simulator (num_observations = n_cells , num_features = n_genes )
7071 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
107108 logging .getLogger ("tensorflow" ).setLevel (logging .ERROR )
108109 logging .getLogger ("batchglm" ).setLevel (logging .WARNING )
109110 logging .getLogger ("diffxpy" ).setLevel (logging .WARNING )
111+ from batchglm .api .models .glm_nb import Simulator
110112
111113 sim = Simulator (num_observations = n_cells , num_features = n_genes )
112114 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
133135
134136 return True
135137
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 ):
137139 """
138140 Test if de.test_wald_loc() generates a uniform p-value distribution
139141 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
146148 logging .getLogger ("tensorflow" ).setLevel (logging .ERROR )
147149 logging .getLogger ("batchglm" ).setLevel (logging .WARNING )
148150 logging .getLogger ("diffxpy" ).setLevel (logging .WARNING )
151+ from batchglm .api .models .glm_norm import Simulator
149152
150153 sim = Simulator (num_observations = n_cells , num_features = n_genes )
151154 sim .generate_sample_description (num_batches = 0 , num_conditions = 0 )
0 commit comments