Skip to content

Commit 22f6bda

Browse files
authored
Merge pull request #151 from PyEED/fixes_mutations_docs
Fixes mutations docs
2 parents d039ab2 + cfd284d commit 22f6bda

18 files changed

Lines changed: 2681 additions & 661 deletions

docs/usage/embedding_different_models.ipynb

Lines changed: 329 additions & 0 deletions
Large diffs are not rendered by default.

docs/usage/embeddings_analysis.ipynb

Lines changed: 85 additions & 124 deletions
Large diffs are not rendered by default.

docs/usage/mutation_analysis.ipynb

Lines changed: 38 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,9 @@
1111
},
1212
{
1313
"cell_type": "code",
14-
"execution_count": 1,
14+
"execution_count": 5,
1515
"metadata": {},
16-
"outputs": [
17-
{
18-
"name": "stderr",
19-
"output_type": "stream",
20-
"text": [
21-
"/home/nab/anaconda3/envs/pyeed_niklas_env/lib/python3.10/site-packages/tqdm/auto.py:21: TqdmWarning: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html\n",
22-
" from .autonotebook import tqdm as notebook_tqdm\n"
23-
]
24-
}
25-
],
16+
"outputs": [],
2617
"source": [
2718
"import sys\n",
2819
"\n",
@@ -47,15 +38,15 @@
4738
},
4839
{
4940
"cell_type": "code",
50-
"execution_count": 2,
41+
"execution_count": 9,
5142
"metadata": {},
5243
"outputs": [
5344
{
5445
"name": "stdout",
5546
"output_type": "stream",
5647
"text": [
5748
"📡 Connected to database.\n",
58-
"The provided date does not match the current date. Date is you gave is 2025-03-19 actual date is 2025-04-09\n"
49+
"All data has been wiped from the database.\n"
5950
]
6051
}
6152
],
@@ -66,7 +57,7 @@
6657
"\n",
6758
"eedb = Pyeed(uri, user=user, password=password)\n",
6859
"\n",
69-
"eedb.db.wipe_database(date=\"2025-03-19\")"
60+
"eedb.db.wipe_database(date=\"2025-05-16\")"
7061
]
7162
},
7263
{
@@ -85,7 +76,7 @@
8576
},
8677
{
8778
"cell_type": "code",
88-
"execution_count": 3,
79+
"execution_count": 10,
8980
"metadata": {},
9081
"outputs": [],
9182
"source": [
@@ -111,21 +102,18 @@
111102
},
112103
{
113104
"cell_type": "code",
114-
"execution_count": 4,
105+
"execution_count": 11,
115106
"metadata": {},
116107
"outputs": [
117108
{
118109
"data": {
119-
"text/html": [
120-
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\">/home/nab/anaconda3/envs/pyeed_niklas_env/lib/python3.10/site-packages/rich/live.py:231: UserWarning: install \n",
121-
"\"ipywidgets\" for Jupyter support\n",
122-
" warnings.warn('install \"ipywidgets\" for Jupyter support')\n",
123-
"</pre>\n"
124-
],
110+
"application/vnd.jupyter.widget-view+json": {
111+
"model_id": "2dec96f51ab84ce3af3750b48065738d",
112+
"version_major": 2,
113+
"version_minor": 0
114+
},
125115
"text/plain": [
126-
"/home/nab/anaconda3/envs/pyeed_niklas_env/lib/python3.10/site-packages/rich/live.py:231: UserWarning: install \n",
127-
"\"ipywidgets\" for Jupyter support\n",
128-
" warnings.warn('install \"ipywidgets\" for Jupyter support')\n"
116+
"Output()"
129117
]
130118
},
131119
"metadata": {},
@@ -135,8 +123,11 @@
135123
"name": "stdout",
136124
"output_type": "stream",
137125
"text": [
138-
"Region ids: [5206, 5205, 5203, 5201, 5207]\n",
139-
"len of ids: 5\n"
126+
"Region ids: [849, 843, 848, 842, 847, 841, 846, 839, 850, 844]\n",
127+
"len of ids: 5\n",
128+
"Number of existing pairs: 0\n",
129+
"Number of total pairs: 4\n",
130+
"Number of pairs to align: 4\n"
140131
]
141132
},
142133
{
@@ -200,7 +191,7 @@
200191
},
201192
{
202193
"cell_type": "code",
203-
"execution_count": 5,
194+
"execution_count": 12,
204195
"metadata": {},
205196
"outputs": [],
206197
"source": [
@@ -217,7 +208,7 @@
217208
},
218209
{
219210
"cell_type": "code",
220-
"execution_count": 6,
211+
"execution_count": 13,
221212
"metadata": {},
222213
"outputs": [],
223214
"source": [
@@ -253,14 +244,14 @@
253244
},
254245
{
255246
"cell_type": "code",
256-
"execution_count": 7,
247+
"execution_count": 14,
257248
"metadata": {},
258249
"outputs": [
259250
{
260251
"name": "stdout",
261252
"output_type": "stream",
262253
"text": [
263-
"{'from_positions': [272, 241, 125], 'to_positions': [272, 241, 125], 'from_monomers': ['D', 'R', 'V'], 'to_monomers': ['N', 'S', 'I']}\n"
254+
"{'from_positions': [241, 272, 125], 'to_positions': [241, 272, 125], 'from_monomers': ['R', 'D', 'V'], 'to_monomers': ['S', 'N', 'I']}\n"
264255
]
265256
}
266257
],
@@ -298,21 +289,21 @@
298289
},
299290
{
300291
"cell_type": "code",
301-
"execution_count": 8,
292+
"execution_count": 15,
302293
"metadata": {},
303294
"outputs": [
304295
{
305296
"name": "stdout",
306297
"output_type": "stream",
307298
"text": [
308-
"Mutation on position 17 -> 17 with a nucleotide change of T -> C\n",
309-
"Mutation on position 395 -> 395 with a nucleotide change of T -> G\n",
310-
"Mutation on position 198 -> 198 with a nucleotide change of C -> A\n",
311-
"Mutation on position 716 -> 716 with a nucleotide change of G -> A\n",
312-
"Mutation on position 705 -> 705 with a nucleotide change of G -> A\n",
313-
"Mutation on position 473 -> 473 with a nucleotide change of T -> C\n",
314-
"Mutation on position 720 -> 720 with a nucleotide change of A -> C\n",
315-
"Mutation on position 137 -> 137 with a nucleotide change of A -> G\n"
299+
"Mutation on position 474 -> 474 with a nucleotide change of T -> C\n",
300+
"Mutation on position 199 -> 199 with a nucleotide change of C -> A\n",
301+
"Mutation on position 138 -> 138 with a nucleotide change of A -> G\n",
302+
"Mutation on position 18 -> 18 with a nucleotide change of T -> C\n",
303+
"Mutation on position 396 -> 396 with a nucleotide change of T -> G\n",
304+
"Mutation on position 721 -> 721 with a nucleotide change of A -> C\n",
305+
"Mutation on position 706 -> 706 with a nucleotide change of G -> A\n",
306+
"Mutation on position 717 -> 717 with a nucleotide change of G -> A\n"
316307
]
317308
}
318309
],
@@ -323,6 +314,13 @@
323314
" )"
324315
]
325316
},
317+
{
318+
"cell_type": "code",
319+
"execution_count": null,
320+
"metadata": {},
321+
"outputs": [],
322+
"source": []
323+
},
326324
{
327325
"cell_type": "code",
328326
"execution_count": null,

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ crc64iso = "0.0.2"
4040
SPARQLWrapper = "2.0.0"
4141
pysam = "0.23.0"
4242
types-requests = "2.32.0.20250328"
43+
ipywidgets = "^8.1.7"
44+
sentencepiece = "^0.2.0"
45+
umap = "^0.1.1"
4346

4447
[tool.poetry.group.dev.dependencies]
4548
mkdocstrings = {extras = ["python"], version = "^0.26.2"}

0 commit comments

Comments
 (0)