@@ -101,22 +101,26 @@ def test_plot_haplotype_clustering(fixture, api: AnophelesHapClustAnalysis):
101101@parametrize_with_cases ("fixture,api" , cases = "." )
102102def test_plot_haplotype_sharing_arc (fixture , api : AnophelesHapClustAnalysis ):
103103 all_sample_sets = api .sample_sets ()["sample_set" ].to_list ()
104- fig = api .plot_haplotype_sharing_arc (
105- region = fixture .random_region_str (region_size = 5000 ),
106- cohort_col = "country" ,
107- sample_sets = [random .choice (all_sample_sets )],
108- show = False ,
109- )
110- assert fig is not None
104+ for metric in ["unique" , "absolute" ]:
105+ fig = api .plot_haplotype_sharing_arc (
106+ region = fixture .random_region_str (region_size = 5000 ),
107+ cohort_col = "country" ,
108+ sample_sets = [random .choice (all_sample_sets )],
109+ metric = metric ,
110+ show = False ,
111+ )
112+ assert fig is not None
111113
112114
113115@parametrize_with_cases ("fixture,api" , cases = "." )
114116def test_plot_haplotype_sharing_chord (fixture , api : AnophelesHapClustAnalysis ):
115117 all_sample_sets = api .sample_sets ()["sample_set" ].to_list ()
116- fig = api .plot_haplotype_sharing_chord (
117- region = fixture .random_region_str (region_size = 5000 ),
118- cohort_col = "country" ,
119- sample_sets = [random .choice (all_sample_sets )],
120- show = False ,
121- )
122- assert fig is not None
118+ for metric in ["unique" , "absolute" ]:
119+ fig = api .plot_haplotype_sharing_chord (
120+ region = fixture .random_region_str (region_size = 5000 ),
121+ cohort_col = "country" ,
122+ sample_sets = [random .choice (all_sample_sets )],
123+ metric = metric ,
124+ show = False ,
125+ )
126+ assert fig is not None
0 commit comments