forked from PKUbioinfo-Zhulab/DeepHoF
-
Notifications
You must be signed in to change notification settings - Fork 0
/
DeepHoF.m
28 lines (28 loc) · 1005 Bytes
/
DeepHoF.m
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
function DeepHoF(SeqFile, OutputFile)
if exist([pwd,'/tmp'],'dir')
cmd=['rm -rf ',pwd,'/tmp'];
unix(cmd);
end
cmd=['mkdir ',pwd,'/tmp'];
unix(cmd);
%%--------------------split sequence---------------------%%%
disp('split sequence');
split_fasta(SeqFile);
%%--------------------sequence one-hot coding-----------------------------------
disp('coding the sequence');
create_onehot('tmp/');
%%--------------------predict------------------%%
disp('predicting the host of the given viral sequence');
predict('tmp/')
%%-------------------combine the score from splited sequences-----------%%
disp('combining the predictions');
cmd=['python ',pwd,'/combine_groups_predicts.py ',SeqFile];
unix(cmd);
%%-------------------calculate the pvalue of the predictions-------------%%
disp('calculating the pvalues');
cmd=['python ',pwd,'/for_pvalue/calculate_pvalue.py ', 'tmp/score.txt ', OutputFile];
unix(cmd);
%cmd=['rm -rf ',pwd,'/tmp'];
%unix(cmd);
disp(' ')
disp('Finished.')