PoonLab/covizu

Recombinant lineages with alias are displayed within the time-scaled tree

Closed this issue · 5 comments

Hi,

I thought that recombinant lineages (including sublineages of recombinant lineages, such as XBB.1 and XBB.2) should be displayed outside of the time-scaled tree in covizu v2.2. However, some recombinant lineages with alias are displayed within the tree, such as EG.1 (XBB.1.9.2) and EL.1 (XBB.1.5.14). Currently, all recombinant lineages with alias are sublineages of XBB. This alias_key.json file might be helpful.

Thanks,
Yexiao

Hi @yexiao-cheng - thanks for raising this issue. I admit we were a bit sloppy about filtering recombinant lineages. We will work on fixing this with the next PR. Thanks for linking the JSON file - we have used that resource for other projects.

@GopiGugan - probably the best way to go about this is to write an additional field to the clusters JSON file. Currently we have the PANGO designation keyed by lineage for each "cluster" - this is used to label the tips of the tree on the app:

tips[root_idx].label1 = cluster["lineage"];

This gets transferred during the clustering step here:
https://github.com/PoonLab/covizu/blob/7cf87ca2a882490cc93fb7144cd429e691e9fab9/covizu/utils/batch_utils.py#LL246C46-L246C46

It should just be a matter of querying the alias_key JSON (which we already have as part of the pango-designation submodule) with lineage to retrieve the full designation, and storing the latter in the clusters JSON under another key like raw_lineage.

In the near future, we should probably consider building additional time-scaled trees for recombinant lineages with descendant lineages like XBB, and then allowing users to switch between trees to navigate the beadplots.

@GopiGugan has a working version of this fix, pending testing and PR

This fix is in the dev branch, close this issue on merge into master