diff alphafold.xml @ 16:f9eb041c518c draft

planemo upload for repository https://github.com/usegalaxy-au/tools-au commit ee77734f1800350fa2a6ef28b2b8eade304a456f-dirty
author galaxy-australia
date Mon, 03 Apr 2023 01:00:42 +0000
parents a58f7eb0df2c
children 5b85006245f3
line wrap: on
line diff
--- a/alphafold.xml	Fri Mar 10 02:48:07 2023 +0000
+++ b/alphafold.xml	Mon Apr 03 01:00:42 2023 +0000
@@ -2,7 +2,8 @@
     <description> - AI-guided 3D structural prediction of proteins</description>
     <macros>
       <token name="@TOOL_VERSION@">2.3.1</token>
-      <token name="@VERSION_SUFFIX@">1</token>
+      <token name="@TOOL_MINOR_VERSION@">2.3</token>
+      <token name="@VERSION_SUFFIX@">2</token>
       <import>macro_output.xml</import>
       <import>macro_test_output.xml</import>
     </macros>
@@ -24,8 +25,11 @@
 ## in planemo's gx_venv_n/bin/activate script. AlphaFold outputs will be copied
 ## from the test-data directory instead of running the tool.
 
-## $ALPHAFOLD_DB variable should point to the location of the AlphaFold
-## databases - defaults to /data
+## $ALPHAFOLD_DB variable should point to the location containing the versioned
+## AlphaFold databases - defaults to /data
+## that is the directory should contain a subdir / symlink named identical as
+## the value of the TOOL_MINOR_VERSION token which contains the AF reference data
+## for the corresponding version
 
 ## Read FASTA input -----------------------------------------------------------
 #if $fasta_or_text.input_mode == 'history':
@@ -34,7 +38,7 @@
     echo '$fasta_or_text.fasta_text' > input.fasta
 #end if
 
-&& python3 '$__tool_directory__/validate_fasta.py' input.fasta
+&& python3 '$__tool_directory__/scripts/validate_fasta.py' input.fasta
 --min_length \${ALPHAFOLD_AA_LENGTH_MIN:-0}
 --max_length \${ALPHAFOLD_AA_LENGTH_MAX:-0}
 #if $model_preset == 'multimer':
@@ -51,26 +55,26 @@
 #if os.environ.get('PLANEMO_TESTING'):
     ## Run in testing mode (mocks a successful AlphaFold run by copying outputs)
     && echo "Creating dummy outputs for model_preset=$model_preset..."
-    && bash '$__tool_directory__/mock_alphafold.sh' $model_preset
+    && bash '$__tool_directory__/scripts/mock_alphafold.sh' $model_preset
 #else:
     ## Run AlphaFold
     && python /app/alphafold/run_alphafold.py
         --fasta_paths alphafold.fasta
         --output_dir output
-        --data_dir \${ALPHAFOLD_DB:-/data}
+        --data_dir \${ALPHAFOLD_DB:-/data}/@TOOL_MINOR_VERSION@/
         --model_preset=$model_preset
 
         ## Set reference database paths
-        --uniref90_database_path   \${ALPHAFOLD_DB:-/data}/uniref90/uniref90.fasta
-        --mgnify_database_path     \${ALPHAFOLD_DB:-/data}/mgnify/mgy_clusters_2022_05.fa
-        --template_mmcif_dir       \${ALPHAFOLD_DB:-/data}/pdb_mmcif/mmcif_files
-        --obsolete_pdbs_path       \${ALPHAFOLD_DB:-/data}/pdb_mmcif/obsolete.dat
+        --uniref90_database_path   \${ALPHAFOLD_DB:-/data}/@TOOL_MINOR_VERSION@/uniref90/uniref90.fasta
+        --mgnify_database_path     \${ALPHAFOLD_DB:-/data}/@TOOL_MINOR_VERSION@/mgnify/mgy_clusters_2022_05.fa
+        --template_mmcif_dir       \${ALPHAFOLD_DB:-/data}/@TOOL_MINOR_VERSION@/pdb_mmcif/mmcif_files
+        --obsolete_pdbs_path       \${ALPHAFOLD_DB:-/data}/@TOOL_MINOR_VERSION@/pdb_mmcif/obsolete.dat
         #if $dbs == 'full':
-        --bfd_database_path        \${ALPHAFOLD_DB:-/data}/bfd/bfd_metaclust_clu_complete_id30_c90_final_seq.sorted_opt
-        --uniref30_database_path   \${ALPHAFOLD_DB:-/data}/uniref30/UniRef30_2021_03
+        --bfd_database_path        \${ALPHAFOLD_DB:-/data}/@TOOL_MINOR_VERSION@/bfd/bfd_metaclust_clu_complete_id30_c90_final_seq.sorted_opt
+        --uniref30_database_path   \${ALPHAFOLD_DB:-/data}/@TOOL_MINOR_VERSION@/uniref30/UniRef30_2021_03
         #else
         --db_preset=reduced_dbs
-        --small_bfd_database_path  \${ALPHAFOLD_DB:-/data}/small_bfd/bfd-first_non_consensus_sequences.fasta
+        --small_bfd_database_path  \${ALPHAFOLD_DB:-/data}/@TOOL_MINOR_VERSION@/small_bfd/bfd-first_non_consensus_sequences.fasta
         #end if
 
         #if $max_template_date:
@@ -82,16 +86,16 @@
         --use_gpu_relax=\${ALPHAFOLD_USE_GPU:-True}  ## introduced in v2.1.2
 
         #if $model_preset == 'multimer':
-        --pdb_seqres_database_path=\${ALPHAFOLD_DB:-/data}/pdb_seqres/pdb_seqres.txt
-        --uniprot_database_path=\${ALPHAFOLD_DB:-/data}/uniprot/uniprot.fasta
+        --pdb_seqres_database_path=\${ALPHAFOLD_DB:-/data}/@TOOL_MINOR_VERSION@/pdb_seqres/pdb_seqres.txt
+        --uniprot_database_path=\${ALPHAFOLD_DB:-/data}/@TOOL_MINOR_VERSION@/uniprot/uniprot.fasta
         --num_multimer_predictions_per_model=1  ## introduced in v2.2.0
         #else
-        --pdb70_database_path \${ALPHAFOLD_DB:-/data}/pdb70/pdb70
+        --pdb70_database_path \${ALPHAFOLD_DB:-/data}/@TOOL_MINOR_VERSION@/pdb70/pdb70
         #end if
 #end if
 
 ## Generate additional outputs ------------------------------------------------
-&& python3 '$__tool_directory__/outputs.py' output/alphafold
+&& python3 '$__tool_directory__/scripts/outputs.py' output/alphafold
 $outputs.plddts
 $outputs.model_pkls
 $outputs.pae_csv