Skip to content

Commit

Permalink
fixed unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
davidsebfischer committed Mar 28, 2019
1 parent ca27acd commit 6eac8e6
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions diffxpy/unit_test/test_vsrest.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import pandas as pd
import scipy.stats as stats

from batchglm.api.models.glm_nb import Simulator
import diffxpy.api as de


Expand All @@ -23,6 +22,7 @@ def test_null_distribution_wald(self, n_cells: int = 2000, n_genes: int = 100, n
logging.getLogger("tensorflow").setLevel(logging.ERROR)
logging.getLogger("batchglm").setLevel(logging.WARNING)
logging.getLogger("diffxpy").setLevel(logging.WARNING)
from batchglm.api.models.glm_nb import Simulator

sim = Simulator(num_observations=n_cells, num_features=n_genes)
sim.generate_sample_description(num_batches=0, num_conditions=0)
Expand Down Expand Up @@ -65,6 +65,7 @@ def test_null_distribution_lrt(self, n_cells: int = 2000, n_genes: int = 100):
logging.getLogger("tensorflow").setLevel(logging.ERROR)
logging.getLogger("batchglm").setLevel(logging.WARNING)
logging.getLogger("diffxpy").setLevel(logging.WARNING)
from batchglm.api.models.glm_nb import Simulator

sim = Simulator(num_observations=n_cells, num_features=n_genes)
sim.generate_sample_description(num_batches=0, num_conditions=0)
Expand Down Expand Up @@ -107,6 +108,7 @@ def test_null_distribution_wilcoxon(self, n_cells: int = 2000, n_genes: int = 10
logging.getLogger("tensorflow").setLevel(logging.ERROR)
logging.getLogger("batchglm").setLevel(logging.WARNING)
logging.getLogger("diffxpy").setLevel(logging.WARNING)
from batchglm.api.models.glm_nb import Simulator

sim = Simulator(num_observations=n_cells, num_features=n_genes)
sim.generate_sample_description(num_batches=0, num_conditions=0)
Expand All @@ -133,7 +135,7 @@ def test_null_distribution_wilcoxon(self, n_cells: int = 2000, n_genes: int = 10

return True

def test_null_distribution_ttest(self, n_cells: int = 2000, n_genes: int = 10000, n_groups: int = 2):
def test_null_distribution_ttest(self, n_cells: int = 2000, n_genes: int = 100, n_groups: int = 2):
"""
Test if de.test_wald_loc() generates a uniform p-value distribution
if it is given data simulated based on the null model. Returns the p-value
Expand All @@ -146,6 +148,7 @@ def test_null_distribution_ttest(self, n_cells: int = 2000, n_genes: int = 10000
logging.getLogger("tensorflow").setLevel(logging.ERROR)
logging.getLogger("batchglm").setLevel(logging.WARNING)
logging.getLogger("diffxpy").setLevel(logging.WARNING)
from batchglm.api.models.glm_norm import Simulator

sim = Simulator(num_observations=n_cells, num_features=n_genes)
sim.generate_sample_description(num_batches=0, num_conditions=0)
Expand Down

0 comments on commit 6eac8e6

Please sign in to comment.