-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetupDatabases.sh
More file actions
executable file
·44 lines (30 loc) · 928 Bytes
/
setupDatabases.sh
File metadata and controls
executable file
·44 lines (30 loc) · 928 Bytes
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
#!/bin/bash
#rm gdb.config 2> /dev/null
DATE_WITH_TIME=`date "+%Y%m%d-%H%M%S"`
mv gdb.config gdb.config.$DATE_WITH_TIME
find . -depth -name '*.zip' -exec /usr/bin/unzip -n {} \; -delete
wget -q https://raw.githubusercontent.com/bridgedb/BridgeDb/master/dbbuilder/src/org/bridgedb/extract/SpeciesList -O SpeciesList
while IFS=$'\t' read -r -a myArray
do
#echo "a ${myArray[0]}"
#echo "b ${myArray[1]}"
echo "c ${myArray[4]}"
path=`pwd`
file=`ls | grep "^${myArray[4]}_Derby_"`
if [ ${#file} -ge 1 ]; then
#echo $path
echo -e "file $file"
#echo -e "${myArray[2]}\n"
echo -e "${myArray[0]}\t$path/$file" >> gdb.config
fi
done < SpeciesList
#metabolites (automate)
file=`ls | grep "metabolites_"`
if [ ${#file} -ge 1 ]; then
echo -e "* $path/$file" >> gdb.config
fi
#interactions (automate)
file=`ls | grep "interactions_"`
if [ ${#file} -ge 1 ]; then
echo -e "* $path/$file" >> gdb.config
fi