Tips in timetree are being rendered outside of panel
ArtPoon opened this issue · 12 comments
@GopiGugan I'm running some tests on Paphlagon
Using the following script to extract by_lineage.json
file from latest provision:
import covizu
from covizu.utils import gisaid_utils
from covizu.utils.progress_utils import Callback
from covizu.utils.batch_utils import *
import os
cb = Callback()
infile = "data/provision.2024-02-17T00:00:21.json.xz"
ref_file = os.path.join(covizu.__path__[0], "data/NC_045512.fa")
vcf_file = os.path.join(
covizu.__path__[0],
"data/ProblematicSites_SARS-CoV2/problematic_sites_sarsCov2.vcf")
loader = gisaid_utils.load_gisaid(infile, minlen=29000, mindate="2019-12-01",
debug=None) #100)
batcher = gisaid_utils.batch_fasta(loader, size=2000)
aligned = gisaid_utils.extract_features(
batcher, ref_file=ref_file, binpath="minimap2", nthread=16, minlen=29000)
filtered = gisaid_utils.filter_problematic(
aligned, vcf_file=vcf_file, cutoff=0.001, callback=cb.callback)
by_lineage = gisaid_utils.sort_by_lineage(filtered, callback=cb.callback)
with open("iss512.json", 'w') as outfile:
json.dump(by_lineage, outfile)
Reproduced the tree. Looks like this is not a backend problem.
I'll take a look at the front end
I believe the issue is that we aren't scaling the nwk tree itself. Branch lengths are being assigned with the values in the nwk file:
Lines 59 to 71 in 10a4017
I believe the issue is that we aren't scaling the nwk tree itself. Branch lengths are being assigned with the values in the nwk file:
I don't think this is the problem, the branch lengths in this tree are scaled in units of time (years), which is what we want to display. I think the problem is that we are not calculating the maximum tip to root distance in this tree correctly, which would be needed to scale to the horizontal dimension of this panel.
More problems:
The timetree axis of sampling dates is not updating with the slider for specifying the minimum date for rendering lineages!sorry, I forgot this was not part of the implementation- The box for a given lineage has incorrect horizontal coordinates relative to the timetree axis.
I suspect the problem is somewhere here:
Lines 122 to 138 in 10a4017
Yes, it looks like this was the issue. The domain was not set correctly. Working on a fix for this
An easy fix would be to change the label in the tooltip to read "Collection dates (displayed):", which would imply that we are showing the range of collection dates for the subset of variants in the beadplot.