-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrun_vrpt_all.sh
executable file
·162 lines (112 loc) · 3.17 KB
/
run_vrpt_all.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
#!/bin/bash
source ./scripts/env.sh
if [ $has_xml2mmcif_command = "false" ] ; then
echo "xml2mmcif: command not found..."
echo "Please install PDBML2MMCIF (https://sw-tools.rcsb.org/apps/PDBML2CIF/index.html) to generate mmCIF version of wwPDB validation reports."
fi
MTIME=
MTIME_OPT=
VALID_OPT=
FULL_OPT=
ARGV=`getopt --long -o "m:vf" "$@"`
eval set -- "$ARGV"
while true ; do
case "$1" in
-m)
MTIME=$2
shift
;;
-v)
VALID_OPT=$1
;;
-f)
FULL_OPT=$1
;;
*)
break
;;
esac
shift
done
if [ ! -z $MTIME ] ; then
MTIME_OPT="-m "$MTIME
fi
#if [ $PREFER_SIFTS = "true" ] ; then
# ./scripts/update_sifts.sh $MTIME_OPT $FULL_OPT || exit $?
#else
# ./scripts/update_pdbml_nextgen.sh $MTIME_OPT || exit $?
#fi
#./scripts/update_pdbml.sh $MTIME_OPT || exit $?
./scripts/update_vrpt.sh $MTIME_OPT $FULL_OPT || exit $?
huge_number=100000
total=`ls $PDBML_EXT 2> /dev/null | wc -l 2> /dev/null`
ext_pdbml_exit_code=0
ext_info_exit_code=0
if [ -d $PDBML_EXT ] && [ $total -gt $huge_number ] ; then
if [ $PREFER_SIFTS = "true" ] ; then
./scripts/merge_pdbml_sifts.sh
else
./scripts/merge_pdbml_nextgen.sh
fi
./scripts/extract_pdbml.sh $VALID_OPT
ext_pdbml_exit_code=$?
else
if [ $PREFER_SIFTS = "true" ] ; then
./scripts/merge_pdbml_sifts.sh
else
./scripts/merge_pdbml_nextgen.sh
fi
./scripts/validate_all_xml_gz_wo_subdir.sh -d $PDBML_EXT -r
./scripts/extract_pdbml.sh
ext_pdbml_exit_code=$?
if [ ! -z $VALID_OPT ] ; then
./scripts/validate_all_xml_gz_wo_subdir.sh -d $PDBML_EXT
fi
fi
#total=`ls $VALID_INFO_ALT 2> /dev/null | wc -l 2> /dev/null`
total=0
if [ -d $XML_VALID_ALT ] ; then
total=`find $XML_VALID_ALT -mindepth 2 -name '*.xml.gz' | wc -l 2> /dev/null`
fi
#if [ -d $VALID_INFO_ALT ] && [ $total -gt $huge_number ] ; then
if [ -d $XML_VALID_ALT ] && [ $total -gt $huge_number ] ; then
./scripts/extract_info.sh $VALID_OPT
ext_info_exit_code=$?
else
./scripts/extract_info.sh
ext_info_exit_code=$?
if [ ! -z $VALID_OPT ] ; then
# ./scripts/validate_all_xml.sh -d $VALID_INFO_ALT
./scripts/validate_all_xml_gz.sh -d $XML_VALID_ALT
fi
fi
xml_total=`ls $XML_VALID 2> /dev/null | wc -l 2> /dev/null`
rdf_total=`ls $RDF_VALID 2> /dev/null | wc -l 2> /dev/null`
if [[ $(find $_WURCS_CATALOG_XML -mtime +4) ]] ; then
( cd wurcs2glytoucan; ./update_glytoucan.sh )
fi
if [ $ext_pdbml_exit_code = 0 ] || [ $ext_info_exit_code = 0 ] || [ $xml_total -le $huge_number ] || [ $rdf_total -le $huge_number ] ; then
if [ -d $XML_VALID ] && [ $xml_total -gt $huge_number ] ; then
./scripts/merge_pdbml_info.sh -v
else
./scripts/merge_pdbml_info.sh
ls $XML_VALID/*.xml 2> /dev/null
if [ $? = 0 ] ; then
./scripts/validate_all_xml.sh -d $XML_VALID
fi
fi
./scripts/transl_to_rdf_vrpt_from_pdbml_gz.sh
if [ $has_xml2mmcif_command != "false" ] ; then
./scripts/transl_to_mmcif_vrpt_from_pdbml_gz.sh
fi
# Deprecated: update_pdbml.sh has already removed.
# ./scripts/sync_delete_with_pdbml.sh
# Deprecated: update_vrpt.sh has already removed.
# ./scripts/sync_delete_with_vrpt.sh
./scripts/transl_to_rdf_vrpt_alt.sh
if [ $has_xml2mmcif_command != "false" ] ; then
./scripts/transl_to_mmcif_vrpt_alt.sh
fi
fi
echo
echo Everything is up-to-date.