|
| 1 | +#!/usr/bin/env cwl-runner |
| 2 | +cwlVersion: v1.2 |
| 3 | + |
| 4 | +class: CommandLineTool |
| 5 | + |
| 6 | +label: OpenFold Inference |
| 7 | + |
| 8 | +doc: |- |
| 9 | + OpenFold Inference using a pre-trained model. |
| 10 | + |
| 11 | +baseCommand: ['python3', '/opt/openfold/run_pretrained_openfold.py'] |
| 12 | + |
| 13 | +hints: |
| 14 | + cwltool:CUDARequirement: |
| 15 | + cudaVersionMin: "10.2" |
| 16 | + cudaComputeCapability: "3.0" |
| 17 | + cudaDeviceCountMin: 1 |
| 18 | + cudaDeviceCountMax: 1 |
| 19 | + DockerRequirement: |
| 20 | + dockerPull: polusai/openfold-tool@sha256:84e1bb34f9d7ccfbd670e76d3f602334960f65ac091f96e9956ceeef985a9ffe |
| 21 | + dockerOutputDirectory: /app |
| 22 | + |
| 23 | +requirements: |
| 24 | + EnvVarRequirement: |
| 25 | + envDef: |
| 26 | + CONDA_PREFIX: /opt/conda/ |
| 27 | + # needed because https://github.com/aqlaboratory/openfold/blob/6f63267114435f94ac0604b6d89e82ef45d94484/scripts/utils.py#L9 |
| 28 | + InlineJavascriptRequirement: {} |
| 29 | + InitialWorkDirRequirement: |
| 30 | + listing: |
| 31 | + - $(inputs.input_fasta_dir) |
| 32 | + - $(inputs.template_mmcif_dir) |
| 33 | + - $(inputs.BASE_DATA_DIR) |
| 34 | + - $(inputs.PARAMS_DIR) |
| 35 | + |
| 36 | +inputs: |
| 37 | + |
| 38 | + PARAMS_DIR: |
| 39 | + type: Directory |
| 40 | + doc: "Directory containing OpenFold model parameter files." |
| 41 | + |
| 42 | + BASE_DATA_DIR: |
| 43 | + type: Directory |
| 44 | + doc: "Directory containing OpenFold databases." |
| 45 | + |
| 46 | + input_fasta_dir: |
| 47 | + type: Directory |
| 48 | + doc: "Directory containing OpenFold input fasta sequence." |
| 49 | + |
| 50 | + template_mmcif_dir: |
| 51 | + type: Directory |
| 52 | + doc: "MMCIF files to use for template matching. This directory is required even if using template free inference." |
| 53 | + |
| 54 | + input_fasta_dir_string: |
| 55 | + type: string? |
| 56 | + inputBinding: |
| 57 | + position: 1 |
| 58 | + default: /app/fasta |
| 59 | + |
| 60 | + template_mmcif_dir_string: |
| 61 | + type: string? |
| 62 | + inputBinding: |
| 63 | + position: 2 |
| 64 | + default: /app/mmcif_files |
| 65 | + |
| 66 | + output_dir: |
| 67 | + type: string |
| 68 | + inputBinding: |
| 69 | + prefix: --output_dir |
| 70 | + default: "/app" |
| 71 | + doc: "Need to stage outputs in container in a specified directory" |
| 72 | + |
| 73 | + openfold_checkpoint_path: |
| 74 | + type: string? |
| 75 | + inputBinding: |
| 76 | + prefix: --openfold_checkpoint_path |
| 77 | + default: /app/params/finetuning_ptm_1.pt |
| 78 | + doc: "Uses an checkpoint or parameter file. Expected types are Deepspeed checkpoint files or .pt files. Make sure your selected checkpoint file matches the configuration setting chosen in --config_preset" |
| 79 | + |
| 80 | + config_preset: |
| 81 | + type: string? |
| 82 | + inputBinding: |
| 83 | + prefix: --config_preset |
| 84 | + default: "finetuning_ptm" |
| 85 | + doc: "Specify a different model configuration. There are 5 available model preset settings, some of which support template modeling, others support template-free modeling. The default is model_1." |
| 86 | + |
| 87 | + uniref90_database_path: |
| 88 | + type: string? |
| 89 | + inputBinding: |
| 90 | + prefix: --uniref90_database_path |
| 91 | + default: /app/openfold_databases/uniref90/uniref90.fasta |
| 92 | + doc: "For alignments to Uniref90 dataset." |
| 93 | + |
| 94 | + mgnify_database_path: |
| 95 | + type: string? |
| 96 | + inputBinding: |
| 97 | + prefix: --mgnify_database_path |
| 98 | + default: /app/openfold_databases/mgnify/mgy_clusters_2022_05.fa |
| 99 | + doc: "For alignments to Mgnify, dataset." |
| 100 | + |
| 101 | + pdb70_database_path: |
| 102 | + type: string? |
| 103 | + inputBinding: |
| 104 | + prefix: --pdb70_database_path |
| 105 | + default: /app/openfold_databases/pdb70/pdb70 |
| 106 | + doc: "For template matching to PDB70 database" |
| 107 | + |
| 108 | + uniclust30_database_path: |
| 109 | + type: string? |
| 110 | + inputBinding: |
| 111 | + prefix: --uniclust30_database_path |
| 112 | + default: /app/openfold_databases/uniclust30/uniclust30_2018_08/uniclust30_2018_08 |
| 113 | + doc: "For template matching to Uniclust30 database" |
| 114 | + |
| 115 | + bfd_database_path: |
| 116 | + type: string? |
| 117 | + inputBinding: |
| 118 | + prefix: --bfd_database_path |
| 119 | + default: /app/openfold_databases/bfd/bfd_metaclust_clu_complete_id30_c90_final_seq.sorted_opt |
| 120 | + doc: "For alignments to BFD dataset." |
| 121 | + |
| 122 | + model_device: |
| 123 | + type: string? |
| 124 | + inputBinding: |
| 125 | + prefix: --model_device |
| 126 | + default: "cuda:0" |
| 127 | + |
| 128 | +outputs: |
| 129 | + output_files: |
| 130 | + type: File[] |
| 131 | + outputBinding: |
| 132 | + glob: "/app/predictions/*" |
| 133 | + |
| 134 | + |
| 135 | +$namespaces: |
| 136 | + edam: https://edamontology.org/ |
| 137 | + cwltool: http://commonwl.org/cwltool# |
| 138 | + |
| 139 | +$schemas: |
| 140 | +- https://raw.githubusercontent.com/edamontology/edamontology/master/EDAM_dev.owl |
0 commit comments