1+ #!/usr/bin/env cwl-runner
2+ cwlVersion: v1.0
3+
4+ class: CommandLineTool
5+
6+ label : Download the PDBbind refined database
7+
8+ doc : |-
9+ Download the PDBbind refined database
10+
11+ baseCommand : ['python3' , '/generate_conformers. py' ]
12+
13+ hints :
14+ DockerRequirement:
15+ dockerPull: ndonyapour/generate_conformers
16+
17+ requirements :
18+ InlineJavascriptRequirement: {}
19+
20+ inputs :
21+ input_excel_path:
22+ label : Path to the input xlsx file
23+ type : File
24+ format :
25+ - edam:format_3620
26+ inputBinding :
27+ prefix : --input_excel_path
28+
29+ query:
30+ label : query str to search the dataset
31+ doc : |-
32+ query str to search the dataset
33+ Type: string
34+ File type : input
35+ Accepted formats: txt
36+ type : string
37+ format :
38+ - edam:format_2330
39+ inputBinding :
40+ prefix : --query
41+
42+ output_txt_path:
43+ label : Path to the text dataset file
44+ doc : |-
45+ Path to the text dataset file
46+ Type: string
47+ File type : output
48+ Accepted formats: txt
49+ type : string
50+ format :
51+ - edam:format_2330
52+ inputBinding :
53+ prefix : --output_txt_path
54+ default : system.log
55+
56+ output_sdf_path:
57+ label : Path to the input file
58+ doc : |-
59+ Path to the input file
60+ Type: string
61+ File type : input
62+ Accepted formats: sdf
63+ type : string
64+ format :
65+ - edam:format_3814 # sdf
66+
67+ min_row:
68+ label : The row min index
69+ doc : |-
70+ The row min inex
71+ Type: int
72+ type : int ?
73+ format :
74+ - edam:format_2330
75+ inputBinding :
76+ prefix : --min_row
77+
78+ max_row:
79+ label : The row max index
80+ doc : |-
81+ The row max inex
82+ Type: int
83+ type : int ?
84+ format :
85+ - edam:format_2330
86+ inputBinding :
87+ prefix : --max_row
88+
89+ smiles_column:
90+ label : The name of the smiles column
91+ doc : |-
92+ The name of the smiles column
93+ Type: string
94+ File type : output
95+ Accepted formats: txt
96+ type : string
97+ format :
98+ - edam:format_2330
99+ inputBinding :
100+ prefix : --smiles_column
101+
102+ binding_data_column:
103+ label : The name of the binding data column
104+ doc : |-
105+ The name of the binding data column
106+ Type: string
107+ File type : output
108+ Accepted formats: txt
109+ type : string
110+ format :
111+ - edam:format_2330
112+ inputBinding :
113+ prefix : --binding_data_column
114+
115+ convert_Kd_dG:
116+ label : If this is set to true, dG will be calculated
117+ doc : If this is set to true, dG will be calculated
118+ type : boolean
119+ format :
120+ - edam:format_2330
121+ inputBinding :
122+ prefix : --convert_Kd_dG
123+ default : False
124+
125+ experimental_dGs:
126+ label : Experimental Free Energies of Binding
127+ doc : |-
128+ Experimental Free Energies of Binding
129+ type : string ?
130+ format :
131+ - edam:format_2330
132+
133+ outputs :
134+ output_txt_path:
135+ label : Path to the txt file
136+ doc : |-
137+ Path to the txt file
138+ type : File
139+ outputBinding :
140+ glob : $(inputs.output_txt_path)
141+ format : edam:format_2330
142+
143+ output_sdf_path:
144+ label : Path to the input file
145+ doc : |-
146+ Path to the input file
147+ Type: string
148+ File type : input
149+ Accepted formats: sdf
150+ type : File []
151+ outputBinding :
152+ # NOTE: Do NOT just use glob: ./*.sdf !!! This will return an array sorted by filenames.
153+ # We want the order of output_sdf_paths to match the order of experimental_dGs, etc
154+ # Because we need to compare experimental ΔGs with predicted values.
155+ glob : $(inputs.output_txt_path)
156+ loadContents : true
157+ outputEval : |
158+ ${
159+ var lines = self[0].contents.split("\n" );
160+ var sdfs = [];
161+ for (var idx = 0; idx < lines.length; idx++) {
162+ var words = lines[idx].split(" " );
163+ var sdffile = {"class" : "File" , "path" : "ligand_" + idx + ". sdf" };
164+ sdfs.push(sdffile);
165+ }
166+
167+ return sdfs;
168+ }
169+ format : edam:format_3814
170+
171+ experimental_dGs:
172+ label : Experimental Free Energies of Binding
173+ doc : |-
174+ Experimental Free Energies of Binding
175+ type : float []
176+ outputBinding :
177+ # NOTE: Do NOT just use $(inputs.output_txt_path) !!! This will return an array sorted by filenames.
178+ # We want the order of output_sdf_paths to match the order of experimental_dGs, etc
179+ # Because we need to compare experimental ΔGs with predicted values.
180+ glob : $(inputs.output_txt_path)
181+ loadContents : true
182+ outputEval : |
183+ ${
184+ var lines = self[0].contents.split("\n" );
185+ var experimental_dGs = [];
186+ for (var i = 0; i < lines.length; i++) {
187+ var words = lines[i].split(" " );
188+ if (words.length > 2) {
189+ var experimental_dG = parseFloat(words[2]);
190+ experimental_dGs.push(experimental_dG);
191+ }
192+ }
193+
194+ if (experimental_dGs.length == 0) {
195+ throw new Error("Error! Experimental dGs are empty!" );
196+ } else {
197+ return experimental_dGs;
198+ }
199+ }
200+
201+ $namespaces:
202+ edam: https://edamontology.org/
203+
204+ $schemas:
205+ - https://raw.githubusercontent.com/edamontology/edamontology/master/EDAM_dev.owl
0 commit comments