@@ -494,13 +494,14 @@ def summary(self):
494
494
mc_nodes = np .sum (self .ts .nodes_flags == sc2ts .NODE_IS_MUTATION_OVERLAP )
495
495
pr_nodes = np .sum (self .ts .nodes_flags == sc2ts .NODE_IS_REVERSION_PUSH )
496
496
re_nodes = np .sum (self .ts .nodes_flags == sc2ts .NODE_IS_RECOMBINANT )
497
+ exact_matches = np .sum ((self .ts .nodes_flags & sc2ts .NODE_IS_EXACT_MATCH ) > 0 )
497
498
498
499
samples = self .ts .samples ()
499
500
nodes_with_zero_muts = np .sum (self .nodes_num_mutations == 0 )
500
501
sites_with_zero_muts = np .sum (self .sites_num_mutations == 0 )
501
502
latest_sample = self .nodes_date [samples [- 1 ]]
502
503
masked_sites_per_sample = self .nodes_num_masked_sites [samples ]
503
- non_samples = self .ts .nodes_flags != tskit .NODE_IS_SAMPLE
504
+ non_samples = ( self .ts .nodes_flags & tskit .NODE_IS_SAMPLE ) == 0
504
505
max_non_sample_mutations = np .max (self .nodes_num_mutations [non_samples ])
505
506
insertions = np .sum (self .mutations_inherited_state == "-" )
506
507
deletions = np .sum (self .mutations_derived_state == "-" )
@@ -509,6 +510,7 @@ def summary(self):
509
510
("latest_sample" , latest_sample ),
510
511
("samples" , self .ts .num_samples ),
511
512
("nodes" , self .ts .num_nodes ),
513
+ ("exact_matches" , exact_matches ),
512
514
("mc_nodes" , mc_nodes ),
513
515
("pr_nodes" , pr_nodes ),
514
516
("re_nodes" , re_nodes ),
@@ -584,7 +586,7 @@ def _node_summary(self, u, child_mutations=True):
584
586
qc += status
585
587
flags = self .ts .nodes_flags [u ]
586
588
strain = ""
587
- if flags == tskit .NODE_IS_SAMPLE :
589
+ if ( flags & tskit .NODE_IS_SAMPLE ) != 0 :
588
590
strain = md ["strain" ]
589
591
elif flags == 1 << 21 :
590
592
if "overlap" in md :
0 commit comments