sacdallago / embed.predictprotein.org

Academic Free License v3.0
4 stars 1 forks source link

Improvement (efficiency): retireve existing AF2 3D-structures from UniProt #35

Closed mheinzinger closed 1 year ago

mheinzinger commented 2 years ago

As we already retrieve the sequence for a given UniProt-ID via UniProt's API, we could expand the same logic towards retrieving the AF2 structure (IF existing). This would save compute on unnecessarily re-computing sth that is already there. Logic could be sth as follows:

IF query is in UniProt:

uniprot_sequence = UniProt_API.get_sequence(query)

IF query.comes_with_user_sequence:

    user_sequence = user_input

    IF user_sequence==uniprot_sequence AND UniProt_API.has_AF_structure(query):

        structure = UniProt_API.get_structure(query)

    ELSE:

        structure = predict_structure(query)
mheinzinger commented 2 years ago

Here an example how to access structures from AFDB that Dagmar wrote for her project: Download_AF2_files.txt

t03i commented 1 year ago

We solved it slightly differently.

Based on the standard URL, LambdaPP checks if the structure is available. If not (error 404/500) fall back to structure prediction.