@@ -68,12 +68,12 @@ def __init__(
6868
6969 # Set up caches.
7070 self ._cache_snp_sites : Optional [zarr .hierarchy .Group ] = None
71- self ._cache_snp_genotypes : Dict [base_params . sample_set , zarr . hierarchy . Group ] = (
72- dict ()
73- )
74- self ._cache_site_filters : Dict [base_params . site_mask , zarr . hierarchy . Group ] = (
75- dict ()
76- )
71+ self ._cache_snp_genotypes : Dict [
72+ base_params . sample_set , zarr . hierarchy . Group
73+ ] = dict ( )
74+ self ._cache_site_filters : Dict [
75+ base_params . site_mask , zarr . hierarchy . Group
76+ ] = dict ( )
7777 self ._cache_site_annotations : Optional [zarr .hierarchy .Group ] = None
7878 self ._cache_locate_site_class : Dict [Tuple [Any , ...], np .ndarray ] = dict ()
7979
@@ -1322,10 +1322,12 @@ def _snp_allele_counts(
13221322 chunks : base_params .chunks ,
13231323 ) -> Dict [str , np .ndarray ]:
13241324 # Access SNP calls.
1325+ # N.B., snp_calls is a public API with @_check_types, which expects
1326+ # List[int] for sample_indices, not a tuple. Convert back here.
13251327 ds_snps = self .snp_calls (
13261328 region = region ,
1327- sample_sets = sample_sets ,
1328- sample_indices = sample_indices ,
1329+ sample_sets = list ( sample_sets ) if sample_sets is not None else None ,
1330+ sample_indices = list ( sample_indices ) if sample_indices is not None else None ,
13291331 site_mask = site_mask ,
13301332 site_class = site_class ,
13311333 cohort_size = cohort_size ,
@@ -2073,10 +2075,12 @@ def _biallelic_diplotypes(
20732075 # Note: this function uses sample_indices and should not expect a sample_query.
20742076
20752077 # Access biallelic SNPs.
2078+ # N.B., biallelic_snp_calls is a public API with @_check_types, which
2079+ # expects List[int] for sample_indices, not a tuple. Convert back here.
20762080 ds = self .biallelic_snp_calls (
20772081 region = region ,
2078- sample_sets = sample_sets ,
2079- sample_indices = sample_indices ,
2082+ sample_sets = list ( sample_sets ) if sample_sets is not None else None ,
2083+ sample_indices = list ( sample_indices ) if sample_indices is not None else None ,
20802084 site_mask = site_mask ,
20812085 site_class = site_class ,
20822086 cohort_size = cohort_size ,
0 commit comments