This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
def format_sequence(sequence): | |
return '\n'.join([sequence[i:i+60] for i in range(0, len(sequence), 60)]) | |
def process_category_name(name): | |
words = name.split() | |
if words[-1].lower() == 'antibiotic': | |
return ' '.join(words[:-1]) | |
return ' '.join(words) |