|
8 | 8 | "outputs": [], |
9 | 9 | "source": [ |
10 | 10 | "import logging\n", |
11 | | - "import pandas as pd\n", |
12 | | - "from ontograph.client import ClientOntology, ClientCatalog\n", |
13 | | - "from ontograph.utils import translate_ids" |
| 11 | + "\n", |
| 12 | + "from ontograph.utils import translate_ids\n", |
| 13 | + "from ontograph.client import ClientOntology" |
14 | 14 | ] |
15 | 15 | }, |
16 | 16 | { |
|
30 | 30 | "metadata": {}, |
31 | 31 | "outputs": [], |
32 | 32 | "source": [ |
33 | | - "PATH_ONTOLOGY_FILE = \"../data/out/swiss_lipids_ontology.obo\" \n", |
34 | | - "PATH_MAPPING_FILE = \"../data/out/swiss_lipids_mapping_ids.csv\"" |
| 33 | + "PATH_ONTOLOGY_FILE = '../data/out/swiss_lipids_ontology.obo'\n", |
| 34 | + "PATH_MAPPING_FILE = '../data/out/swiss_lipids_mapping_ids.csv'" |
35 | 35 | ] |
36 | 36 | }, |
37 | 37 | { |
|
134 | 134 | "outputs": [], |
135 | 135 | "source": [ |
136 | 136 | "swiss_onto.load_mapping(filepath=PATH_MAPPING_FILE,\n", |
137 | | - " delimiter=\"\\t\",\n", |
| 137 | + " delimiter='\\t',\n", |
138 | 138 | " #target_column=\"chebi_id\",\n", |
139 | | - " target_column=\"swiss_lipid_id\",\n", |
| 139 | + " target_column='swiss_lipid_id',\n", |
140 | 140 | " )" |
141 | 141 | ] |
142 | 142 | }, |
|
149 | 149 | "source": [ |
150 | 150 | "test_ids_diverse = [\n", |
151 | 151 | " 'CHEBI:70995', # chebi\n", |
152 | | - " \"SLM:000508824\", # swiss lipids\n", |
153 | | - " \"HMDB00032\", # hmdb\n", |
154 | | - " \"LMGP01030010\", # lipid maps\n", |
155 | | - " \"MNXM2990\", # metanetx\n", |
156 | | - " \"CHEBI:88888\" # fake chebi id\n", |
| 152 | + " 'SLM:000508824', # swiss lipids\n", |
| 153 | + " 'HMDB00032', # hmdb\n", |
| 154 | + " 'LMGP01030010', # lipid maps\n", |
| 155 | + " 'MNXM2990', # metanetx\n", |
| 156 | + " 'CHEBI:88888' # fake chebi id\n", |
157 | 157 | "]\n", |
158 | 158 | "\n", |
159 | 159 | "test_ids_swiss_lipids = ['SLM:000048885','SLM:000508824','SLM:000000042','SLM:000048885','SLM:000000288']" |
|
184 | 184 | "outputs": [], |
185 | 185 | "source": [ |
186 | 186 | "for term in swiss_onto.get_terms(terms_translated):\n", |
187 | | - " print(f\"\\n{term}\")\n", |
| 187 | + " print(f'\\n{term}')\n", |
188 | 188 | " for property in term.annotations:\n", |
189 | | - " print(f\"\\t{property.property}: {property.literal}\")\n" |
| 189 | + " print(f'\\t{property.property}: {property.literal}')\n" |
190 | 190 | ] |
191 | 191 | }, |
192 | 192 | { |
|
197 | 197 | "outputs": [], |
198 | 198 | "source": [ |
199 | 199 | "for term in swiss_onto.get_terms(test_ids_diverse):\n", |
200 | | - " print(f\"\\n{term}\")\n", |
| 200 | + " print(f'\\n{term}')\n", |
201 | 201 | " for property in term.annotations:\n", |
202 | | - " print(f\"\\t{property.property}: {property.literal}\")" |
| 202 | + " print(f'\\t{property.property}: {property.literal}')" |
203 | 203 | ] |
204 | 204 | }, |
205 | 205 | { |
|
0 commit comments