-
Notifications
You must be signed in to change notification settings - Fork 1
/
main_locpcacmi_DREAM3_Ecoli_tpl_k.sh
executable file
·63 lines (47 loc) · 2.48 KB
/
main_locpcacmi_DREAM3_Ecoli_tpl_k.sh
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
#!/bin/bash
#author:chenxofhit@gmail.com
#since 2017-07-07
resdir_locpcacmi="result_loc_pcacmi_k"
mkdir -p $resdir_locpcacmi
resdir_locpcapmi="result_loc_pcapmi_k"
mkdir -p $resdir_locpcapmi
resdir_cmi="result_pca_cmi_k"
mkdir -p $resdir_cmi
resdir_pmi="result_pca_pmi_k"
mkdir -p $resdir_pmi
curdir=`pwd`
#input
datafile="$curdir/db/Dream100/Dream10_Ecoli.csv"
goldenfile="$curdir/db/Dream100/Dream10_Ecoli_golden.txt"
clusterfile="$curdir/$resdir_locpcacmi/Dream10_Ecoli_cluster.mat"
#output
loc_pcacmi_adjmatrix="$curdir/$resdir_locpcacmi/Dream10_Ecoli_adjmatrixg.mat"
loc_pcapmi_adjmatrix="$curdir/$resdir_locpcapmi/Dream10_Ecoli_adjmatrixg.mat"
pca_cmi_adjmatrix="$curdir/$resdir_cmi/Dream10_Ecoli_adjmatrixg.mat"
pca_pmi_adjmatrix="$curdir/$resdir_pmi/Dream10_Ecoli_adjmatrixg.mat"
#res
loc_pcacmi_resfile="$curdir/$resdir_locpcacmi/Dream10_Ecoli.res"
loc_pcapmi_resfile="$curdir/$resdir_locpcapmi/Dream10_Ecoli.res"
pca_cmi_resfile="$curdir/$resdir_cmi/Dream10_Ecoli.res"
pca_pmi_resfile="$curdir/$resdir_pmi/Dream10_Ecoli.res"
lamda=0.03
maxTimes=10
for ((i=1; i<=$maxTimes; i++))
do
echo '#########PCA_CMI######## starts...with source:'$datafile
matlab -nosplash -nodisplay -r "datafile='$datafile';goldenfile='$goldenfile';adjmatrixfile='$pca_cmi_adjmatrix';order0=$i;lamda=$lamda;pca_cmi_sh"
Rscript myeval.R $datafile $goldenfile $pca_cmi_adjmatrix>> $pca_cmi_resfile
echo '#########PCA_PMI######## starts...with source:'$datafile
matlab -nosplash -nodisplay -r "datafile='$datafile';goldenfile='$goldenfile';adjmatrixfile='$pca_pmi_adjmatrix';order0=$i;lamda=$lamda;pca_pmi_sh"
Rscript myeval.R $datafile $goldenfile $pca_pmi_adjmatrix>> $pca_pmi_resfile
echo '#########loc_PCA_CMI######## starts... with source:'$datafile
Rscript loc-PCA-CMI_pc_cluster.R $datafile $goldenfile $clusterfile
matlab -nosplash -nodisplay -r "datafile='$datafile';goldenfile='$goldenfile';clusterfile='$clusterfile';adjmatrixfile='$loc_pcacmi_adjmatrix';order0=$i;lamda=$lamda;loc_PCA_CMI"
Rscript myeval.R $datafile $goldenfile $loc_pcacmi_adjmatrix>> $loc_pcacmi_resfile
echo '#########loc_PCA_PMI######## starts... with source:'$datafile
Rscript loc-PCA-CMI_pc_cluster.R $datafile $goldenfile $clusterfile
matlab -nosplash -nodisplay -r "datafile='$datafile';goldenfile='$goldenfile';clusterfile='$clusterfile';adjmatrixfile='$loc_pcapmi_adjmatrix';order0=$i;lamda=$lamda;loc_PCA_PMI"
Rscript myeval.R $datafile $goldenfile $loc_pcapmi_adjmatrix>> $loc_pcapmi_resfile
done
echo $datafile" methods comparision end..."
exit