-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAD_Validate
More file actions
executable file
·88 lines (72 loc) · 2.14 KB
/
AD_Validate
File metadata and controls
executable file
·88 lines (72 loc) · 2.14 KB
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
#!/usr/bin/env bash
## Validate the contents of the working directory for Automated Antibody Docking
UGAGE="""
Usage:
ADValidate <working directory>
The working directory should contain these things:
- The antibody PDB file
- The glycan PDB file
- An initial configuration file
- If Use_Docker=True, there should also be a docker config file
Return:
- The format is negotiable.
- Indication of success or failure and more info written to a log file.
Notes:
- The two PDB files do not have name restrictions.
- Their names should be in the configuration file.
"""
if [ -z "${1}" ] ; then
echo "A working directory must be specified."
echo "${USAGE}"
exit 1
fi
if [ ! -d "${1}" ] ; then
echo "The supplied name is not a directory."
echo "The supplied name is: "
echo " ${1} "
echo "${USAGE}"
exit 1
fi
#echo "About to call setup"
COMMAND="AD_Setup ${1}"
#echo "The command for calling AD_Setup is $COMMAND"
eval ${COMMAND}
result=$?
if [ ${result} != "0" ] ; then
echo "There was a problem setting up the working directory."
exit 1
fi
if [ ! -e "${1}/ad2config" ] ; then
echo "The supplied directory does not contain an ad2config file."
echo "The supplied name is: "
echo " ${1} "
echo "${USAGE}"
exit 1
fi
export WORKDIR="${1}"
#echo "Workdir in validate is ${WORKDIR}"
export AD2CONFIG="${WORKDIR}/ad2config"
source "${AD2CONFIG}"
if [ -z "Antibody_File_Name" ] ; then
echo "The ad2config file does not contain the name of the antibody file."
echo "${USAGE}"
exit 1
fi
if [ -z "Glycan_File_Name" ] ; then
echo "The ad2config file does not contain the name of the glycan file."
echo "${USAGE}"
exit 1
fi
if [ "${Use_Docker}" == "True" ] ; then
# if [ ! -e "${1}/ad2dockerconfig" ] ; then
# echo "Use_Docker is set to True, but no ad2dockerconfig file is found."
# echo "${USAGE}"
# exit 1
# fi
# source "${1}/ad2dockerconfig"
if [ -z "${Image}" ] ; then
echo "Use_Docker is set to True, but no Image name is specified."
echo "${USAGE}"
exit 1
fi
fi