@@ -115,7 +115,6 @@ def set_underline(peptide_sequence, mutant_peptide_pos, row_ID):
115
115
frameshift = False
116
116
classI_position = 0
117
117
118
- print (row_ID )
119
118
if '-' in mutant_peptide_pos :
120
119
positions = mutant_peptide_pos .split ("-" )
121
120
start_position = int (positions [0 ])
@@ -251,12 +250,12 @@ def main():
251
250
# Create a universal ID by editing the peptide 51mer ID
252
251
peptides_51mer .rename (columns = {'ID' : 'full ID' }, inplace = True )
253
252
peptides_51mer ['ID' ] = peptides_51mer ['full ID' ]
254
- print ()
255
253
256
254
peptides_51mer ['ID' ] = peptides_51mer ['ID' ].apply (lambda x : '.' .join (x .split ('.' )[1 :])) # Removing before first period, periods will be removed
257
255
258
256
peptides_51mer ['ID' ] = peptides_51mer ['ID' ].apply (lambda x : '.' .join (x .split ('.' )[1 :])) # Removing before second period
259
257
peptides_51mer ['ID' ] = peptides_51mer ['ID' ].apply (lambda x : '.' .join (x .split ('.' )[:3 ]) + '.' + '.' .join (x .split ('.' )[4 :]))
258
+
260
259
261
260
for index , row in peptides_51mer .iterrows ():
262
261
for i , char in enumerate (row ['ID' ][::- 1 ]):
@@ -306,7 +305,9 @@ def main():
306
305
classII_peptide = merged_peptide_51mer .loc [merged_peptide_51mer ['full ID' ] == search_string , 'Best Peptide Class II' ].values [0 ]
307
306
#classI_sequence
308
307
classI_peptide = merged_peptide_51mer .loc [merged_peptide_51mer ['full ID' ] == search_string , 'Best Peptide Class I' ].values [0 ]
309
- # mutant pepetide position --- not working yet becasue of STUPID frameshift
308
+
309
+
310
+ # mutant pepetide position ---
310
311
mutant_peptide_pos = str (merged_peptide_51mer .loc [merged_peptide_51mer ['full ID' ] == search_string , 'Pos' ].values [0 ])
311
312
312
313
# Find the tag containing the search string
@@ -326,9 +327,7 @@ def main():
326
327
327
328
# actaully lets break class I and classII into two steps and handle the mutated nucleotide in class I function
328
329
# it should be basically like at that position in the class I set
329
-
330
- print (row ['full ID' ])
331
- print (mutant_peptide_pos )
330
+
332
331
set_underline (peptide_sequence , mutant_peptide_pos , row ['full ID' ])
333
332
334
333
set_span_tags (peptide_sequence ) # pass by reference
@@ -340,7 +339,10 @@ def main():
340
339
modified_html = peptides_51mer_soup .prettify (formatter = None )
341
340
342
341
else :
343
- print ("\n Search string: " , search_string , " not found.\n " )
342
+ print ("\n NOT FOUND: " , search_string )
343
+ print ("Mutant Peptide Position: " , mutant_peptide_pos )
344
+ print ("ClassI: " , classI_peptide )
345
+ print ("ClassII: " , classII_peptide , "\n " )
344
346
345
347
with open (args .o , "w" , encoding = 'utf-8' ) as file :
346
348
file .write (modified_html )
0 commit comments