# HG changeset patch # User galaxy-australia # Date 1722197395 0 # Node ID 6ab1a261520a4050b09da0c45f82b5a0c967b116 # Parent 2f7702fd0a4c709d3b44deaf467b3613162fdf50 planemo upload for repository https://github.com/usegalaxy-au/tools-au commit c3a90eb12ada44d477541baa4dd6182be29cd554-dirty diff -r 2f7702fd0a4c -r 6ab1a261520a alphafold.html --- a/alphafold.html Wed May 08 06:26:55 2024 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,656 +0,0 @@ - - - - - - - - - Alphafold structure prediction - - - - - - - - - - - - - - -

Alphafold structure prediction

- -
-
-
- -
- -
- Select a representation to display -
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- -
-
-

- Scroll up/down - to zoom in and out -

-

- Click + drag - to rotate the structure -

-

- CTRL + click + drag - to move the structure -

-

- Click - an atom to bring it into focus -

-
- -
-
-
-
-
<50
-
70
-
90+
-
-
- -
-

- - Alphafold produces a - - per-residue confidence score (pLDDT) - - between 0 and 100. Some regions below 50 pLDDT may be - unstructured in isolation. - -

-
-
-
-
- -
-
-

Select model

-

The top-ranked structures predicted by Alphafold

-
- - - - - - - - - -
-
- -
-

Toggle representations

-
- - - - - - - -
-
- -
-

Actions

-
- - - -
-
- -
-

Download

-
- - - -
-
-
-
- - - - - - diff -r 2f7702fd0a4c -r 6ab1a261520a alphafold.xml --- a/alphafold.xml Wed May 08 06:26:55 2024 +0000 +++ b/alphafold.xml Sun Jul 28 20:09:55 2024 +0000 @@ -1,9 +1,9 @@ - + - AI-guided 3D structural prediction of proteins - 2.3.1 + 2.3.2 2.3 - 5 + 0 macro_output.xml macro_test_output.xml @@ -17,12 +17,12 @@ alphafold_2 - neoformit/alphafold:v2.3.1_2 + neoformit/alphafold:v2.3.2_0 - + - - - - - - [0-9]{4}-[0-9]{2}-[0-9]{2} - - - Full database + + + + + + + + +
+ + + + + + + [0-9]{4}-[0-9]{2}-[0-9]{2} + + + + + +
+
@@ -241,6 +296,7 @@ + @@ -250,7 +306,7 @@ - + @@ -260,7 +316,7 @@ - + @@ -281,7 +337,7 @@ - + @@ -303,19 +359,21 @@ - + + + @@ -325,7 +383,7 @@ | AlphaFold v2: AI-guided 3D structural prediction of proteins | - | **NOTE: this tool packages AlphaFold v2.3.1.** + | **NOTE: this tool packages** `a modified branch of AlphaFold v2.3.2. `_ | | This means that the neural network has been trained on PDBs with a release | date before 2021-09-30 (the training cutoff was 2018-04-30 until ``v2.3.0``). @@ -333,12 +391,9 @@ | Find out more in the technical and release notes: | - - `Release notes for v2.3.1 `_ + - `Release notes for v2.3.2 `_ - `Technical notes for v2.3 `_ - | If you want to use AlphaFold trained against an older cutoff date, switch to Galaxy version ``2.1.2`` (which was trained to data up to 2018-04-30). - | - **What it does** *What is AlphaFold?* @@ -362,6 +417,7 @@ | You can choose to input either a file from your Galaxy history or paste a sequence into a text box. | If you choose the ``multimer`` option, you can supply a FASTA file containing **multiple sequences** to be folded concurrently into a multimer. | + | For pairwise screening of target-candidate with multimer, you can submit a list of paired protein sequences in batch mode (i.e. two protein sequences in each FASTA file). | **Outputs** @@ -380,7 +436,7 @@ *PDB files* - | Five PDB (Protein Data Bank) files are be created, ordered by rank, as predicted by AlphaFold. + | PDB (Protein Data Bank) files (5 by default) are be created, ordered by rank, as predicted by AlphaFold. The tool produces 5 models by default, but this can be reduced with the "Limit model outputs" for a reduced run time. | These files describe the molecular structures and can be used for downstream analysis. e.g. *in silico* molecular docking. | **PLEASE NOTE** that all outputs have been renamed to their respective rank order, including model and model.pkl files. | @@ -421,6 +477,12 @@ | | + *timings.json (optional)* + + | A JSON-formatted text file containing the timings for each phase of the prediction. + | + | + **AlphaFold configuration** | We have configured AlphaFold to run with the parameters suggested by default on `AlphaFold's GitHub `_. diff -r 2f7702fd0a4c -r 6ab1a261520a macro_output.xml --- a/macro_output.xml Wed May 08 06:26:55 2024 +0000 +++ b/macro_output.xml Sun Jul 28 20:09:55 2024 +0000 @@ -1,9 +1,17 @@ - - - - + + advanced['limit_model_outputs'] > 4 + + + advanced['limit_model_outputs'] > 3 + + + advanced['limit_model_outputs'] > 2 + + + advanced['limit_model_outputs'] > 1 + @@ -16,6 +24,7 @@ > outputs['pae_csv'] model_preset != "monomer" + advanced['limit_model_outputs'] > 4 outputs['pae_csv'] model_preset != "monomer" + advanced['limit_model_outputs'] > 3 outputs['pae_csv'] model_preset != "monomer" + advanced['limit_model_outputs'] > 2 outputs['pae_csv'] model_preset != "monomer" + advanced['limit_model_outputs'] > 1 outputs['model_pkls'] + advanced['limit_model_outputs'] > 4 outputs['model_pkls'] + advanced['limit_model_outputs'] > 3 outputs['model_pkls'] + advanced['limit_model_outputs'] > 2 outputs['model_pkls'] + advanced['limit_model_outputs'] > 1 outputs['plots'] + advanced['limit_model_outputs'] > 4 outputs['plots'] + advanced['limit_model_outputs'] > 3 outputs['plots'] + advanced['limit_model_outputs'] > 2 outputs['plots'] + advanced['limit_model_outputs'] > 1 outputs['relax_json'] + + + + outputs['timings_json'] + + diff -r 2f7702fd0a4c -r 6ab1a261520a macro_test_output.xml --- a/macro_test_output.xml Wed May 08 06:26:55 2024 +0000 +++ b/macro_test_output.xml Sun Jul 28 20:09:55 2024 +0000 @@ -26,6 +26,14 @@ + + + + + + + + diff -r 2f7702fd0a4c -r 6ab1a261520a scripts/alphafold.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/scripts/alphafold.html Sun Jul 28 20:09:55 2024 +0000 @@ -0,0 +1,656 @@ + + + + + + + + + Alphafold structure prediction + + + + + + + + + + + + + + +

Alphafold structure prediction

+ +
+
+
+ +
+ +
+ Select a representation to display +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+

+ Scroll up/down + to zoom in and out +

+

+ Click + drag + to rotate the structure +

+

+ CTRL + click + drag + to move the structure +

+

+ Click + an atom to bring it into focus +

+
+ +
+
+
+
+
<50
+
70
+
90+
+
+
+ +
+

+ + Alphafold produces a + + per-residue confidence score (pLDDT) + + between 0 and 100. Some regions below 50 pLDDT may be + unstructured in isolation. + +

+
+
+
+
+ +
+
+

Select model

+

The top-ranked structures predicted by Alphafold

+
+ + + + + + + + + +
+
+ +
+

Toggle representations

+
+ + + + + + + +
+
+ +
+

Actions

+
+ + + +
+
+ +
+

Download

+
+ + + +
+
+
+
+ + + + + + diff -r 2f7702fd0a4c -r 6ab1a261520a scripts/outputs.py --- a/scripts/outputs.py Wed May 08 06:26:55 2024 +0000 +++ b/scripts/outputs.py Sun Jul 28 20:09:55 2024 +0000 @@ -42,6 +42,12 @@ 'multimer': 'iptm+ptm', } +HTML_PATH = Path(__file__).parent / "alphafold.html" +HTML_OUTPUT_FILENAME = 'alphafold.html' +HTML_BUTTON_ATTR = 'class="btn" id="btn-ranked_{rank}"' +HTML_BUTTON_ATTR_DISABLED = ( + 'class="btn disabled" id="btn-ranked_{rank}" disabled') + class Settings: """Parse and store settings/config.""" @@ -188,7 +194,7 @@ """Write per-model confidence scores.""" path = context.settings.workdir / OUTPUTS['model_confidence_scores'] with open(path, 'w') as f: - for rank in range(1, 6): + for rank in range(1, len(context.model_pkl_paths) + 1): score = ranking.get_plddt_for_rank(rank) f.write(f'ranked_{rank - 1}\t{score:.2f}\n') @@ -300,6 +306,22 @@ plt.savefig(png_path) +def template_html(context: ExecutionContext): + """Template HTML file. + + Remove buttons that are redundant with limited model outputs. + """ + print("Templating HTML file...") + with open(HTML_PATH) as f: + html = f.read() + for i in range(len(context.model_pkl_paths), 5): + btn_id = HTML_BUTTON_ATTR.format(rank=i) + btn_attr_disabled = HTML_BUTTON_ATTR_DISABLED.format(rank=i) + html = html.replace(btn_id, btn_attr_disabled) + with open(context.settings.output_dir / HTML_OUTPUT_FILENAME, 'w') as f: + f.write(html) + + def main(): """Parse output files and generate additional output files.""" settings = Settings() @@ -307,6 +329,7 @@ ranking = ResultRanking(context) write_confidence_scores(ranking, context) rekey_relax_metrics(ranking, context) + template_html(context) # Optional outputs if settings.output_model_pkls: