@@ -13,7 +13,7 @@ class TskitFormat(vcz.Source):
13
13
def __init__ (
14
14
self ,
15
15
ts_path ,
16
- individual_nodes ,
16
+ individuals_nodes ,
17
17
sample_ids = None ,
18
18
contig_id = None ,
19
19
isolated_as_missing = False ,
@@ -25,10 +25,10 @@ def __init__(
25
25
26
26
self .positions = self .ts .sites_position
27
27
28
- self ._num_samples = individual_nodes .shape [0 ]
28
+ self ._num_samples = individuals_nodes .shape [0 ]
29
29
if self ._num_samples < 1 :
30
- raise ValueError ("individual_nodes must have at least one sample" )
31
- self .max_ploidy = individual_nodes .shape [1 ]
30
+ raise ValueError ("individuals_nodes must have at least one sample" )
31
+ self .max_ploidy = individuals_nodes .shape [1 ]
32
32
if sample_ids is None :
33
33
sample_ids = [f"tsk_{ j } " for j in range (self ._num_samples )]
34
34
elif len (sample_ids ) != self ._num_samples :
@@ -39,14 +39,14 @@ def __init__(
39
39
40
40
self ._samples = [vcz .Sample (id = sample_id ) for sample_id in sample_ids ]
41
41
42
- self .tskit_samples = np .unique (individual_nodes [ individual_nodes >= 0 ])
42
+ self .tskit_samples = np .unique (individuals_nodes [ individuals_nodes >= 0 ])
43
43
if len (self .tskit_samples ) < 1 :
44
- raise ValueError ("individual_nodes must have at least one valid sample" )
44
+ raise ValueError ("individuals_nodes must have at least one valid sample" )
45
45
node_id_to_index = {node_id : i for i , node_id in enumerate (self .tskit_samples )}
46
- valid_mask = individual_nodes >= 0
46
+ valid_mask = individuals_nodes >= 0
47
47
self .sample_indices , self .ploidy_indices = np .where (valid_mask )
48
48
self .genotype_indices = np .array (
49
- [node_id_to_index [node_id ] for node_id in individual_nodes [valid_mask ]]
49
+ [node_id_to_index [node_id ] for node_id in individuals_nodes [valid_mask ]]
50
50
)
51
51
52
52
@property
@@ -212,7 +212,7 @@ def generate_schema(
212
212
def convert (
213
213
ts_path ,
214
214
zarr_path ,
215
- individual_nodes ,
215
+ individuals_nodes ,
216
216
* ,
217
217
sample_ids = None ,
218
218
contig_id = None ,
@@ -224,7 +224,7 @@ def convert(
224
224
):
225
225
tskit_format = TskitFormat (
226
226
ts_path ,
227
- individual_nodes ,
227
+ individuals_nodes ,
228
228
sample_ids = sample_ids ,
229
229
contig_id = contig_id ,
230
230
isolated_as_missing = isolated_as_missing ,
0 commit comments