Skip to content

Commit 8a97c5b

Browse files
moving the modified_html assignment after the if/else to make sure it get assigned even if there is no changes to the peptide sequence
1 parent 3bc6962 commit 8a97c5b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

scripts/color_peptides51mer.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,13 +317,14 @@ def main():
317317
# Remove the tag_with_search_string from the BeautifulSoup tree
318318
tag_with_search_string.decompose()
319319

320-
modified_html = peptides_51mer_soup.prettify(formatter=None)
321320

322321
else:
323322
print("\nNOT FOUND: ", search_string)
324323
print("Mutant Peptide Position: ", mutant_peptide_pos)
325324
print("ClassI: ", classI_peptide)
326325
print("ClassII: ", classII_peptide, "\n")
326+
327+
modified_html = peptides_51mer_soup.prettify(formatter=None)
327328

328329
soup = BeautifulSoup(modified_html, 'html.parser')
329330
tag_with_search_string = soup.select_one('th:-soup-contains("51mer ID")')

0 commit comments

Comments
 (0)