# HG changeset patch # User galaxy-australia # Date 1660868956 0 # Node ID ca90d17ff51b51a34f124c171fff94347ddf5f71 # Parent eb085b3dbaf873cfae919e218b923ebebe8a4ae4 "planemo upload for repository https://github.com/usegalaxy-au/tools-au commit 03537aada92b5fff565ff48dd47c81462c5df47e" diff -r eb085b3dbaf8 -r ca90d17ff51b README.rst --- a/README.rst Tue Apr 19 00:39:29 2022 +0000 +++ b/README.rst Fri Aug 19 00:29:16 2022 +0000 @@ -9,7 +9,9 @@ This document is designed to provide details on the compute environment required for Alphafold operation, and the Galaxy job destination -settings to run the wrapper. +settings to run the wrapper. We strongly suggest reading this entire document +to ensure that your setup is compatible with the hardware that you are +deploying to. For full details on Alphafold requirements, see https://github.com/deepmind/alphafold. @@ -163,11 +165,9 @@ A few parameters can be customized with the use of environment variables set in the job destination: - ``ALPHAFOLD_DB``: path to the reference database root (default ``/data``) -- ``ALPHAFOLD_AA_LENGTH_MIN``: minimum accepted sequence length (default ``30``) -- ``ALPHAFOLD_AA_LENGTH_MAX``: maximum accepted sequence length (default ``2000``) - -For the last two, these could be set to ``0`` and ``50000`` respectively to remove the valiation entirely. - +- ``ALPHAFOLD_USE_GPU [True/False]``: set to ``False`` to disable GPU dependency (defaults to ``True``) +- ``ALPHAFOLD_AA_LENGTH_MIN``: minimum accepted sequence length (default ``0``) +- ``ALPHAFOLD_AA_LENGTH_MAX``: maximum accepted sequence length (default ``0`` - no validation) Closing ~~~~~~~ diff -r eb085b3dbaf8 -r ca90d17ff51b alphafold.xml --- a/alphafold.xml Tue Apr 19 00:39:29 2022 +0000 +++ b/alphafold.xml Fri Aug 19 00:29:16 2022 +0000 @@ -2,7 +2,7 @@ - AI-guided 3D structural prediction of proteins 2.1.2 - 0 + 1 topic_0082 @@ -30,8 +30,8 @@ #end if python3 '$__tool_directory__/validate_fasta.py' input.fasta ---min_length \${ALPHAFOLD_AA_LENGTH_MIN:-30} ---max_length \${ALPHAFOLD_AA_LENGTH_MAX:-2000} +--min_length \${ALPHAFOLD_AA_LENGTH_MIN:-0} +--max_length \${ALPHAFOLD_AA_LENGTH_MAX:-0} > alphafold.fasta && ## env vars ------------------------------- @@ -53,12 +53,9 @@ --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 ## Param introduced in AlphaFold v2.1.2: ---use_gpu_relax=True +--use_gpu_relax=\${ALPHAFOLD_USE_GPU:-True} && -## Uncomment for "dummy" output - read output from test-data -## cp -r '$__tool_directory__/output' . && - ## Generate additional outputs ------------ python3 '$__tool_directory__/gen_extra_outputs.py' output/alphafold $output_plddts && @@ -75,7 +72,7 @@ ]]> - + diff -r eb085b3dbaf8 -r ca90d17ff51b validate_fasta.py --- a/validate_fasta.py Tue Apr 19 00:39:29 2022 +0000 +++ b/validate_fasta.py Fri Aug 19 00:29:16 2022 +0000 @@ -3,7 +3,7 @@ import re import sys import argparse -from typing import List, TextIO +from typing import List class Fasta: @@ -98,10 +98,10 @@ def validate_num_seqs(self) -> None: """Assert that only one sequence has been provided.""" if len(self.fasta_list) > 1: - raise ValueError( - 'Error encountered validating FASTA:\n' - f' More than 1 sequence detected ({len(self.fasta_list)}).' - ' Please use single FASTA sequence as input.') + sys.stderr.write( + 'WARNING: More than 1 sequence detected.' + ' Using first FASTA sequence as input.\n') + self.fasta_list = self.fasta_list[:1] elif len(self.fasta_list) == 0: raise ValueError( 'Error encountered validating FASTA:\n' @@ -159,7 +159,7 @@ formatted_seq = '' for i in range(0, len(aa_seq), self.line_wrap): formatted_seq += aa_seq[i: i + self.line_wrap] + '\n' - return formatted_seq + return formatted_seq.upper() def main():