Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ways to correct "myopic" tree building #77

Open
hyanwong opened this issue Jan 27, 2023 · 1 comment
Open

Ways to correct "myopic" tree building #77

hyanwong opened this issue Jan 27, 2023 · 1 comment

Comments

@hyanwong
Copy link
Contributor

hyanwong commented Jan 27, 2023

We currently miss opportunities to create nodes.

For example in the current tree build, we ignore a shared mutation at position 9389 linking "Singapore/883/2020" with "Bahrain/920845574/2021". This is used by Nextstrain to group these B.1.1 samples together. Here's the viz code for testing purposes.

# Inspect the B.1.1 polytomy:
base_sc2_time = "2021-06-30"  # equivalent of day 0 in the sc2_ts file
sc2_ts = tszip.decompress(f"../results/upgma-full-md-30-mm-3-{base_sc2_time}.ts.tsz")

keep={"Bahrain/920858679/2021", "Singapore/883/2020", "Ireland/D-NVRL-71IRL07343/2020", "Bahrain/920845574/2021"}

B11 = sc2_ts.simplify([
    n.id for n in sc2_ts.nodes() if n.metadata.get("strain", "") in keep and n.is_sample()],
)

B11.at(9389).draw_svg(
    size=(1000, 300),
    node_labels={n.id: n.metadata.get("strain", "") for n in B11.nodes()},
    time_scale="rank",
    mutation_labels={
        m.id: f"{s.position:g}: {s.ancestral_state}{m.derived_state}"
        for s in B11.sites()
        for m in s.mutations
        if s.position==9389}
)

image

@hyanwong
Copy link
Contributor Author

Also worth investigating is the placement of Kuwait/JAH3090859/2021 which is an outgroup to the other Alpha variants in the Nextstrain tree, but is nested quite deeply within the alpha cluster in all the sc2ts trees.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant