@@ -44,7 +44,7 @@ def create_genotype_call_dataset(
44
44
call_genotype_phased : array_like, bool, optional
45
45
A flag for each call indicating if it is phased or not. If
46
46
omitted all calls are unphased.
47
- variant_id: array_like, str, optional
47
+ variant_id: array_like, str or object , optional
48
48
The unique identifier of the variant.
49
49
50
50
Returns
@@ -76,7 +76,7 @@ def create_genotype_call_dataset(
76
76
call_genotype_phased ,
77
77
)
78
78
if variant_id is not None :
79
- check_array_like (variant_id , kind = "U" , ndim = 1 )
79
+ check_array_like (variant_id , kind = { "U" , "O" } , ndim = 1 )
80
80
data_vars ["variant_id" ] = ([DIM_VARIANT ], variant_id )
81
81
attrs : Dict [Hashable , Any ] = {"contigs" : variant_contig_names }
82
82
return xr .Dataset (data_vars = data_vars , attrs = attrs )
@@ -109,7 +109,7 @@ def create_genotype_dosage_dataset(
109
109
call_dosage : array_like, float
110
110
Dosages, encoded as floats, with NaN indicating a
111
111
missing value.
112
- variant_id: array_like, str, optional
112
+ variant_id: array_like, str or object , optional
113
113
The unique identifier of the variant.
114
114
115
115
Returns
@@ -132,7 +132,7 @@ def create_genotype_dosage_dataset(
132
132
"call_dosage_mask" : ([DIM_VARIANT , DIM_SAMPLE ], np .isnan (call_dosage ),),
133
133
}
134
134
if variant_id is not None :
135
- check_array_like (variant_id , kind = "U" , ndim = 1 )
135
+ check_array_like (variant_id , kind = { "U" , "O" } , ndim = 1 )
136
136
data_vars ["variant_id" ] = ([DIM_VARIANT ], variant_id )
137
137
attrs : Dict [Hashable , Any ] = {"contigs" : variant_contig_names }
138
138
return xr .Dataset (data_vars = data_vars , attrs = attrs )
0 commit comments