Skip to content

Commit

Permalink
Merge pull request #2123 from aviczhl2/master
Browse files Browse the repository at this point in the history
Automatically add 4 refs from sars-cov-2-variants/lineage-proposals
  • Loading branch information
AngieHinrichs authored Jul 24, 2023
2 parents c71b0f4 + 76918fd commit f1b813c
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 98 deletions.
79 changes: 17 additions & 62 deletions automated-issue-ref.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"execution_count": 7,
"id": "f64573a2",
"metadata": {},
"outputs": [],
Expand All @@ -15,6 +15,8 @@
"# the number of milestone we start to read\n",
"start_milestone=1\n",
"start_sub_milestone=1\n",
"end_milestone=795\n",
"end_sub_milestone=13\n",
"def read_milestone(num,di='cov-lineages/pango-designation'):\n",
" # or sars-cov-2 proj if it starts to add milestones\n",
" url=\"https://github.com/\"+di+\"/milestone/\"+str(num)\n",
Expand All @@ -38,21 +40,12 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 8,
"id": "769f2d32",
"metadata": {
"scrolled": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"796 HTTP Error 404: Not Found\n",
"8 HTTP Error 404: Not Found\n"
]
}
],
"outputs": [],
"source": [
"# read milestones \n",
"milestone_end=False\n",
Expand All @@ -63,6 +56,7 @@
"import os \n",
"listd=os.listdir()\n",
"\n",
"\n",
"if not(\"autoref\" in listd):\n",
" os.mkdir(\"autoref\")\n",
"lista=os.listdir(\"autoref\")\n",
Expand All @@ -80,7 +74,7 @@
" milestone_list.append([linsp[0],linsp[1]])\n",
" # don't read twice for old milestones\n",
" if issue>=milestone:\n",
" milestone=issue+1 \n",
" milestone=issue+1\n",
" w.close()\n",
"\n",
"if (\"milestone_sub.txt\" in lista):\n",
Expand All @@ -104,15 +98,15 @@
" print(item[0],item[1],file=w)\n",
"\n",
"\n",
"while not(milestone_end):\n",
"while (milestone<=end_milestone):\n",
" try:\n",
" title=read_milestone(milestone)\n",
" for item in title:\n",
" milestone_list.append([milestone,item])\n",
" print(milestone,item,file=w)\n",
" except Exception as e:\n",
" print(milestone,e)\n",
" milestone_end=True\n",
" \n",
" milestone+=1\n",
" if milestone%10==0:\n",
" print(\"Reading Milestone\",milestone)\n",
Expand All @@ -124,17 +118,17 @@
" print(item[0],item[1],file=w)\n",
"\n",
"milestone_end=False\n",
"while not(milestone_end):\n",
"while (milestone_sub<=end_sub_milestone):\n",
" try:\n",
" title=read_milestone(milestone_sub,di=\"sars-cov-2-variants/lineage-proposals\")\n",
" for item in title:\n",
" milestone_list_sub.append([milestone_sub,item])\n",
" print(milestone_sub,item,file=w)\n",
" except Exception as e:\n",
" print(milestone_sub,e)\n",
" milestone_end=True\n",
" \n",
" milestone_sub+=1\n",
" if milestone%10==0:\n",
" if milestone_sub%10==0:\n",
" print(\"Reading Milestone in sars-cov-2-variants \",milestone)\n",
"\n",
"w.close()\n",
Expand All @@ -146,7 +140,7 @@
},
{
"cell_type": "code",
"execution_count": 12,
"execution_count": 9,
"id": "88a367db",
"metadata": {},
"outputs": [],
Expand Down Expand Up @@ -175,49 +169,10 @@
},
{
"cell_type": "code",
"execution_count": 13,
"execution_count": null,
"id": "a56544a8",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"['BA.2.75.9', '#1098']\n",
"['CB.1', '#1098']\n",
"['CK.2', '#1190']\n",
"['CK.2.1.1', '#1190']\n",
"['BA.5.2.36', '#1203']\n",
"['CT.1', '#1203']\n",
"['BA.5.2.38', '#1254']\n",
"['DA.1', '#1254']\n",
"['AY.13', '#198']\n",
"['AY.14', '#198']\n",
"['AY.15', '#198']\n",
"['AY.16', '#198']\n",
"['AY.17', '#198']\n",
"['AY.18', '#198']\n",
"['AY.19', '#198']\n",
"['AY.20', '#198']\n",
"['AY.21', '#198']\n",
"['AY.22', '#198']\n",
"['AY.34.1.1', '#255']\n",
"['AY.58', '#286']\n",
"['AY.63', '#286']\n",
"['AY.99', '#258']\n",
"['AY.99.1', '#258']\n",
"['AY.99.2', '#258']\n",
"['AY.112.1', '#283']\n",
"['AY.121.1', '#344']\n",
"['AY.122', '#320']\n",
"['EG.4.2', 'sars-cov-2-variants/lineage-proposals/#46']\n",
"['GY.6', 'sars-cov-2-variants/lineage-proposals/#308']\n",
"['XBB.1.32', '#1827']\n",
"['XBB.1.37', '#1929']\n",
"['XBF.1.1', '#1651']\n"
]
}
],
"outputs": [],
"source": [
"# read lineage_notes.txt\n",
"\n",
Expand All @@ -239,7 +194,7 @@
" item_to_milestone[to_add]=item[1]\n",
" \n",
"for item in milestone_list_sub:\n",
" to_add='sars-cov-2-variants/lineage-proposals/#'+str(item[0])\n",
" to_add='sars-cov-2-variants/lineage-proposals#'+str(item[0])\n",
" all_milestones[item[1]]=to_add\n",
" if to_add in item_to_milestone:\n",
" item_to_milestone[to_add]+='+'+item[1]\n",
Expand All @@ -260,7 +215,7 @@
" if 'sars' in all_milestones[title]:\n",
" issue_num=read_milestone_issues(title,di='sars-cov-2-variants/lineage-proposals')\n",
" if issue_num!=0:\n",
" missing_milestones.append([title,'sars-cov-2-variants/lineage-proposals/#'+str(issue_num)])\n",
" missing_milestones.append([title,'sars-cov-2-variants/lineage-proposals#'+str(issue_num)])\n",
" print(missing_milestones[-1])\n",
" else:\n",
" issue_num=read_milestone_issues(title)\n",
Expand Down
5 changes: 5 additions & 0 deletions autoref/milestone_sub.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,8 @@
4 CM.7.1.1
5 EG.4.2
7 GY.6
8 GK.1.3
9 XBB.1.41.1
11 FL.4.3
12 GJ.1.1
13 GW.1
36 changes: 4 additions & 32 deletions autoref/missing_refs.txt
Original file line number Diff line number Diff line change
@@ -1,32 +1,4 @@
BA.2.75.9 #1098
CB.1 #1098
CK.2 #1190
CK.2.1.1 #1190
BA.5.2.36 #1203
CT.1 #1203
BA.5.2.38 #1254
DA.1 #1254
AY.13 #198
AY.14 #198
AY.15 #198
AY.16 #198
AY.17 #198
AY.18 #198
AY.19 #198
AY.20 #198
AY.21 #198
AY.22 #198
AY.34.1.1 #255
AY.58 #286
AY.63 #286
AY.99 #258
AY.99.1 #258
AY.99.2 #258
AY.112.1 #283
AY.121.1 #344
AY.122 #320
EG.4.2 sars-cov-2-variants/lineage-proposals/#46
GY.6 sars-cov-2-variants/lineage-proposals/#308
XBB.1.32 #1827
XBB.1.37 #1929
XBF.1.1 #1651
GK.1.3 sars-cov-2-variants/lineage-proposals#179
FL.4.3 sars-cov-2-variants/lineage-proposals#153
XBB.1.41.1 sars-cov-2-variants/lineage-proposals#150
GJ.1.1 sars-cov-2-variants/lineage-proposals#109
8 changes: 4 additions & 4 deletions lineage_notes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2777,7 +2777,7 @@ XBB.1.5.70 S:L455F, S:F456L (T22928C), ORF1a:A4068S, Brazil, from #1982
GK.1 Alias of XBB.1.5.70.1, S:S704L, Brazil, from #2025
GK.1.1 Alias of XBB.1.5.70.1.1, S:T573I, Brazil
GK.1.2 Alias of XBB.1.5.70.1.2, S:N185D, Brazil from #2093
GK.1.3 Alias of XBB.1.5.70.1.3, ORF1a:E633A, ORF1b:D1130G, USA/Canada
GK.1.3 Alias of XBB.1.5.70.1.3, ORF1a:E633A, ORF1b:D1130G, USA/Canada From sars-cov-2-variants/lineage-proposals#179
GK.2 Alias of XBB.1.5.70.2, S:V511I, from sars-cov-2-variants/lineage-proposals#300
XBB.1.5.71 S:V511I, Spain
XBB.1.5.72 S:F456L (T22928C), ORF1a:G445S, T9823C, T10204C, South America
Expand Down Expand Up @@ -2846,7 +2846,7 @@ FL.4 Alias of XBB.1.9.1.4, ORF1b:V1092F
FL.4.1 Alias of XBB.1.9.1.4.1, S:N450I
FL.4.1.1 Alias of XBB.1.9.1.4.1.1, S:K478R, ORF1a:I2286T, Indonesia/Australia, from sars-cov-2-variants/lineage-proposals#107
FL.4.2 Alias of XBB.1.9.1.4.2, ORF1a:T951I, China
FL.4.3 Alias of XBB.1.9.1.4.3, S:A766S, G7393T, Myanmar
FL.4.3 Alias of XBB.1.9.1.4.3, S:A766S, G7393T, Myanmar From sars-cov-2-variants/lineage-proposals#153
FL.4.4 Alias of XBB.1.9.1.4.4, ORF1a:T1542I, T24544C, S:478T (reversion), Indonesia
FL.4.5 Alias of XBB.1.9.1.4.5, ORF8:S67F, ORF1a:D1228G, C23635T, from #2018
FL.4.6 Alias of XBB.1.9.1.4.6, T5098C, C13965T, Australia/China
Expand Down Expand Up @@ -3057,7 +3057,7 @@ XBB.1.38.1 S:T883I, Russia
XBB.1.39 ORF1a:V2866M, Singapore/Malaysia
XBB.1.40 S:Y453F, ORF1a:G519S, ORF1a:L2609F, ORF3a:P104S, Malaysia
XBB.1.41 S:L335S, S:R403K, S:486P, possibly common in Central/West Africa, from #1997
XBB.1.41.1 S:478R, France
XBB.1.41.1 S:478R, France From sars-cov-2-variants/lineage-proposals#150
XBB.1.42 S:486P, S:Q613H, on ORF1a:T4175I branch with XBB.1.9, Indonesia/Malaysia/China,from #1954
XBB.1.42.1 S:478R from https://github.com/sars-cov-2-variants/lineage-proposals/issues/198
XBB.1.42.2 C6040T, G9049A
Expand Down Expand Up @@ -3085,7 +3085,7 @@ HH.1.1 Alias of XBB.2.3.2.1.1, S:G181A from sars-cov-2-variants/lineage-proposa
HH.2 Alias of XBB.2.3.2.2, ORF1a:D48Y
XBB.2.3.3 S:182N, India/USA From #1810
GJ.1 Alias of XBB.2.3.3.1, found mainly in China and USA, from pango-designation issue #2005
GJ.1.1 Alias of XBB.2.3.3.1.1, S:A222V, N:R319H, ORF1a:V1915I
GJ.1.1 Alias of XBB.2.3.3.1.1, S:A222V, N:R319H, ORF1a:V1915I From sars-cov-2-variants/lineage-proposals#109
GJ.1.2 Alias of XBB.2.3.3.1.2, ORF1b:V1110I, from #2059
GJ.2 Alias of XBB.2.3.3.2, S:I1114S, Europe
GJ.3 Alias of XBB.2.3.3.3, ORF1a:P971S, ORF1b:V2371L
Expand Down

0 comments on commit f1b813c

Please sign in to comment.