File tree Expand file tree Collapse file tree 1 file changed +42
-0
lines changed Expand file tree Collapse file tree 1 file changed +42
-0
lines changed Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ # Extract memote scores from html report files.
3
+ # Prints the result to stdout.
4
+
5
+ get_score () {
6
+ # Input 1 is filename
7
+ # Input 2 is query
8
+ echo $( cat $1 | grep -A2 " $2 " | grep -o " [0-9][0-9\.\,]*" )
9
+ }
10
+
11
+ # isolate ID
12
+ ID=$( head -1 $1 )
13
+
14
+ # stoichiometric consistency
15
+ s_con=$( get_score $1 " Stoichiometric Consistency" )
16
+
17
+ # mass balance
18
+ m_bal=$( get_score $1 " Mass Balance" )
19
+
20
+ # charge balance
21
+ c_bal=$( get_score $1 " Charge Balance" )
22
+
23
+ # metabolite connectivity
24
+ m_conn=$( get_score $1 " Metabolite Connectivity" )
25
+
26
+ # unbounded flux
27
+ ubd_flx=$( get_score $1 " Unbounded Flux In Default Medium" )
28
+
29
+ # stoichiometrically balanced cycles
30
+ sbc=$( get_score $1 " Stoichiometrically Balanced Cycles" )
31
+
32
+ # universally blocked reactions
33
+ blocked=$( get_score $1 " Universally Blocked Reactions" )
34
+
35
+ # consistency subscore
36
+ cons_sub=$( get_score $1 " Sub Total" | grep -m 1 -o " [0-9][0-9\.]*" | head -n 1)
37
+
38
+ # total score
39
+ tot_score=$( get_score $1 " Total Score" | grep -m 1 -o " [0-9][0-9\.]*" | head -n 1)
40
+
41
+
42
+ echo -e " $ID \t$s_con \t$m_bal \t$c_bal \t$m_conn \t$ubd_flx \t$sbc \t$blocked \t$cons_sub \t$tot_score "
You can’t perform that action at this time.
0 commit comments