8
8
9
9
from malariagen_data import ag3 as _ag3
10
10
from 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
+ )
11
17
12
18
13
19
@pytest .fixture
@@ -70,9 +76,8 @@ def check_hap_frequencies(*, api, df, sample_sets, cohorts, min_cohort_size):
70
76
cohort_counts = df_samples [cohort_column ].value_counts ()
71
77
cohort_labels = cohort_counts [cohort_counts >= min_cohort_size ].index .to_list ()
72
78
73
- universal_fields = ["label" ]
74
79
frq_fields = ["frq_" + s for s in cohort_labels ] + ["max_af" ]
75
- expected_fields = universal_fields + frq_fields
80
+ expected_fields = frq_fields
76
81
assert sorted (df .columns .tolist ()) == sorted (expected_fields )
77
82
78
83
@@ -82,9 +87,9 @@ def check_hap_frequencies_advanced(
82
87
ds ,
83
88
):
84
89
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 )
88
93
# test_plot_frequencies_interactive_map(api, ds)
89
94
assert set (ds .dims ) == {"cohorts" , "variants" }
90
95
@@ -158,7 +163,7 @@ def test_hap_frequencies_with_str_cohorts(
158
163
# Run the function under test.
159
164
df_hap = api .haplotypes_frequencies (** params )
160
165
161
- # test_plot_frequencies_heatmap(api, df_hap)
166
+ test_plot_frequencies_heatmap (api , df_hap )
162
167
163
168
# Standard checks.
164
169
check_hap_frequencies (
0 commit comments