diff alphafold.xml @ 1:6c92e000d684 draft

"planemo upload for repository https://github.com/usegalaxy-au/galaxy-local-tools commit a510e97ebd604a5e30b1f16e5031f62074f23e86"
author galaxy-australia
date Tue, 01 Mar 2022 02:53:05 +0000
parents 7ae9d78b06f5
children 58854e2e6654
line wrap: on
line diff
--- a/alphafold.xml	Fri Jan 28 04:56:29 2022 +0000
+++ b/alphafold.xml	Tue Mar 01 02:53:05 2022 +0000
@@ -1,64 +1,68 @@
 <tool id="alphafold" name="alphafold" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="20.01">
     <description>Alphafold v2.0: AI-guided 3D structure prediction of proteins</description>
     <macros>
-        <token name="@TOOL_VERSION@">2.0.0</token>
-        <token name="@VERSION_SUFFIX@">0</token>
+      <token name="@TOOL_VERSION@">2.0.0</token>
+      <token name="@VERSION_SUFFIX@">0</token>
     </macros>
     <edam_topics>
-        <edam_topic>topic_0082</edam_topic>
+      <edam_topic>topic_0082</edam_topic>
     </edam_topics>
     <edam_operations>
-        <edam_operation>operation_0474</edam_operation>
+      <edam_operation>operation_0474</edam_operation>
     </edam_operations>
+    <xrefs>
+      <xref type="bio.tools">alphafold_2.0</xref>
+    </xrefs>
     <requirements>
-        <container type="docker">neoformit/alphafold-galaxy@sha256:6adf7f07062b307d08c11130c39a28abc7c290b23f6c347b09c2c649c054c338</container>
+        <container type="docker">neoformit/alphafold:latest</container>
     </requirements>
     <command detect_errors="exit_code"><![CDATA[
-        ## fasta setup ----------------------------
-        #if $fasta_or_text.input_mode == 'history':
-            cp '$fasta_or_text.fasta_file' input.fasta &&
+
+## $ALPHAFOLD_DB variable should point to the location of the AlphaFold
+## databases - defaults to /data
+
+## fasta setup ----------------------------
+#if $fasta_or_text.input_mode == 'history':
+    cp '$fasta_or_text.fasta_file' input.fasta &&
 
-        #elif $fasta_or_text.input_mode == 'textbox':
-            echo '$fasta_or_text.fasta_text' > input.fasta &&
-        #end if
+#elif $fasta_or_text.input_mode == 'textbox':
+    echo '$fasta_or_text.fasta_text' > input.fasta &&
+#end if
 
-        python3 '$__tool_directory__/validate_fasta.py' input.fasta &&
+python3 '$__tool_directory__/validate_fasta.py' input.fasta &&
 
-        ## env vars -------------------------------
-        export TF_FORCE_UNIFIED_MEMORY=1 &&
-        export XLA_PYTHON_CLIENT_MEM_FRACTION=4.0 &&
-        export DATE=`date +"%Y-%m-%d"` &&
+## env vars -------------------------------
+export TF_FORCE_UNIFIED_MEMORY=1 &&
+export XLA_PYTHON_CLIENT_MEM_FRACTION=4.0 &&
+export DATE=`date +"%Y-%m-%d"` &&
 
-        ## run alphafold  -------------------------
-        ln -s /app/alphafold/alphafold alphafold &&
-  	    python /app/alphafold/run_alphafold.py
-  	    --fasta_paths alphafold.fasta
-        --output_dir output
-        --data_dir /data                   ## location of the alphafold databases on pulsar node --> could this maybe a env var? $ALPHAFOLD_DB --> \${ALPHAFOLD_DB:-/data}
-        --uniref90_database_path /data/uniref90/uniref90.fasta
-        --mgnify_database_path /data/mgnify/mgy_clusters_2018_12.fa
-        --pdb70_database_path /data/pdb70/pdb70
-        --template_mmcif_dir /data/pdb_mmcif/mmcif_files
-        --obsolete_pdbs_path /data/pdb_mmcif/obsolete.dat
-        --max_template_date=\$DATE
-        --bfd_database_path /data/bfd/bfd_metaclust_clu_complete_id30_c90_final_seq.sorted_opt
-        --uniclust30_database_path /data/uniclust30/uniclust30_2018_08/uniclust30_2018_08
-        &&
+## run alphafold  -------------------------
+python /app/alphafold/run_alphafold.py
+--fasta_paths alphafold.fasta
+--output_dir output
+--data_dir \${ALPHAFOLD_DB:-/data}
+--uniref90_database_path \${ALPHAFOLD_DB:-/data}/uniref90/uniref90.fasta
+--mgnify_database_path \${ALPHAFOLD_DB:-/data}/mgnify/mgy_clusters_2018_12.fa
+--pdb70_database_path \${ALPHAFOLD_DB:-/data}/pdb70/pdb70
+--template_mmcif_dir \${ALPHAFOLD_DB:-/data}/pdb_mmcif/mmcif_files
+--obsolete_pdbs_path \${ALPHAFOLD_DB:-/data}/pdb_mmcif/obsolete.dat
+--max_template_date=\$DATE
+--bfd_database_path \${ALPHAFOLD_DB:-/data}/bfd/bfd_metaclust_clu_complete_id30_c90_final_seq.sorted_opt
+--uniclust30_database_path \${ALPHAFOLD_DB:-/data}/uniclust30/uniclust30_2018_08/uniclust30_2018_08
+--use_gpu_relax=True
+&&
 
-        ## for dry run testing
-        ## cp -r '$__tool_directory__/output' . &&
+## Uncomment for "dummy run" - skip alphafold run and read output from test-data
+## cp -r '$__tool_directory__/output' . &&
 
-        ## generate extra outputs -----------------
-        ## plddts
-        python3 '$__tool_directory__/gen_extra_outputs.py' output/alphafold $output_plddts &&
+## Generate additional outputs ------------
+python3 '$__tool_directory__/gen_extra_outputs.py' output/alphafold $output_plddts &&
 
-        ## html
-        mkdir -p '${ html.files_path }' &&
-        cp '$__tool_directory__/alphafold.html' ${html} &&
-        cp output/alphafold/ranked_*.pdb '${html.files_path}' &&
+## HTML output
+mkdir -p '${ html.files_path }' &&
+cp '$__tool_directory__/alphafold.html' '${html}' &&
+cp output/alphafold/ranked_*.pdb '${html.files_path}'
 
-        ## For some reason the working directory ends up being one level too deep!
-        mv working/* .
     ]]></command>
     <inputs>
         <conditional name="fasta_or_text">