52
52
# this ends up finding the sequence, GMSSHGLQWY
53
53
findseq GMS.*QWY, 1a3h, sele
54
54
55
+ # find the Potential N-linked glycosylation sites in 5fyj
56
+ fetch 5fyj
57
+ findseq N(?=[^P][ST]), 5fyj and chain G+B, 5fyj_pngs
58
+
55
59
NOTES:
56
60
Assumes we're using the ONE LETTER amino acid abbreviations.
57
61
@@ -342,7 +346,7 @@ def findseq(needle, haystack, selName=None, het=0, firstOnly=0):
342
346
aaDict = {'aaList' : []}
343
347
cmd .iterate ("(name ca) and __h" , "aaList.append((resi,resn,chain))" , space = aaDict )
344
348
345
- IDs = [int ( x [0 ]) for x in aaDict ['aaList' ]]
349
+ IDs = [x [0 ] for x in aaDict ['aaList' ]]
346
350
AAs = '' .join ([one_letter [x [1 ]] for x in aaDict ['aaList' ]])
347
351
chains = [x [2 ] for x in aaDict ['aaList' ]]
348
352
@@ -363,9 +367,9 @@ def findseq(needle, haystack, selName=None, het=0, firstOnly=0):
363
367
chain = i_chains [0 ]
364
368
# Only apply chains to selection algebra if there are defined chains.
365
369
if chain :
366
- cmd .select (rSelName , rSelName + " or (__h and i. " + str (IDs [start ]) + "-" + str ( IDs [ stop - 1 ] ) + " and c. " + chain + " )" )
370
+ cmd .select (rSelName , rSelName + " or (__h and i. " + '+' . join (IDs [ii ] for ii in range ( start , stop ) ) + " and c. " + chain + " )" )
367
371
else :
368
- cmd .select (rSelName , rSelName + " or (__h and i. " + str (IDs [start ]) + "-" + str ( IDs [ stop - 1 ] ) + ")" )
372
+ cmd .select (rSelName , rSelName + " or (__h and i. " + '+' . join (IDs [ii ] for ii in range ( start , stop ) ) + ")" )
369
373
if int (firstOnly ):
370
374
break
371
375
cmd .delete ("__h" )
0 commit comments