-
Notifications
You must be signed in to change notification settings - Fork 11
/
benchmark_pipeline.sh
34 lines (30 loc) · 1.58 KB
/
benchmark_pipeline.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
#!/bin/sh
#This is an example bash file to generate benchmarks for each species separately
#benchmark creation tool can be found at https://github.com/nguyenngochuy91/CAFA_benchmark
rawbenchmarkoutput=" "
#Above folder is the output folder from the benchmark creation tool
benchmarkfolder=""
#Above folder is the CAFA-compatible benchmark folder
t1file=""
#t1 gaf file for the benchmark creation tool (this is non-species specific and has no extension)
#For example, gaf file name is uniprot_goa_20170202_9606.gaf, then t1file='uniprot_goa_20170202'
t2file=""
#t2 gaf file for the benchmark creation tool (this is non-species specific and has no extension)
for taxon in '85962' '83333' '10116' '7955' '273057' '160488' '170187' '224308' '243273' '243232' '44689' '559292' '284812' '3702' '8355' '10090' '223283' '99287' '321314' '9606'
do
./create_benchmark.py -t1 ./$t1file_$taxon.gaf -t2 ./$t2file_$taxon.gaf -o $rawbenchmarkoutput
for type in 'NK' 'LK'
do
for ontology in 'bpo' 'cco' 'mfo'
do
file="$rawbenchmarkoutput/$t1file_$taxon.gaf-gaf_benchmark_$type_$ontology
#above is the file name for the output generated by the benchmark creation tool
./benchmark_folder.py $file -b $benchmarkfolder -s $taxon -t $type -o $ontology
done
done
done
#Below concatenates groundtruth files together
groundtruthfolder="./benchmark20170605/groundtruth/"
cat "$groundtruthfolder"leafonly_*_BPO.txt >"$groundtruthfolder"leafonly_BPO.txt
cat "$groundtruthfolder"leafonly_*_CCO.txt >"$groundtruthfolder"leafonly_CCO.txt
cat "$groundtruthfolder"leafonly_*_MFO.txt >"$groundtruthfolder"leafonly_MFO.txt