@@ -319,11 +319,9 @@ def max_descendant_samples(ts, show_progress=True):
319
319
320
320
321
321
class TreeInfo :
322
- def __init__ (self , ts , show_progress = True , pango_source = "Nextclade_pango" ):
323
- # Can current set pango_source to "Nextclade_pango" or "GISAID_lineage"
322
+ def __init__ (self , ts , show_progress = True , pango_source = "Viridian_pangolin" ):
324
323
self .ts = ts
325
324
self .pango_source = pango_source
326
- self .epi_isl_map = {}
327
325
self .strain_map = {}
328
326
self .recombinants = get_recombinants (ts )
329
327
self .nodes_max_descendant_samples = max_descendant_samples (ts )
@@ -348,10 +346,6 @@ def __init__(self, ts, show_progress=True, pango_source="Nextclade_pango"):
348
346
md = node .metadata
349
347
self .nodes_metadata [node .id ] = md
350
348
if node .is_sample ():
351
- self .epi_isl_map [md ["gisaid_epi_isl" ]] = node .id
352
- if md ["gisaid_epi_isl" ] is not None :
353
- if "." in md ["gisaid_epi_isl" ]:
354
- self .epi_isl_map [md ["gisaid_epi_isl" ].split ("." )[0 ]] = node .id
355
349
self .strain_map [md ["strain" ]] = node .id
356
350
self .nodes_date [node .id ] = md ["date" ]
357
351
self .nodes_submission_date [node .id ] = md ["date_submitted" ]
@@ -1036,11 +1030,9 @@ def _mutation_summary(self, mut_id):
1036
1030
"metadata" : self .ts .mutation (mut_id ).metadata ,
1037
1031
}
1038
1032
1039
- def node_report (self , node_id = None , strain = None , epi_isl = None ):
1033
+ def node_report (self , node_id = None , strain = None ):
1040
1034
if strain is not None :
1041
1035
node_id = self .strain_map [strain ]
1042
- if epi_isl is not None :
1043
- node_id = self .epi_isl_map [epi_isl ]
1044
1036
# node_summary = pd.DataFrame([self._node_summary(node_id)])
1045
1037
# TODO improve this for internal nodes
1046
1038
node_summary = [self .ts .node (node_id ).metadata ]
@@ -2021,6 +2013,8 @@ def add_gisaid_lineages_to_ts(ts, node_gisaid_lineages, linmuts_dict):
2021
2013
return edited_ts
2022
2014
2023
2015
2016
+ # NOTE: this is broken since moving to Viridian metadata, we no longer have
2017
+ # GISAID EPI ISL in the metadata
2024
2018
def check_lineages (
2025
2019
ts ,
2026
2020
ti ,
0 commit comments