Skip to content

Commit c1b2e76

Browse files
committed
Fix documentation requiring download of PKSI-AT.hmm2 from antiSMASH
1 parent 0dfedee commit c1b2e76

File tree

2 files changed

+25
-3
lines changed

2 files changed

+25
-3
lines changed

docs/examples/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
LuxC.hmm
22
LuxC.domtbl
33
rhodopsin.hmm
4+
PKSI-AT.hmm2

docs/examples/active_site.ipynb

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,27 @@
4545
"## Loading the HMM"
4646
]
4747
},
48+
{
49+
"cell_type": "markdown",
50+
"metadata": {},
51+
"source": [
52+
"Let's start by downloading the PSKI-AT HMM from the AntiSMASH repository. We can use `urllib.request` to do that from within our Python script:"
53+
]
54+
},
55+
{
56+
"cell_type": "code",
57+
"execution_count": null,
58+
"metadata": {},
59+
"outputs": [],
60+
"source": [
61+
"import shutil\n",
62+
"from urllib.request import urlopen\n",
63+
"\n",
64+
"with urlopen('https://raw.githubusercontent.com/antismash/antismash/refs/heads/8-0-stable/antismash/modules/active_site_finder/data/PKSI-AT.hmm2') as src:\n",
65+
" with open(\"PKSI-AT.hmm2\", \"wb\") as dst:\n",
66+
" shutil.copyfileobj(src, dst)"
67+
]
68+
},
4869
{
4970
"cell_type": "markdown",
5071
"metadata": {},
@@ -58,7 +79,7 @@
5879
"metadata": {},
5980
"outputs": [],
6081
"source": [
61-
"with pyhmmer.plan7.HMMFile(\"data/hmms/txt/PKSI-AT.hmm\") as hmm_file:\n",
82+
"with pyhmmer.plan7.HMMFile(\"PKSI-AT.hmm2\") as hmm_file:\n",
6283
" hmm = hmm_file.read()"
6384
]
6485
},
@@ -271,7 +292,7 @@
271292
],
272293
"metadata": {
273294
"kernelspec": {
274-
"display_name": "Python 3",
295+
"display_name": "Python 3 (ipykernel)",
275296
"language": "python",
276297
"name": "python3"
277298
},
@@ -285,7 +306,7 @@
285306
"name": "python",
286307
"nbconvert_exporter": "python",
287308
"pygments_lexer": "ipython3",
288-
"version": "3.10.8"
309+
"version": "3.13.11"
289310
}
290311
},
291312
"nbformat": 4,

0 commit comments

Comments
 (0)