31fcce743b506baaad63423b3f126064a2b0dc56 angie Fri Nov 12 13:57:59 2021 -0800 Update to latest clade coloring & names. diff --git src/hg/utils/otto/nextstrainNcov/nextstrain.py src/hg/utils/otto/nextstrainNcov/nextstrain.py index b25d3d6..3913611 100755 --- src/hg/utils/otto/nextstrainNcov/nextstrain.py +++ src/hg/utils/otto/nextstrainNcov/nextstrain.py @@ -29,43 +29,54 @@ snvRe = re.compile('^([ACGT-])([0-9]+)([ACGT-])$') snvAaRe = re.compile('^([A-Z*-])([0-9]+)([A-Z*-])$') newClades = {} oldClades = {} variantCounts = {} variantAaChanges = {} samples = [] # Clades from March 15th, 2020 to early morning of June 2nd, 2020: oldCladeColors = { 'A1a': '73,75,225', 'A2': '75,131,233', 'A2a': '92,173,207', 'A3': '119,199,164', 'A6': '154,212,122', 'A7': '173,189,81', 'B': '233,205,74', 'B1': '255,176,65', 'B2': '255,122,53', 'B4': '249,53,41' } -# Clades from Jan. 2021: -newCladeColors = { '19A': '61,21,199', - '19B': '56,72,230', - '20A': '64,124,223', - '20B': '80,163,190', - '20C': '103,189,147', - '20D': '132,206,108', - '20E (EU1)': '171,201,81', - '20F': '211,204,64', - '20G': '242,185,54', - '20H/501Y.V2': '252,147,48', - '20I/501Y.V1': '252,89,41', - '20J/501Y.V3': '243,28,32', +# Clades from Nov. 2021: +newCladeColors = { '20H (Beta, V2)': '68,51,190', + '20I (Alpha, V1)': '62,90,207', + '20J (Gamma, V3)': '69,127,203', + '21A (Delta)' : '82,154,182', + '21I (Delta)': '100,173,152', + '21J (Delta)': '123,183,122', + '21B (Kappa)': '150,189,96', + '21C (Epsilon)': '179,189,77', + '21D (Eta)': '205,182,66', + '21E (Theta)': '223,164,59', + '21F (Iota)': '230,132,52', + '21G (Lambda)': '226,88,44', + '21H (Mu)': '219,40,35', + # Grayscale for pre-VoC lineages + '19A': '216,216,216', + '19B': '209,209,209', + '20A': '202,202,202', + '20B': '195,195,195', + '20C': '188,188,188', + '20D': '181,181,181', + '20E (EU1)': '174,174,174', + '20F': '167,167,167', + '20G': '160,160,160', } def cladeColorFromName(cladeName, cladeColors): color = cladeColors.get(cladeName); if (not color): color = '0,0,0' return color def cladeFromVariants(name, variants, varStr): """Extract bed12 info from an object whose keys are SNV variant names""" clade = {} snvEnds = [] # Watch out for back-mutations which make invalid BED because then we have multiple "blocks" # at the same position. Instead, make a back-mutation cancel out the mutation because the # mutation is not found at this node.