44
55from malariagen_data import af1 as _af1
66from malariagen_data import ag3 as _ag3
7+ from malariagen_data import as1 as _as1
8+
79from malariagen_data .anoph .dipclust import AnophelesDipClustAnalysis
810
911
@@ -63,6 +65,24 @@ def af1_sim_api(af1_sim_fixture):
6365 )
6466
6567
68+ @pytest .fixture
69+ def as1_sim_api (as1_sim_fixture ):
70+ return AnophelesDipClustAnalysis (
71+ url = as1_sim_fixture .url ,
72+ public_url = as1_sim_fixture .url ,
73+ config_path = _as1 .CONFIG_PATH ,
74+ major_version_number = _as1 .MAJOR_VERSION_NUMBER ,
75+ major_version_path = _as1 .MAJOR_VERSION_PATH ,
76+ pre = False ,
77+ gff_gene_type = "protein_coding_gene" ,
78+ gff_gene_name_attribute = "Note" ,
79+ gff_default_attributes = ("ID" , "Parent" , "Note" , "description" ),
80+ default_site_mask = "stephensi" ,
81+ results_cache = as1_sim_fixture .results_cache_path .as_posix (),
82+ taxon_colors = _as1 .TAXON_COLORS ,
83+ )
84+
85+
6686# N.B., here we use pytest_cases to parametrize tests. Each
6787# function whose name begins with "case_" defines a set of
6888# inputs to the test functions. See the documentation for
@@ -83,6 +103,19 @@ def case_af1_sim(af1_sim_fixture, af1_sim_api):
83103 return af1_sim_fixture , af1_sim_api
84104
85105
106+ def case_as1_sim (as1_sim_fixture , as1_sim_api ):
107+ return as1_sim_fixture , as1_sim_api
108+
109+
110+ # Cases for tests that require CNV data (as1 fixture has no CNV data).
111+ def case_cnv_ag3_sim (ag3_sim_fixture , ag3_sim_api ):
112+ return ag3_sim_fixture , ag3_sim_api
113+
114+
115+ def case_cnv_af1_sim (af1_sim_fixture , af1_sim_api ):
116+ return af1_sim_fixture , af1_sim_api
117+
118+
86119@pytest .mark .parametrize ("sample_query" , [None , "sex_call == 'F'" ])
87120@pytest .mark .parametrize ("distance_metric" , ["cityblock" , "euclidean" ])
88121@parametrize_with_cases ("fixture,api" , cases = "." )
@@ -201,7 +234,7 @@ def test_plot_diplotype_clustering_advanced_with_transcript(
201234
202235
203236@pytest .mark .parametrize ("sample_query" , [None , "sex_call == 'F'" ])
204- @parametrize_with_cases ("fixture,api" , cases = "." )
237+ @parametrize_with_cases ("fixture,api" , cases = "." , prefix = "case_cnv_" )
205238def test_plot_diplotype_clustering_advanced_with_cnv_region (
206239 fixture , api : AnophelesDipClustAnalysis , sample_query
207240):
0 commit comments