Skip to content

Commit bb82472

Browse files
committed
create pdb dat file on the fly
1 parent 21601cc commit bb82472

17 files changed

+587
-306
lines changed

Diff for: .github/workflows/docker_build.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ jobs:
2626
rename_residues_mol, combine_structure,
2727
remove_terminal_residue_name_prefixes, molgan,
2828
pdbbind_refined, onionnet-sfct, smina, pdbfixer,
29-
fix_pdb_atom_column, extract_protein, generate_conformers] # No username for pdbind_refined
29+
fix_pdb_atom_column, extract_protein, generate_conformers,
30+
onionnet, combine_pdb, rename_residues_pdb] # No username for pdbind_refined
3031
# skip data/ and cwl_adapters/file_format_conversions/biosimspace/
3132
runs-on: [ubuntu-latest]
3233

Diff for: cwl_adapters/combine_pdb.cwl

+72
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
#!/usr/bin/env cwl-runner
2+
cwlVersion: v1.0
3+
4+
class: CommandLineTool
5+
6+
label: A tool that employs MDAnalysis to combine two PDB structures in a single PDB file.
7+
8+
doc: |-
9+
A tool that employs MDAnalysis to combine two PDB structures in a single PDB file.
10+
11+
baseCommand: ['python', '/combine_pdb.py']
12+
13+
hints:
14+
DockerRequirement:
15+
dockerPull: ndonyapour/combine_pdb
16+
17+
inputs:
18+
input_structure1:
19+
label: Input PDB structure 1 file path
20+
doc: |-
21+
Input PDB structure 1 file path
22+
Type: string
23+
File type: input
24+
Accepted formats: pdb
25+
type: File
26+
format:
27+
- edam:format_1476
28+
inputBinding:
29+
prefix: --input_structure1
30+
31+
input_structure2:
32+
label: Input PDB structure 2 file path
33+
doc: |-
34+
Input PDB structure 2 file path
35+
Type: string
36+
File type: input
37+
Accepted formats: pdb
38+
type: File
39+
format:
40+
- edam:format_1476
41+
inputBinding:
42+
prefix: --input_structure2
43+
44+
output_structure_path:
45+
label: Output combined PDB file path
46+
doc: |-
47+
Output combined PDB file path
48+
Type: string
49+
File type: output
50+
Accepted formats: pdb
51+
Example file: https://github.com/bioexcel/biobb_structure_utils/raw/master/biobb_structure_utils/test/reference/utils/ref_cat_pdb.pdb
52+
type: string
53+
format:
54+
- edam:format_1476
55+
inputBinding:
56+
prefix: --output_structure_path
57+
default: system.pdb
58+
outputs:
59+
output_structure_path:
60+
label: Output protein file path
61+
doc: |-
62+
Output protein file path
63+
type: File
64+
outputBinding:
65+
glob: $(inputs.output_structure_path)
66+
format: edam:format_1476
67+
68+
$namespaces:
69+
edam: https://edamontology.org/
70+
71+
$schemas:
72+
- https://raw.githubusercontent.com/edamontology/edamontology/master/EDAM_dev.owl

Diff for: cwl_adapters/onionnet-feature.cwl

-56
This file was deleted.

Diff for: cwl_adapters/onionnet-score.cwl

-90
This file was deleted.

Diff for: cwl_adapters/onionnet_featurize.cwl

+70
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
#!/usr/bin/env cwl-runner
2+
3+
cwlVersion: v1.0
4+
class: CommandLineTool
5+
6+
label: Generate the features for the protein-ligand complexes using OnionNet V1
7+
8+
baseCommand: ["python", "/onionnet/generate_features.py"]
9+
arguments: ["-inp", "input.dat"]
10+
11+
hints:
12+
DockerRequirement:
13+
dockerPull: ndonyapour/onionnet
14+
15+
requirements:
16+
- class: InlineJavascriptRequirement
17+
# This enables staging input files and dynamically generating a file
18+
# containing the file paths on the fly.
19+
- class: InitialWorkDirRequirement
20+
listing: |
21+
${
22+
var dat_file_contents = "";
23+
for (var i = 0; i < inputs.pdb_paths.length; i++) {
24+
dat_file_contents += inputs.pdb_paths[i].path + "\n";
25+
}
26+
// Note: Uses https://www.commonwl.org/v1.0/CommandLineTool.html#Dirent
27+
// and https://www.commonwl.org/user_guide/topics/creating-files-at-runtime.html
28+
// "If the value is a string literal or an expression which evaluates to a string,
29+
// a new file must be created with the string as the file contents."
30+
return ([{"entryname": "input.dat", "entry": dat_file_contents}]);
31+
}
32+
33+
inputs:
34+
pdb_paths:
35+
label: The path of input pdb files
36+
type: File[]
37+
format:
38+
- edam:format_1476 # PDB
39+
40+
num_of_cpus:
41+
label: number of CPUs to use.
42+
type: int?
43+
format:
44+
- edam:format_2330
45+
inputBinding:
46+
prefix: -nt
47+
default: 1
48+
49+
output_feature_file:
50+
label: the output file name containing the features.
51+
type: string?
52+
format:
53+
- edam:format_3752
54+
inputBinding:
55+
prefix: -out
56+
default: "output.csv"
57+
58+
outputs:
59+
output_feature_file:
60+
type: File
61+
format: edam:format_3752
62+
outputBinding:
63+
glob: $(inputs.output_feature_file)
64+
65+
$namespaces:
66+
edam: https://edamontology.org/
67+
cwltool: http://commonwl.org/cwltool#
68+
69+
$schemas:
70+
- https://raw.githubusercontent.com/edamontology/edamontology/master/EDAM_dev.owl

0 commit comments

Comments
 (0)