diff --git a/jass/test/test_plots.py b/jass/test/test_plots.py index 64bb57e3903c8fa42ec18fb57f42c6ebee3390e9..ad0012abe26c219928e091f836c1a26e87034b9f 100644 --- a/jass/test/test_plots.py +++ b/jass/test/test_plots.py @@ -2,11 +2,9 @@ from __future__ import absolute_import import os, shutil, tempfile +from pathlib import Path -from pandas import read_hdf -from pandas.testing import assert_frame_equal - -from jass.models.plots import create_global_plot +from jass.models import plots from . import JassTestCase @@ -17,9 +15,8 @@ class TestPlots(JassTestCase): def setUp(self): # Create a temporary directory - self.test_dir = tempfile.mkdtemp() + self.test_dir = Path(tempfile.mkdtemp()) self.worktable_hdf_path = self.get_file_path_fn("worktable-withnans.hdf5") - self.global_plot_path = os.path.join(self.test_dir, "global_manhattan.png") def tearDown(self): # Remove the directory after the test @@ -27,10 +24,16 @@ class TestPlots(JassTestCase): pass def test_create_global_plot(self): - """ - Compare result and expected SumStatJostTab - """ - create_global_plot(self.worktable_hdf_path, self.global_plot_path) + plots.create_global_plot(self.worktable_hdf_path, self.test_dir / "global_plot.png") + + def test_create_qq_plot(self): + plots.create_qq_plot(self.worktable_hdf_path, self.test_dir / "qq_plot.png") + + def test_create_quadrant_plot(self): + plots.create_quadrant_plot(self.worktable_hdf_path, self.test_dir / "quadrant_plot.png") + + def test_create_qq_plot_by_GWAS(self): + plots.create_qq_plot_by_GWAS(self.worktable_hdf_path, self.test_dir) if __name__ == "__main__":