@@ -110,23 +110,25 @@ def annotate_every_nucleotide(sequence, classI_peptide, classII_peptide):
110
110
111
111
return (peptide_sequence )
112
112
113
- def set_underline (peptide_sequence , mutant_peptide_pos ):
113
+ def set_underline (peptide_sequence , mutant_peptide_pos , row_ID ):
114
114
115
115
frameshift = False
116
116
classI_position = 0
117
117
118
+ print (row_ID )
118
119
if '-' in mutant_peptide_pos :
119
-
120
120
positions = mutant_peptide_pos .split ("-" )
121
-
122
121
start_position = int (positions [0 ])
123
122
end_position = int (positions [1 ])
124
123
125
124
frameshift = True
125
+
126
126
127
127
else :
128
128
mutant_peptide_pos = int (mutant_peptide_pos )
129
129
130
+
131
+
130
132
if frameshift :
131
133
132
134
continue_underline = False
@@ -249,8 +251,10 @@ def main():
249
251
# Create a universal ID by editing the peptide 51mer ID
250
252
peptides_51mer .rename (columns = {'ID' : 'full ID' }, inplace = True )
251
253
peptides_51mer ['ID' ] = peptides_51mer ['full ID' ]
254
+ print ()
252
255
253
256
peptides_51mer ['ID' ] = peptides_51mer ['ID' ].apply (lambda x : '.' .join (x .split ('.' )[1 :])) # Removing before first period, periods will be removed
257
+
254
258
peptides_51mer ['ID' ] = peptides_51mer ['ID' ].apply (lambda x : '.' .join (x .split ('.' )[1 :])) # Removing before second period
255
259
peptides_51mer ['ID' ] = peptides_51mer ['ID' ].apply (lambda x : '.' .join (x .split ('.' )[:3 ]) + '.' + '.' .join (x .split ('.' )[4 :]))
256
260
@@ -323,7 +327,9 @@ def main():
323
327
# actaully lets break class I and classII into two steps and handle the mutated nucleotide in class I function
324
328
# it should be basically like at that position in the class I set
325
329
326
- set_underline (peptide_sequence , mutant_peptide_pos )
330
+ print (row ['full ID' ])
331
+ print (mutant_peptide_pos )
332
+ set_underline (peptide_sequence , mutant_peptide_pos , row ['full ID' ])
327
333
328
334
set_span_tags (peptide_sequence ) # pass by reference
329
335
0 commit comments