v-mikhaylov / tfold-release

TFold v1.0
Apache License 2.0
18 stars 2 forks source link

'get_rmsd' error #2

Closed horse2023 closed 1 year ago

horse2023 commented 1 year ago

Hi. Thanks for sharing the code. It's great seeing this technology developing so rapidly.

I'm trying to run tfold and getting an error:

UnboundLocalError: local variable 'get_rmsd' referenced before assignment

Is there anything to fix this?

Kind regards

v-mikhaylov commented 1 year ago

Thanks for your interest in this algorithm. I apologize for the issues. Are any folders created in the /outputs folder? If so, are there any files in those folders?

horse2023 commented 1 year ago

It will create a file in the /outputs but no files.

v-mikhaylov commented 1 year ago

You mean, it will create a folder in '/outputs' but no files in that folder? Do you get any other error messages? Which version of AlphaFold do you use? Does it work without TFold?

There must be a file '/inputs/input.pckl'. It contains a list of inputs, with one entry per model. Is this file created? Is it non-empty?

If there are folders in '/outputs' but no files in them, it means AlphaFold is imported but does not create any models. The error you see is then thrown by the script collect_results.py when it doesn't find any models.

I'll experiment with running my code in different environments and see if I can reproduce the problem. Sorry for the delayed responses.

horse2023 commented 1 year ago

Hi,

Sorry, to clarify an empty folder is created.

The following error:

Traceback (most recent call last): File "tfold_run_alphafold.py", line 196, in app.run(main) File "/spshared/apps/miniconda3/envs/tfold-env/lib/python3.8/site-packages/absl/app.py", line 312, in run _run_main(main, args) File "/spshared/apps/miniconda3/envs/tfold-env/lib/python3.8/site-packages/absl/app.py", line 258, in _run_main sys.exit(main(argv)) File "tfold_run_alphafold.py", line 186, in main predict_structure(sequences=sequences,msas=msas,template_hits=template_hits,renumber_list=renumber_list, File "tfold_run_alphafold.py", line 92, in predict_structure feature_dict=data_pipeline.process(sequences,msas,template_hits) File "/spshared/apps/tfold-release/tfold_patch/tfold_pipeline.py", line 135, in process msa_features=make_msa_features(msas) File "/spshared/apps/tfold-release/tfold_patch/tfold_pipeline.py", line 113, in make_msa_features uniprot_accession_ids.append(identifiers.uniprot_accession_id.encode('utf-8')) AttributeError: 'Identifiers' object has no attribute 'uniprot_accession_id' Traceback (most recent call last): File "collect_results.py", line 12, in result_parse_tools.parse_results(working_dir) File "/spshared/apps/tfold-release/tfold/modeling/result_parse_tools.py", line 74, in parse_results if get_rmsd: UnboundLocalError: local variable 'get_rmsd' referenced before assignment

I'm not sure if it is an error in configuration? I have v2 of alphafold (installed a couple months ago). Alphafold monomer and multimer work fine.

y5-BG39FJZTPu8E5b8Izxch07fYjbkK7uA

v-mikhaylov commented 1 year ago

Thank you! This issue is almost certainly due to the AlphaFold version. (The main error is this: "AttributeError: 'Identifiers' object has no attribute 'uniprot_accession_id' ".) My pipeline was tested with AF version 2.1.0, which you can get here: https://github.com/deepmind/alphafold/releases/tag/v2.1.0. It won't work with the current v. 2.3.2, and probably with some earlier versions as well. I will update tfold_patch at some point, but it is not done yet.

horse2023 commented 1 year ago

Thanks for the reply. Downgrading to v2.1.0 worked.