Opened 19 months ago

Last modified 19 months ago

#14777 assigned defect

Alphafold prediction: invalid character in the sequence

Reported by: Tom Goddard Owned by: Tom Goddard
Priority: high Milestone:
Component: Structure Prediction Version:
Keywords: Cc: Eric Pettersen
Blocked By: Blocking:
Notify when closed: Platform: all
Project: ChimeraX

Description

ChimeraX Alphafold prediction stopped working I believe on March 14, 2024 as described in these 3 bug reports #14771, #14775, #14776.

This was caused by a change in the Google Colab web interface which made sending the sequence from ChimeraX to Google Colab fail silently. Then it tried to run the prediction on the default sequence text which was “Paste a sequence …” containing spaces that led the invalid character error.

Sending the sequence was done in a very hacky way because there are no Colab APIs to do this. So ChimeraX just set the sequence using Javascript to fill the sequence entry field. Colab changed that entry field from an html panel-input element so the entry field is no longer found.

Change History (10)

comment:1 by Tom Goddard, 19 months ago

Predictions first check for an alphafold status page on the rbvi web server to see if it is down. I added that page so users are told that prediction is broken and it may be a few days or more before fixed.

comment:2 by Tom Goddard, 19 months ago

Ideally I’d like to fix this in the Colab python notebook so users do not need to get a new ChimeraX. There is a tricky way to do this. I can make the notebook create an html entry field using a panel-input element in the cell output so that ChimeraX will send the sequence to that entry. And I can put a change callback on that entry which calls back into Python to set the Python sequence variable.

There are some tricks to make this work. Some notebook python code must run to register the change callback and ChimeraX does not run the notebook until after setting the sequence, so currently no python is run before the sequence is set. But there is an option to run the first cell of a notebook automatically when it is loaded. But ChimeraX runs the first cell to do the prediction. I can put in code in the first cell that registers the change callback on the first execution and on the second runs the prediction.

Not sure this will work, but I tested the pieces in a notebook without alphafold or chimerax that worked. Difficult to try on my iphone from China.

This did not work. It appears that ChimeraX gets the page loaded callback before the first cell runs so it tries to send the sequences before the panel-input is created. Also the cell is only run once, possibly because ChimeraX tries to press the run button while it is already running.

Last edited 19 months ago by Tom Goddard (previous) (diff)

comment:3 by Tom Goddard, 19 months ago

Another approach is to just fix the sequence sending in the daily build. It appears that the panel-input entry field was changed to an md-outlined-text-field.

comment:4 by Eric Pettersen, 19 months ago

If the status-checking mechanism were sophisticated enough to discriminate based on the ChimeraX version, once you fix this you could present a message to older versions to upgrade to the current version, and have the current version just work with no message.

comment:5 by Eric Pettersen, 19 months ago

Cc: Eric Pettersen added

comment:6 by Tom Goddard, 19 months ago

If I fix Alphafold prediction with a new ChimeraX I will have the new version check a new status file and update the status file that all older ChimeraX versions check to say a new ChimeraX is needed to run Alphafold.

comment:7 by Eric Pettersen, 19 months ago

Sounds like a simple effective approach.

comment:8 by Tom Goddard, 19 months ago

Fixed in daily build. Made ChimeraX set md-outlined-text-field entry. This is a pretty bad solution since it will break again when Colab changes its web site. Also bad because Alphafold prediction will remain broken in all older ChimeraX. But best I could do working from China on iphone. Will revisit next month.

comment:9 by Tom Goddard, 19 months ago

Should make the Javascript that sets the sequences and that runs the notebook ChimeraX settings that can be updated from a json file on the rbvi web server if those javascript calls fail. This will allow fixing alphafold prediction when the Colab web page changes. The ChimeraX Alphafold database fetch code already does similar runtime updates.

comment:10 by Tom Goddard, 19 months ago

Updated the alphafold prediction error message shown by older ChimeraX to say prediction is fixed in the daily build.

Note: See TracTickets for help on using tickets.