Skip to content
Snippets Groups Projects
Commit e7e9f40a authored by Ziqian's avatar Ziqian
Browse files

demo

parent 667d8eb7
No related branches found
No related tags found
No related merge requests found
File added
File added
File added
from encoder import *
from seq import *
from seq_gen import *
if __name__ == '__main__':
specie_path = './specie_target.txt'
input_path = "./input_seq.txt"
tar_specie, input_seq_fr, input_cdr = read_input(specie_path, input_path)
print(tar_specie)
print(input_seq_fr)
print(input_cdr)
# 以鼠源抗体人源化为例,data_path中为人的抗体csv
data_path = './' + tar_specie + '.csv'
# 生成FR区共96个位点每个位点可能的氨基酸
seq_list = seq_fre_get(input_seq_fr, data_path)
# 根据每个位点可能氨基酸组合生成所有结果
gen_list = gen_seq(seq_list)
# 将原本鼠序列放在生成序列之后
# 如果输入是从H2开始的,为了后续评分,加上#
if len(input_seq_fr) == 95:
input_seq_fr = '#' + input_seq_fr
gen_list.append(input_seq_fr)
# 分别加载人的模型和特征向量
tar_emb = np.load('./results/features/'+tar_specie+'.features.npy')
model = torch.load('./results/models/'+tar_specie+'.model.pt', map_location='cpu')
# 进行评分并返回生成的抗体数据(完整,包括FR和CDR区)
# seq_score(input_cdr, gen_list, model, tar_emb, 'ans_com.csv')
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment