-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild-classify-eMERGE
executable file
·46 lines (36 loc) · 1.7 KB
/
build-classify-eMERGE
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
#!/bin/sh
DISEASE=sitosterolemia
VCFFILE=eMERGE_EMRPhenome/CHR2.recode.vcf.gz
SUFFIX=$1
MAF=$2
GRAPH=eMERGE_${DISEASE}_CHR2_${SUFFIX}
TRAININGFILE=eMERGE_${DISEASE}.labels.txt
TESTINGFILE=eMERGE_${DISEASE}.testing.labels.txt
TRAININGPATHS=eMERGE_${DISEASE}_CHR2_${SUFFIX}.paths.txt
TESTINGPATHS=eMERGE_${DISEASE}_CHR2_${SUFFIX}.testing.paths.txt
BOTHPATHSPREFIX=eMERGE_${DISEASE}_CHR2_${SUFFIX}.both
BOTHPATHS=${BOTHPATHSPREFIX}.paths.txt
## build the graph and training paths
echo "#######################################################"
echo "########## BUILDING GRAPH AND TRAINING PATHS ##########"
echo "#######################################################"
./run-graph-vcf $GRAPH $TRAININGFILE $VCFFILE $MAF
mv eMERGE_${DISEASE}_CHR2_${SUFFIX}.paths.txt.eMERGE_${DISEASE}.labels.txt $TRAININGPATHS
## build the testing paths
echo "############################################"
echo "########## BUILDING TESTING PATHS ##########"
echo "############################################"
./run-graph-vcf-paths $GRAPH $TESTINGFILE $VCFFILE
mv eMERGE_${DISEASE}_CHR2_${SUFFIX}.paths.txt.eMERGE_${DISEASE}.testing.labels.txt $TESTINGPATHS
## classify the graph using training and testing
echo "#################################################"
echo "########## CLASSIFYING GRAPH WITH WEKA ##########"
echo "#################################################"
./classify-graph $GRAPH
## build the combined paths for PRS
cat $TRAININGPATHS $TESTINGPATHS > $BOTHPATHS
## compute PRS on combined paths
echo "#####################################################"
echo "########## COMPUTING PRS ON COMBINED PATHS ##########"
echo "#####################################################"
./run-graphutils-prs $GRAPH $BOTHPATHSPREFIX 0