Views
No views yet
1from transformers import RobertaTokenizer, RobertaForMaskedLM
2
3# Load tokenizer and model from Hugging Face
4tokenizer = RobertaTokenizer.from_pretrained("hemantn/roberta-base-humAb-vh")
5model = RobertaForMaskedLM.from_pretrained("hemantn/roberta-base-humAb-vh")1conda create -n anthroab python=3.10
2conda activate anthroab
3pip install anthroab1import anthroab
2
3# Humanize a heavy chain sequence (VH)
4vh_sequence= "**QLV*SGVEVKKPGASVKVSCKASGYTFTNYYMYWVRQAPGQGLEWMGGINPSNGGTNFNEKFKNRVTLTTDSSTTTAYMELKSLQFDDTAVYYCARRDYRFDMGFDYWGQGTTVTVSS"
5humanized_vh = anthroab.predict_masked(vh_sequence, 'H')
6print(f"Humanized VH: {humanized_vh}")
7
8# Humanize a light chain sequence (VL)
9vl_sequence = "DIQMTQSPSSLSASV*DRVTITCRASQSISSYLNWYQQKPGKAPKLLIYSASTLASGVPSRFSGSGSGTDF*LTISSLQPEDFATYYCQQSYSTPRTFGQGTKVEIK"
10humanized_vl = anthroab.predict_masked(vl_sequence, 'L')
11print(f"Humanized VL: {humanized_vl}")pip install anthroabhemantn/roberta-base-humAb-vh) for VH chain humanization along with a companion VL model for light chain processing.