88
99from malariagen_data import ag3 as _ag3
1010from malariagen_data .anoph .hap_frq import AnophelesHapFrequencyAnalysis
11+ from .test_frq import (
12+ test_plot_frequencies_heatmap ,
13+ test_plot_frequencies_time_series ,
14+ test_plot_frequencies_time_series_with_taxa ,
15+ test_plot_frequencies_time_series_with_areas ,
16+ )
1117
1218
1319@pytest .fixture
@@ -70,9 +76,8 @@ def check_hap_frequencies(*, api, df, sample_sets, cohorts, min_cohort_size):
7076 cohort_counts = df_samples [cohort_column ].value_counts ()
7177 cohort_labels = cohort_counts [cohort_counts >= min_cohort_size ].index .to_list ()
7278
73- universal_fields = ["label" ]
7479 frq_fields = ["frq_" + s for s in cohort_labels ] + ["max_af" ]
75- expected_fields = universal_fields + frq_fields
80+ expected_fields = frq_fields
7681 assert sorted (df .columns .tolist ()) == sorted (expected_fields )
7782
7883
@@ -82,9 +87,9 @@ def check_hap_frequencies_advanced(
8287 ds ,
8388):
8489 assert isinstance (ds , xr .Dataset )
85- # test_plot_frequencies_time_series(api, ds)
86- # test_plot_frequencies_time_series_with_taxa(api, ds)
87- # test_plot_frequencies_time_series_with_areas(api, ds)
90+ test_plot_frequencies_time_series (api , ds )
91+ test_plot_frequencies_time_series_with_taxa (api , ds )
92+ test_plot_frequencies_time_series_with_areas (api , ds )
8893 # test_plot_frequencies_interactive_map(api, ds)
8994 assert set (ds .dims ) == {"cohorts" , "variants" }
9095
@@ -158,7 +163,7 @@ def test_hap_frequencies_with_str_cohorts(
158163 # Run the function under test.
159164 df_hap = api .haplotypes_frequencies (** params )
160165
161- # test_plot_frequencies_heatmap(api, df_hap)
166+ test_plot_frequencies_heatmap (api , df_hap )
162167
163168 # Standard checks.
164169 check_hap_frequencies (
0 commit comments