0
|
1 __license__ = "MIT"
|
|
2
|
|
3 import unittest
|
|
4 import minimal_kcf as mk
|
|
5
|
|
6
|
|
7 class SimpleUnitTest(unittest.TestCase):
|
|
8 def setUp(self):
|
|
9 import os
|
|
10 self.kcinput = {"ringsmcaw": """ENTRY G04845 Glycan
|
|
11 COMPOSITION (Gal)3 (Glc)1 (GlcNAc)2 (LFuc)2 (Neu5Ac)1
|
|
12 MASS 1656.5
|
|
13 DBLINKS CCSD: 23949
|
|
14 GlycomeDB: 20420
|
|
15 JCGGDB: JCGG-STR011245
|
|
16 NODE 9
|
|
17 1 Glc 0 0
|
|
18 2 Gal -10 0
|
|
19 3 GlcNAc -20 10
|
|
20 4 GlcNAc -20 -10
|
|
21 5 Gal -30 15
|
|
22 6 LFuc -30 5
|
|
23 7 LFuc -30 -5
|
|
24 8 Gal -30 -15
|
|
25 9 Neu5Ac -40 15
|
|
26 EDGE 8
|
|
27 1 2:b1 1:4
|
|
28 2 3:b1 2:6
|
|
29 3 4:b1 2:3
|
|
30 4 5:b1 3:4
|
|
31 5 6:a1 3:3
|
|
32 6 7:a1 4:4
|
|
33 7 8:b1 4:3
|
|
34 8 9:a2 5:3
|
|
35 ///
|
|
36 ENTRY G05108 Glycan
|
|
37 COMPOSITION (Gal)2 (GalNAc)1 (GlcNAc)1 (LFuc)1 (Neu5Ac)1 (S)1
|
|
38 MASS 1266.2
|
|
39 CLASS Glycoprotein; O-Glycan
|
|
40 DBLINKS CCSD: 33353
|
|
41 GlycomeDB: 20590
|
|
42 JCGGDB: JCGG-STR011425
|
|
43 NODE 7
|
|
44 1 GalNAc 20 1
|
|
45 2 Gal 10 1
|
|
46 3 GlcNAc 0 1
|
|
47 4 S -5 5
|
|
48 5 Gal -10 1
|
|
49 6 LFuc -10 -4
|
|
50 7 Neu5Ac -20 1
|
|
51 EDGE 6
|
|
52 1 2:b1 1:3
|
|
53 2 3:b1 2:3
|
|
54 3 4 3:6
|
|
55 4 5:b1 3:4
|
|
56 5 6:a1 3:3
|
|
57 6 7:a2 5:3
|
|
58 ///
|
|
59
|
|
60 ENTRY G05121 Glycan
|
|
61 COMPOSITION (Gal)2 (GalNAc)1 (GlcNAc)1 (LFuc)1 (Neu5Ac)2
|
|
62 MASS 1477.3
|
|
63 CLASS Glycoprotein; O-Glycan
|
|
64 DBLINKS CCSD: 33350
|
|
65 GlycomeDB: 20599
|
|
66 JCGGDB: JCGG-STR011433
|
|
67 NODE 7
|
|
68 1 GalNAc 0 0
|
|
69 2 Neu5Ac -10 5
|
|
70 3 Gal -10 -5
|
|
71 4 GlcNAc -20 -5
|
|
72 5 Gal -30 0
|
|
73 6 LFuc -30 -10
|
|
74 7 Neu5Ac -40 0
|
|
75 EDGE 6
|
|
76 1 2:a2 1:6
|
|
77 2 3:b1 1:3
|
|
78 3 4:b1 3:3
|
|
79 4 5:b1 4:4
|
|
80 5 6:a1 4:3
|
|
81 6 7:a2 5:3
|
|
82 ///
|
|
83
|
|
84 ENTRY G04183 Glycan
|
|
85 COMPOSITION (Gal)3 (GlcNAc)5 (LFuc)1 (Man)3 (Neu5Ac)3
|
|
86 MASS 3026.8
|
|
87 CLASS Glycoprotein; N-Glycan
|
|
88 DBLINKS CCSD: 41981
|
|
89 GlycomeDB: 19974
|
|
90 JCGGDB: JCGG-STR010756
|
|
91 NODE 15
|
|
92 1 GlcNAc 0 0
|
|
93 2 GlcNAc -10 0
|
|
94 3 Man -20 0
|
|
95 4 Man -30 10
|
|
96 5 Man -30 -10
|
|
97 6 GlcNAc -40 10
|
|
98 7 GlcNAc -40 -5
|
|
99 8 GlcNAc -40 -15
|
|
100 9 Gal -50 10
|
|
101 10 Gal -50 0
|
|
102 11 LFuc -50 -10
|
|
103 12 Gal -50 -15
|
|
104 13 Neu5Ac -60 10
|
|
105 14 Neu5Ac -60 0
|
|
106 15 Neu5Ac -60 -15
|
|
107 EDGE 14
|
|
108 1 2:b1 1:4
|
|
109 2 3:b1 2:4
|
|
110 3 4:a1 3:6
|
|
111 4 5:a1 3:3
|
|
112 5 6:b1 4:2
|
|
113 6 7:b1 5:4
|
|
114 7 8:b1 5:2
|
|
115 8 9:b1 6:4
|
|
116 9 10:b1 7:4
|
|
117 10 11:a1 7:3
|
|
118 11 12:b1 8:4
|
|
119 12 13:a2 9:6
|
|
120 13 14:a2 10:3
|
|
121 14 15:a2 12:6
|
|
122 ///
|
|
123
|
|
124 ENTRY G04329 Glycan
|
|
125 COMPOSITION (Gal)3 (GlcNAc)3 (LFuc)3 (Neu5Ac)1
|
|
126 MASS 1843.7
|
|
127 DBLINKS CCSD: 36620
|
|
128 GlycomeDB: 20084
|
|
129 JCGGDB: JCGG-STR010874
|
|
130 NODE 10
|
|
131 1 GlcNAc 27 -5
|
|
132 2 Gal 18 0
|
|
133 3 LFuc 18 -10
|
|
134 4 GlcNAc 9 0
|
|
135 5 Gal 0 5
|
|
136 6 LFuc 0 -5
|
|
137 7 GlcNAc -9 5
|
|
138 8 Gal -18 10
|
|
139 9 LFuc -18 0
|
|
140 10 Neu5Ac -27 10
|
|
141 EDGE 9
|
|
142 1 2:b1 1:4
|
|
143 2 3:a1 1:3
|
|
144 3 4:b1 2:3
|
|
145 4 5:b1 4:4
|
|
146 5 6:a1 4:3
|
|
147 6 7:b1 5:3
|
|
148 7 8:b1 7:4
|
|
149 8 9:a1 7:3
|
|
150 9 10:a2 8:3
|
|
151 ///
|
|
152 ENTRY G04804 Glycan
|
|
153 COMPOSITION (Gal)3 (GlcNAc)5 (LFuc)1 (Man)3 (Neu5Ac)3
|
|
154 MASS 3026.8
|
|
155 CLASS Glycoprotein; N-Glycan
|
|
156 REFERENCE 1 [PMID:6704968]
|
|
157 Chandrasekaran EV, Davila M, Nixon D, Mendicino J.
|
|
158 Structures of the oligosaccharide chains of two forms of alpha 1-acid glycoprotein purified from liver metastases of lung, colon, and breast tumors.
|
|
159 Cancer. Res. 44 (1984) 1557-67.
|
|
160 DBLINKS CCSD: 8168
|
|
161 GlycomeDB: 33225
|
|
162 JCGGDB: JCGG-STR024138
|
|
163 NODE 15
|
|
164 1 GlcNAc 27.2 1.6
|
|
165 2 GlcNAc 17.2 1.6
|
|
166 3 Man 8.2 1.6
|
|
167 4 Man 0.2 7.6
|
|
168 5 Man 0.2 -4.4
|
|
169 6 GlcNAc -8.8 7.6
|
|
170 7 GlcNAc -8.8 -0.4
|
|
171 8 GlcNAc -8.8 -8.4
|
|
172 9 Gal -17.8 7.6
|
|
173 10 Gal -17.8 3.6
|
|
174 11 LFuc -17.8 -4.4
|
|
175 12 Gal -17.8 -8.4
|
|
176 13 Neu5Ac -26.8 7.6
|
|
177 14 Neu5Ac -26.8 3.6
|
|
178 15 Neu5Ac -26.8 -8.4
|
|
179 EDGE 14
|
|
180 1 2:b1 1:4
|
|
181 2 3:b1 2:4
|
|
182 3 4:a1 3:6
|
|
183 4 5:a1 3:3
|
|
184 5 6:b1 4:2
|
|
185 6 7:b1 5:4
|
|
186 7 8:b1 5:2
|
|
187 8 9:b1 6:4
|
|
188 9 10:b1 7:4
|
|
189 10 11:a1 7:3
|
|
190 11 12:b1 8:4
|
|
191 12 13:a2 9:3
|
|
192 13 14:a2 10:3
|
|
193 14 15:a2 12:6
|
|
194 ///
|
|
195 """, "ringsmcaw_modified": """ENTRY G04845 Glycan
|
|
196 NODE 9
|
|
197 1 Glc 0 0
|
|
198 2 Gal -10 0
|
|
199 3 GlcNAc -20 10
|
|
200 4 GlcNAc -20 -10
|
|
201 5 Gal -30 15
|
|
202 6 LFuc -30 5
|
|
203 7 LFuc -30 -5
|
|
204 8 Gal -30 -15
|
|
205 9 Neu5Ac -40 15
|
|
206 EDGE 8
|
|
207 1 2:b1 1:4
|
|
208 2 3:b1 2:6
|
|
209 3 4:b1 2:3
|
|
210 4 5:b1 3:4
|
|
211 5 6:a1 3:3
|
|
212 6 7:a1 4:4
|
|
213 7 8:b1 4:3
|
|
214 8 9:a2 5:3
|
|
215 ///
|
|
216 ENTRY G05108 Glycan
|
|
217 NODE 7
|
|
218 1 GalNAc 20 1
|
|
219 2 Gal 10 1
|
|
220 3 GlcNAc 0 1
|
|
221 4 S -5 5
|
|
222 5 Gal -10 1
|
|
223 6 LFuc -10 -4
|
|
224 7 Neu5Ac -20 1
|
|
225 EDGE 6
|
|
226 1 2:b1 1:3
|
|
227 2 3:b1 2:3
|
|
228 3 4 3:6
|
|
229 4 5:b1 3:4
|
|
230 5 6:a1 3:3
|
|
231 6 7:a2 5:3
|
|
232 ///
|
|
233 ENTRY G05121 Glycan
|
|
234 NODE 7
|
|
235 1 GalNAc 0 0
|
|
236 2 Neu5Ac -10 5
|
|
237 3 Gal -10 -5
|
|
238 4 GlcNAc -20 -5
|
|
239 5 Gal -30 0
|
|
240 6 LFuc -30 -10
|
|
241 7 Neu5Ac -40 0
|
|
242 EDGE 6
|
|
243 1 2:a2 1:6
|
|
244 2 3:b1 1:3
|
|
245 3 4:b1 3:3
|
|
246 4 5:b1 4:4
|
|
247 5 6:a1 4:3
|
|
248 6 7:a2 5:3
|
|
249 ///
|
|
250 ENTRY G04183 Glycan
|
|
251 NODE 15
|
|
252 1 GlcNAc 0 0
|
|
253 2 GlcNAc -10 0
|
|
254 3 Man -20 0
|
|
255 4 Man -30 10
|
|
256 5 Man -30 -10
|
|
257 6 GlcNAc -40 10
|
|
258 7 GlcNAc -40 -5
|
|
259 8 GlcNAc -40 -15
|
|
260 9 Gal -50 10
|
|
261 10 Gal -50 0
|
|
262 11 LFuc -50 -10
|
|
263 12 Gal -50 -15
|
|
264 13 Neu5Ac -60 10
|
|
265 14 Neu5Ac -60 0
|
|
266 15 Neu5Ac -60 -15
|
|
267 EDGE 14
|
|
268 1 2:b1 1:4
|
|
269 2 3:b1 2:4
|
|
270 3 4:a1 3:6
|
|
271 4 5:a1 3:3
|
|
272 5 6:b1 4:2
|
|
273 6 7:b1 5:4
|
|
274 7 8:b1 5:2
|
|
275 8 9:b1 6:4
|
|
276 9 10:b1 7:4
|
|
277 10 11:a1 7:3
|
|
278 11 12:b1 8:4
|
|
279 12 13:a2 9:6
|
|
280 13 14:a2 10:3
|
|
281 14 15:a2 12:6
|
|
282 ///
|
|
283 ENTRY G04329 Glycan
|
|
284 NODE 10
|
|
285 1 GlcNAc 27 -5
|
|
286 2 Gal 18 0
|
|
287 3 LFuc 18 -10
|
|
288 4 GlcNAc 9 0
|
|
289 5 Gal 0 5
|
|
290 6 LFuc 0 -5
|
|
291 7 GlcNAc -9 5
|
|
292 8 Gal -18 10
|
|
293 9 LFuc -18 0
|
|
294 10 Neu5Ac -27 10
|
|
295 EDGE 9
|
|
296 1 2:b1 1:4
|
|
297 2 3:a1 1:3
|
|
298 3 4:b1 2:3
|
|
299 4 5:b1 4:4
|
|
300 5 6:a1 4:3
|
|
301 6 7:b1 5:3
|
|
302 7 8:b1 7:4
|
|
303 8 9:a1 7:3
|
|
304 9 10:a2 8:3
|
|
305 ///
|
|
306 ENTRY G04804 Glycan
|
|
307 NODE 15
|
|
308 1 GlcNAc 27.2 1.6
|
|
309 2 GlcNAc 17.2 1.6
|
|
310 3 Man 8.2 1.6
|
|
311 4 Man 0.2 7.6
|
|
312 5 Man 0.2 -4.4
|
|
313 6 GlcNAc -8.8 7.6
|
|
314 7 GlcNAc -8.8 -0.4
|
|
315 8 GlcNAc -8.8 -8.4
|
|
316 9 Gal -17.8 7.6
|
|
317 10 Gal -17.8 3.6
|
|
318 11 LFuc -17.8 -4.4
|
|
319 12 Gal -17.8 -8.4
|
|
320 13 Neu5Ac -26.8 7.6
|
|
321 14 Neu5Ac -26.8 3.6
|
|
322 15 Neu5Ac -26.8 -8.4
|
|
323 EDGE 14
|
|
324 1 2:b1 1:4
|
|
325 2 3:b1 2:4
|
|
326 3 4:a1 3:6
|
|
327 4 5:a1 3:3
|
|
328 5 6:b1 4:2
|
|
329 6 7:b1 5:4
|
|
330 7 8:b1 5:2
|
|
331 8 9:b1 6:4
|
|
332 9 10:b1 7:4
|
|
333 10 11:a1 7:3
|
|
334 11 12:b1 8:4
|
|
335 12 13:a2 9:3
|
|
336 13 14:a2 10:3
|
|
337 14 15:a2 12:6
|
|
338 ///
|
|
339 """, "ringsfinger": """ENTRY G00015 Glycan
|
|
340 NODE 8
|
|
341 1 Asn 20 0
|
|
342 2 GlcNAc 12 0
|
|
343 3 GlcNAc 3 0
|
|
344 4 Man -5 0
|
|
345 5 Man -12 5
|
|
346 6 Man -12 -5
|
|
347 7 GlcNAc -20 5
|
|
348 8 GlcNAc -20 -5
|
|
349 EDGE 7
|
|
350 1 2:b1 1
|
|
351 2 3:b1 2:4
|
|
352 3 4:b1 3:4
|
|
353 4 5:a1 4:6
|
|
354 5 6:a1 4:3
|
|
355 6 7:b1 5:2
|
|
356 7 8:b1 6:2
|
|
357 ///
|
|
358 ENTRY G00016 Glycan
|
|
359 NODE 9
|
|
360 1 Asn 20 3
|
|
361 2 GlcNAc 12 3
|
|
362 3 LFuc 4 8
|
|
363 4 GlcNAc 3 -2
|
|
364 5 Man -5 -2
|
|
365 6 Man -12 3
|
|
366 7 Man -12 -7
|
|
367 8 GlcNAc -20 3
|
|
368 9 GlcNAc -20 -7
|
|
369 EDGE 8
|
|
370 1 2:b1 1
|
|
371 2 3:a1 2:6
|
|
372 3 4:b1 2:4
|
|
373 4 5:b1 4:4
|
|
374 5 6:a1 5:6
|
|
375 6 7:a1 5:3
|
|
376 7 8:b1 6:2
|
|
377 8 9:b1 7:2
|
|
378 ///
|
|
379 ENTRY G00017 Glycan
|
|
380 NODE 11
|
|
381 1 Asn 24 3
|
|
382 2 GlcNAc 14 3
|
|
383 3 LFuc 7 8
|
|
384 4 GlcNAc 6 -2
|
|
385 5 Man -2 -2
|
|
386 6 Man -8 3
|
|
387 7 Man -8 -7
|
|
388 8 GlcNAc -16 3
|
|
389 9 GlcNAc -16 -7
|
|
390 10 Gal -24 3
|
|
391 11 Gal -24 -7
|
|
392 EDGE 10
|
|
393 1 2:b1 1
|
|
394 2 3:a1 2:6
|
|
395 3 4:b1 2:4
|
|
396 4 5:b1 4:4
|
|
397 5 6:a1 5:6
|
|
398 6 7:a1 5:3
|
|
399 7 8:b1 6:2
|
|
400 8 9:b1 7:2
|
|
401 9 10:b1 8:4
|
|
402 10 11:b1 9:4
|
|
403 ///
|
|
404 ENTRY G00018 Glycan
|
|
405 NODE 13
|
|
406 1 Asn 28 3
|
|
407 2 GlcNAc 18 3
|
|
408 3 LFuc 10 8
|
|
409 4 GlcNAc 9 -2
|
|
410 5 Man 1 -2
|
|
411 6 Man -5 4
|
|
412 7 Man -5 -8
|
|
413 8 GlcNAc -13 4
|
|
414 9 GlcNAc -13 -8
|
|
415 10 Gal -21 4
|
|
416 11 Gal -21 -8
|
|
417 12 Neu5Ac -29 4
|
|
418 13 Neu5Ac -29 -8
|
|
419 EDGE 12
|
|
420 1 2:b1 1
|
|
421 2 3:a1 2:6
|
|
422 3 4:b1 2:4
|
|
423 4 5:b1 4:4
|
|
424 5 6:a1 5:6
|
|
425 6 7:a1 5:3
|
|
426 7 8:b1 6:2
|
|
427 8 9:b1 7:2
|
|
428 9 10:b1 8:4
|
|
429 10 11:b1 9:4
|
|
430 11 12:a2 10:6
|
|
431 12 13:a2 11:6
|
|
432 ///
|
|
433 ENTRY G00019 Glycan
|
|
434 NODE 9
|
|
435 1 Asn 20 0
|
|
436 2 GlcNAc 12 0
|
|
437 3 GlcNAc 3 0
|
|
438 4 Man -5 0
|
|
439 5 Man -12 5
|
|
440 6 Man -12 -5
|
|
441 7 GlcNAc -15 0
|
|
442 8 GlcNAc -20 5
|
|
443 9 GlcNAc -20 -5
|
|
444 EDGE 8
|
|
445 1 2:b1 1
|
|
446 2 3:b1 2:4
|
|
447 3 4:b1 3:4
|
|
448 4 5:a1 4:6
|
|
449 5 6:a1 4:3
|
|
450 6 7:b1 4:4
|
|
451 7 8:b1 5:2
|
|
452 8 9:b1 6:2
|
|
453 ///
|
|
454 ENTRY G00020 Glycan
|
|
455 NODE 9
|
|
456 1 Asn 20 3
|
|
457 2 GlcNAc 11 3
|
|
458 3 GlcNAc 2 3
|
|
459 4 Man -6 3
|
|
460 5 Man -13 9
|
|
461 6 Man -13 -3
|
|
462 7 GlcNAc -21 9
|
|
463 8 GlcNAc -21 2
|
|
464 9 GlcNAc -21 -8
|
|
465 EDGE 8
|
|
466 1 2:b1 1
|
|
467 2 3:b1 2:4
|
|
468 3 4:b1 3:4
|
|
469 4 5:a1 4:6
|
|
470 5 6:a1 4:3
|
|
471 6 7:b1 5:2
|
|
472 7 8:b1 6:4
|
|
473 8 9:b1 6:2
|
|
474 ///
|
|
475 """, "ringsbroken": """ABCDEFGENTRY G00015 Glycan
|
|
476 NODE 8
|
|
477 1 Asn 20 0
|
|
478 2 GlcNAc 12 0
|
|
479 """
|
|
480 }
|
|
481
|
|
482 self.kcoutput={"ringsmcaw":"""ENTRY G04845 Glycan
|
|
483 NODE 9
|
|
484 1 Glc 0 0
|
|
485 2 Gal -10 0
|
|
486 3 GlcNAc -20 10
|
|
487 4 GlcNAc -20 -10
|
|
488 5 Gal -30 15
|
|
489 6 LFuc -30 5
|
|
490 7 LFuc -30 -5
|
|
491 8 Gal -30 -15
|
|
492 9 Neu5Ac -40 15
|
|
493 EDGE 8
|
|
494 1 2:b1 1:4
|
|
495 2 3:b1 2:6
|
|
496 3 4:b1 2:3
|
|
497 4 5:b1 3:4
|
|
498 5 6:a1 3:3
|
|
499 6 7:a1 4:4
|
|
500 7 8:b1 4:3
|
|
501 8 9:a2 5:3
|
|
502 ///
|
|
503 ENTRY G05108 Glycan
|
|
504 NODE 7
|
|
505 1 GalNAc 20 1
|
|
506 2 Gal 10 1
|
|
507 3 GlcNAc 0 1
|
|
508 4 S -5 5
|
|
509 5 Gal -10 1
|
|
510 6 LFuc -10 -4
|
|
511 7 Neu5Ac -20 1
|
|
512 EDGE 6
|
|
513 1 2:b1 1:3
|
|
514 2 3:b1 2:3
|
|
515 3 4 3:6
|
|
516 4 5:b1 3:4
|
|
517 5 6:a1 3:3
|
|
518 6 7:a2 5:3
|
|
519 ///
|
|
520 ENTRY G05121 Glycan
|
|
521 NODE 7
|
|
522 1 GalNAc 0 0
|
|
523 2 Neu5Ac -10 5
|
|
524 3 Gal -10 -5
|
|
525 4 GlcNAc -20 -5
|
|
526 5 Gal -30 0
|
|
527 6 LFuc -30 -10
|
|
528 7 Neu5Ac -40 0
|
|
529 EDGE 6
|
|
530 1 2:a2 1:6
|
|
531 2 3:b1 1:3
|
|
532 3 4:b1 3:3
|
|
533 4 5:b1 4:4
|
|
534 5 6:a1 4:3
|
|
535 6 7:a2 5:3
|
|
536 ///
|
|
537 ENTRY G04183 Glycan
|
|
538 NODE 15
|
|
539 1 GlcNAc 0 0
|
|
540 2 GlcNAc -10 0
|
|
541 3 Man -20 0
|
|
542 4 Man -30 10
|
|
543 5 Man -30 -10
|
|
544 6 GlcNAc -40 10
|
|
545 7 GlcNAc -40 -5
|
|
546 8 GlcNAc -40 -15
|
|
547 9 Gal -50 10
|
|
548 10 Gal -50 0
|
|
549 11 LFuc -50 -10
|
|
550 12 Gal -50 -15
|
|
551 13 Neu5Ac -60 10
|
|
552 14 Neu5Ac -60 0
|
|
553 15 Neu5Ac -60 -15
|
|
554 EDGE 14
|
|
555 1 2:b1 1:4
|
|
556 2 3:b1 2:4
|
|
557 3 4:a1 3:6
|
|
558 4 5:a1 3:3
|
|
559 5 6:b1 4:2
|
|
560 6 7:b1 5:4
|
|
561 7 8:b1 5:2
|
|
562 8 9:b1 6:4
|
|
563 9 10:b1 7:4
|
|
564 10 11:a1 7:3
|
|
565 11 12:b1 8:4
|
|
566 12 13:a2 9:6
|
|
567 13 14:a2 10:3
|
|
568 14 15:a2 12:6
|
|
569 ///
|
|
570 ENTRY G04329 Glycan
|
|
571 NODE 10
|
|
572 1 GlcNAc 27 -5
|
|
573 2 Gal 18 0
|
|
574 3 LFuc 18 -10
|
|
575 4 GlcNAc 9 0
|
|
576 5 Gal 0 5
|
|
577 6 LFuc 0 -5
|
|
578 7 GlcNAc -9 5
|
|
579 8 Gal -18 10
|
|
580 9 LFuc -18 0
|
|
581 10 Neu5Ac -27 10
|
|
582 EDGE 9
|
|
583 1 2:b1 1:4
|
|
584 2 3:a1 1:3
|
|
585 3 4:b1 2:3
|
|
586 4 5:b1 4:4
|
|
587 5 6:a1 4:3
|
|
588 6 7:b1 5:3
|
|
589 7 8:b1 7:4
|
|
590 8 9:a1 7:3
|
|
591 9 10:a2 8:3
|
|
592 ///
|
|
593 ENTRY G04804 Glycan
|
|
594 NODE 15
|
|
595 1 GlcNAc 27.2 1.6
|
|
596 2 GlcNAc 17.2 1.6
|
|
597 3 Man 8.2 1.6
|
|
598 4 Man 0.2 7.6
|
|
599 5 Man 0.2 -4.4
|
|
600 6 GlcNAc -8.8 7.6
|
|
601 7 GlcNAc -8.8 -0.4
|
|
602 8 GlcNAc -8.8 -8.4
|
|
603 9 Gal -17.8 7.6
|
|
604 10 Gal -17.8 3.6
|
|
605 11 LFuc -17.8 -4.4
|
|
606 12 Gal -17.8 -8.4
|
|
607 13 Neu5Ac -26.8 7.6
|
|
608 14 Neu5Ac -26.8 3.6
|
|
609 15 Neu5Ac -26.8 -8.4
|
|
610 EDGE 14
|
|
611 1 2:b1 1:4
|
|
612 2 3:b1 2:4
|
|
613 3 4:a1 3:6
|
|
614 4 5:a1 3:3
|
|
615 5 6:b1 4:2
|
|
616 6 7:b1 5:4
|
|
617 7 8:b1 5:2
|
|
618 8 9:b1 6:4
|
|
619 9 10:b1 7:4
|
|
620 10 11:a1 7:3
|
|
621 11 12:b1 8:4
|
|
622 12 13:a2 9:3
|
|
623 13 14:a2 10:3
|
|
624 14 15:a2 12:6
|
|
625 ///
|
|
626 """}
|
|
627 os.environ["http_proxy"] = "" # work around for IOError: [Errno url error] invalid proxy for http:
|
|
628 pass
|
|
629
|
|
630 def tearDown(self):
|
|
631 pass
|
|
632
|
|
633 def test_simple_kcf(self):
|
|
634 import StringIO
|
|
635
|
|
636 kcinput = """ENTRY X Glycan
|
|
637 NODE 2
|
|
638 1 galnac 0 0
|
|
639 2 gal -8 0
|
|
640 EDGE 1
|
|
641 1 2:1 1
|
|
642 ///
|
|
643 """
|
|
644
|
|
645 kchandle = StringIO.StringIO(''.join(kcinput))
|
|
646 h = mk.read_meta_kcf(kchandle)
|
|
647 i = mk.flatten_meta_kcf_list(h)
|
|
648 self.assertIn("ENTRY X Glycan\n", i)
|
|
649 self.assertIn("NODE 2\n", i)
|
|
650 self.assertIn(" 1 2:1 1\n", i)
|
|
651
|
|
652
|
|
653
|
|
654 def test_multiple_kcf(self):
|
|
655 import StringIO
|
|
656
|
|
657 kcinput = """ENTRY ((A??)AN) Glycan
|
|
658 NODE 2
|
|
659 1 galnac 0 0
|
|
660 2 gal -8 0
|
|
661 EDGE 1
|
|
662 1 2:1 1
|
|
663 ///
|
|
664 ENTRY G00005 Glycan
|
|
665 NODE 6
|
|
666 1 PP-Dol 15 1
|
|
667 2 GlcNAc 8 1
|
|
668 3 GlcNAc 0 1
|
|
669 4 Man -9 1
|
|
670 5 Man -16 7
|
|
671 6 Man -16 -6
|
|
672 EDGE 5
|
|
673 1 2:a1 1
|
|
674 2 3:b1 2:4
|
|
675 3 4:b1 3:4
|
|
676 4 5:a1 4:6
|
|
677 5 6:a1 4:3
|
|
678 ///
|
|
679 """
|
|
680 kchandle = StringIO.StringIO(''.join(kcinput))
|
|
681 h = mk.read_meta_kcf(kchandle)
|
|
682 i = mk.flatten_meta_kcf_list(h)
|
|
683 self.assertIn(" 1 2:1 1\n", i)
|
|
684 self.assertIn(" 5 6:a1 4:3\n", i)
|
|
685
|
|
686 def test_empty_stream(self):
|
|
687 with self.assertRaises(IOError):
|
|
688 m = mk.read_meta_kcf(None)
|
|
689 with self.assertRaises(IOError):
|
|
690 m = mk.read_meta_kcf([])
|
|
691 with self.assertRaises(IOError):
|
|
692 m = mk.read_meta_kcf("")
|
|
693
|
|
694 def test_mcaw_kcf(self):
|
|
695 import StringIO
|
|
696 kcf = self.kcinput["ringsmcaw"]
|
|
697 handle = StringIO.StringIO(''.join(kcf))
|
|
698 h = mk.read_meta_kcf(handle)
|
|
699 i = mk.flatten_meta_kcf_list(h)
|
|
700 self.assertEqual(i,self.kcoutput["ringsmcaw"])
|
|
701
|
|
702 def run_tests():
|
|
703 unittest.main()
|
|
704
|
|
705
|
|
706 if __name__ == '__main__':
|
|
707 run_tests()
|
|
708
|
|
709
|