Skip to content
Snippets Groups Projects
Commit 8084f94e authored by Bryan BRANCOTTE's avatar Bryan BRANCOTTE
Browse files

test more plots

parent 4ad0df07
No related branches found
No related tags found
No related merge requests found
...@@ -2,11 +2,9 @@ ...@@ -2,11 +2,9 @@
from __future__ import absolute_import from __future__ import absolute_import
import os, shutil, tempfile import os, shutil, tempfile
from pathlib import Path
from pandas import read_hdf from jass.models import plots
from pandas.testing import assert_frame_equal
from jass.models.plots import create_global_plot
from . import JassTestCase from . import JassTestCase
...@@ -17,9 +15,8 @@ class TestPlots(JassTestCase): ...@@ -17,9 +15,8 @@ class TestPlots(JassTestCase):
def setUp(self): def setUp(self):
# Create a temporary directory # 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.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): def tearDown(self):
# Remove the directory after the test # Remove the directory after the test
...@@ -27,10 +24,16 @@ class TestPlots(JassTestCase): ...@@ -27,10 +24,16 @@ class TestPlots(JassTestCase):
pass pass
def test_create_global_plot(self): def test_create_global_plot(self):
""" plots.create_global_plot(self.worktable_hdf_path, self.test_dir / "global_plot.png")
Compare result and expected SumStatJostTab
""" def test_create_qq_plot(self):
create_global_plot(self.worktable_hdf_path, self.global_plot_path) 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__": if __name__ == "__main__":
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment