Skip to content

Commit 5c6786e

Browse files
authored
Merge pull request PolusAI#250 from ndonyapour/boolstr_to_bool
replace boolean string with boolean
2 parents 60a1751 + da54167 commit 5c6786e

File tree

6 files changed

+15
-15
lines changed

6 files changed

+15
-15
lines changed

cwl_adapters/autodock_vina_filter.cwl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ baseCommand: python3
1313

1414
hints:
1515
DockerRequirement:
16-
dockerPull: jakefennick/autodock_vina_filter
16+
dockerPull: ndonyapour/autodock_vina_filter
1717

1818
requirements:
1919
InlineJavascriptRequirement: {}
@@ -115,7 +115,7 @@ inputs:
115115
label: Use True if autodock vina was run with --rescore
116116
doc: |-
117117
Use True if autodock vina was run with --rescore
118-
type: string?
118+
type: boolean?
119119
format:
120120
- edam:format_2330
121121
inputBinding:

cwl_adapters/config_tag/config_tag_pdb.cwl

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,10 @@ inputs:
1616
type: string
1717
format:
1818
- edam:format_2330
19-
19+
# Note: Even though the "filter" argument has a boolean type, it cannot accept the value True.
20+
# https://biobb-io.readthedocs.io/en/latest/api.html#module-api.pdb
2021
filter:
21-
type: string?
22+
type: ["null", boolean, {"type": "array", "items": "string"}]
2223

2324
outputs:
2425
output_config_string:
@@ -32,12 +33,11 @@ outputs:
3233
${
3334
var config = {};
3435
config["pdb_code"] = inputs.pdb_id;
35-
if (inputs.filter == "False") {
36-
config["filter"] = false;
37-
} else if (inputs.filter == "None") {
38-
config["filter"] = null;
39-
} else if (inputs.filter) {
40-
config["filter"] = inputs.filter;
36+
if (inputs.filter == true) {
37+
throw new Error("Error! filter doesn't accept True value");
38+
}
39+
else {
40+
config["filter"] = inputs.filter;
4141
}
4242
return JSON.stringify(config);
4343
}

docker/dockerBuild.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ sudo docker build --no-cache --pull -f Dockerfile_align_protein_ca_mda -t jakefe
2020
sudo docker build --no-cache --pull -f Dockerfile_align_protein_ca_pymol -t jakefennick/align_protein_ca_pymol .
2121
sudo docker build --no-cache --pull -f Dockerfile_atomselect -t jakefennick/atomselect .
2222
sudo docker build --no-cache --pull -f Dockerfile_autodock_vina -t jakefennick/autodock_vina .
23-
sudo docker build --no-cache --pull -f Dockerfile_autodock_vina_filter -t jakefennick/autodock_vina_filter .
23+
sudo docker build --no-cache --pull -f Dockerfile_autodock_vina_filter -t ndonyapour/autodock_vina_filter .
2424
sudo docker build --no-cache --pull -f Dockerfile_bash_scripts -t jakefennick/bash_scripts .
2525
sudo docker build --no-cache --pull -f Dockerfile_calculate_net_charge -t jakefennick/calculate_net_charge .
2626
sudo docker build --no-cache --pull -f Dockerfile_mol2_to_pdbqt -t jakefennick/mol2_to_pdbqt .

dockerPull.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ docker pull jakefennick/align_protein_ca_mda
1111
docker pull jakefennick/align_protein_ca_pymol
1212
docker pull jakefennick/atomselect
1313
docker pull jakefennick/autodock_vina
14-
docker pull jakefennick/autodock_vina_filter
14+
docker pull ndonyapour/autodock_vina_filter
1515
docker pull jakefennick/bash_scripts
1616
docker pull jakefennick/calculate_net_charge
1717
docker pull jakefennick/generate_conformers

examples/docking/vs_demo_4.wic

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ steps:
2121
scatter: [pdb_id]
2222
in:
2323
pdb_id: !* pdbids
24-
filter: !ii "False"
24+
filter: !ii False
2525
out:
2626
- output_config_string: !& pdb_id_str
2727
pdb:
@@ -94,7 +94,7 @@ steps:
9494
docking_score_cutoff: !ii -1.0
9595
max_num_poses_per_ligand: !ii 1
9696
max_num_poses_total: !ii 1 #25 # Use 1 for CI same as max_row
97-
rescore: !ii 'True'
97+
rescore: !ii True
9898
input_ligand_pdbqt_path: !* ligand_rescore.pdbqt
9999
input_receptor_pdbqt_path: !* receptor_dup_2D.pdb
100100
out:

examples/scripts/autodock_vina_filter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
parser.add_argument('--docking_score_cutoff', type=float)
1111
parser.add_argument('--max_num_poses_per_ligand', type=int)
1212
parser.add_argument('--max_num_poses_total', type=int)
13-
parser.add_argument('--rescore', type=bool)
13+
parser.add_argument('--rescore', required=False, action='store_true')
1414
args = parser.parse_args()
1515

1616
input_log_path = args.input_log_path

0 commit comments

Comments
 (0)