-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
67 lines (43 loc) · 2.39 KB
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# -*- coding: utf-8 -*-
"""
Created on Mon May 20 17:43:42 2024
@author: yd123
"""
# -*- coding: utf-8 -*-
"""
Created on Tue May 2 20:03:53 2023
@author: timshen2
"""
import numpy as np
import pandas as pd
import os
import os
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'
from encoding import *
from prediction import *
from SPCC import *
from keras.models import load_model
from Predicate_other import *
from mergedata import *
from train_and_use import *
# # If the data you put in the folder is for diagnosing SLE, you can directly choose DeepTAPE-A_VF, the combination of V gene family and amino acid features performs best for diagnosing SLE.
# # --------------------------------------------------------------------------------------------
result_df = predict_sle_by_DeepTAPE_A_VF('Data/', 'Trained_DeepTAPE/')
print('--------------------------------------------------------------------------------------------')
# # If the data you put in the folder is for diagnosing other autoimmune diseases, you need to use SPCC to select the best feature combination.
# # --------------------------------------------------------------------------------------------
result_df = predict_other_autoimmune_disease('Data/', 'Trained_DeepTAPE/')
print('--------------------------------------------------------------------------------------------')
# # --------------------------------------------------------------------------------------------
result = train_and_use_model('A_V',
'Train_and_Test_Data/Data_for_train/Sample_A_V.csv',
'Train_and_Test_Data/X_test.csv',
'Train_and_Test_Data/Y_test.csv',
'Train_and_Test_Data/neg_Data/',
'Train_and_Test_Data/pos_Data/',
cnn_lstm_res_gene,
'Trained_DeepTAPE/DeepTAPE_A_V_new.h5')
# # --------------------------------------------------------------------------------------------
merged_data_A = mergedata('Train_and_Test_Data/neg_Data/', 'Train_and_Test_Data/pos_Data/', 2000)
merged_data_A_V = mergedata_with_gene('Train_and_Test_Data/neg_Data/', 'Train_and_Test_Data/pos_Data/', 0, 1, 2000)
merged_data_A_VF = mergedata_with_gene_family('Train_and_Test_Data/neg_Data/', 'Train_and_Test_Data/pos_Data/', 0, 1, 2000)