Skip to content

Add omicron levels coloring#1018

Merged
jameshadfield merged 4 commits intomasterfrom
feat/levels
Oct 20, 2022
Merged

Add omicron levels coloring#1018
jameshadfield merged 4 commits intomasterfrom
feat/levels

Conversation

@jameshadfield
Copy link
Copy Markdown
Member

@jameshadfield jameshadfield commented Oct 19, 2022

For background please see "Variant report 2022-10-17" section of https://github.com/neherlab/SARS-CoV-2_variant-reports/blob/main/reports/variant_report_latest_draft.md for details of lineage classification. This commit is very much a first pass to see if (a) it works robustly on large datasets and (b) there is interest in including it (there is from me!)

Note that the mutations are relative to BA.2 so we should really use this for omicron-only builds, which are being developed elsewhere. This is especially relevant for S:493 where we consider a reversion to increase the level, meaning strains basal to BA.2 will be elevated inappropriately.

Trial builds via https://github.com/nextstrain/ncov/actions/runs/3278003787.
nextstrain URLs: https://nextstrain.org/staging/ncov/gisaid/trial/feat-levels/REGION_NAME
e.g. https://nextstrain.org/staging/ncov/gisaid/trial/feat-levels/global/2m
You can attach to this AWS job via:
nextstrain build --aws-batch --attach 08b4c304-03ea-49f6-af22-f60102f14896 /home/runner/work/ncov/ncov
View this job in the AWS console via
https://console.aws.amazon.com/batch/home?region=us-east-1#jobs/detail/08b4c304-03ea-49f6-af22-f60102f14896

cc @corneliusroemer

Copy link
Copy Markdown
Member

@corneliusroemer corneliusroemer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really good

The level definitions are somewhat arbitrary at the boundaries - they are informed by what we commonly see - could be subject to change.

@corneliusroemer
Copy link
Copy Markdown
Member

Excellent stuff @jameshadfield.

  1. It'd be great if we could make non-21L and descendants grey, as opposed to 0
  2. Maybe call it RBD level 7 etc.

It's great, definitely already useful as is, could just merge and improve over time. Maybe greying out non-21L descendants is the only important change.

@jameshadfield
Copy link
Copy Markdown
Member Author

Thanks @corneliusroemer. I'll move the definitions out of a script into a config (easy), change the name to RBD level X (easy) and see if I can make non-21L genomes grey (should be easy?). Watch this space...

jameshadfield added a commit that referenced this pull request Oct 19, 2022
For background please see "Variant report 2022-10-17" section of
https://github.com/neherlab/SARS-CoV-2_variant-reports/blob/main/reports/variant_report_latest_draft.md
for details of lineage classification. Additional changes via
@corneliusroemer in #1018.

Note that the mutations are relative to BA.2 so we should really use
this for omicron-only builds, which are being developed elsewhere.
This is especially relevant for S:493 where we consider a reversion
to increase the level, meaning strains basal to BA.2 will be elevated
inappropriately.
@jameshadfield
Copy link
Copy Markdown
Member Author

Applied @corneliusroemer's changes to the definitions and generally made this PR into something that is maintainable going forward. Changes to the level definitions are made by modifying defaults/rbd_levels.yaml rather than the script itself.

But I see that CI has failed because "ERROR: no node found with a clade_annotation of 21L (Omicron)". We want to allow this to work on all trees, even if they don't have any omicron sequences, so I'll update this now.

@jameshadfield
Copy link
Copy Markdown
Member Author

Test builds (GenBank this time) running now. I'll merge this as long as it completes succsessfully:

--> Trial name is: feat-levels-mk2

--> When completed, the following will be available:
build files: s3://nextstrain-staging/files/ncov/open/trial/feat-levels-mk2/
nextstrain URLs: https://nextstrain.org/staging/ncov/open/trial/feat-levels-mk2/REGION_NAME

--> You can attach to this AWS job via:
nextstrain build --aws-batch --attach 4ef45461-1577-4d7c-ae7b-6c4373b37a0d /home/runner/work/ncov/ncov

--> View this job in the AWS console via
https://console.aws.amazon.com/batch/home?region=us-east-1#jobs/detail/4ef45461-1577-4d7c-ae7b-6c4373b37a0d

@jameshadfield
Copy link
Copy Markdown
Member Author

That trial build failed, here's another one...

--> Trial name is: feat-levels-mk3

--> When completed, the following will be available:
build files: s3://nextstrain-staging/files/ncov/open/trial/feat-levels-mk3/
nextstrain URLs: https://nextstrain.org/staging/ncov/open/trial/feat-levels-mk3/REGION_NAME

--> You can attach to this AWS job via:
nextstrain build --aws-batch --attach 9ec158cd-dda8-4e42-b6dd-89b8327f93f4 /home/runner/work/ncov/ncov

--> View this job in the AWS console via
https://console.aws.amazon.com/batch/home?region=us-east-1#jobs/detail/9ec158cd-dda8-4e42-b6dd-89b8327f93f4

@jameshadfield
Copy link
Copy Markdown
Member Author

Trial build looks good

image

For background please see "Variant report 2022-10-17" section of
https://github.com/neherlab/SARS-CoV-2_variant-reports/blob/main/reports/variant_report_latest_draft.md
for details of lineage classification. Additional changes via
@corneliusroemer in #1018.

Note that the mutations are relative to BA.2 so we should really use
this for omicron-only builds, which are being developed elsewhere.
This is especially relevant for S:493 where we consider a reversion
to increase the level, meaning strains basal to BA.2 will be elevated
inappropriately.
They are only defined in this context, so it's not a good idea to
apply these rules to other sequences!
this can happen when running (e.g) trees without omicron sequences as
part of the ncov pipeline and we don't want this to be a fatal error.
In these situations the script will export a node-data JSON with no
node-data, and thus the coloring won't be available to auspice.
@jameshadfield
Copy link
Copy Markdown
Member Author

[the following discussion from slack]

@jameshadfield jameshadfield merged commit 47f49a1 into master Oct 20, 2022
@jameshadfield jameshadfield deleted the feat/levels branch October 20, 2022 20:50
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

Successfully merging this pull request may close these issues.

2 participants