hpcaitech / FastFold

Optimizing AlphaFold Training and Inference on GPU Clusters
Apache License 2.0
557 stars 86 forks source link

inference error when predicting multimer sequence #119

Closed ssn1771 closed 1 year ago

ssn1771 commented 1 year ago

when i try to inference multimer sequence,i met the error after finishing running alignment and searching for templates: Traceback (most recent call last): File "inference.py", line 513, in main(args) File "inference.py", line 148, in main inference_multimer_model(args) File "inference.py", line 268, in inference_multimer_model processed_feature_dict = feature_processor.process_features( File "/home/FastFold/fastfold/data/feature_pipeline.py", line 124, in process_features return np_example_to_features( File "/home/FastFold/fastfold/data/feature_pipeline.py", line 96, in np_example_to_features features = input_pipeline_multimer.process_tensors_from_config( File "/home/FastFold/fastfold/data/input_pipeline_multimer.py", line 107, in process_tensors_from_config tensors = compose(nonensembled)(tensors) File "/home/FastFold/fastfold/data/data_transforms.py", line 76, in return lambda x: f(x, *args, **kwargs) File "/home/FastFold/fastfold/data/input_pipeline_multimer.py", line 124, in compose x = f(x) File "/home/FastFold/fastfold/data/data_transforms_multimer.py", line 298, in make_msa_profile batch['msa_mask'][..., None], KeyError: 'msa_mask'

i’ve tried several sequences,but met the same error . The sequence is

7M5F_1|Chain A|CdiI|Serratia marcescens (615) MKEIKLMADYHCYPLWGTTPDDFGDISPDELPISLGLKNSLEAWAKRYDAILNTDDPALSGFKSVEEEKLFIDDGYKLAELLQEELGSAYKVIYHADY 7M5F_2|Chain B[auth C]|Toxin CdiA|Serratia marcescens (615) MHHHHHHENLYFQSNAAKNSLTTKSLFKEMTIQGIKFTPENVVGAAKDNSGKIIFLEKGNSKSGLQHIVEEHGDQFAQIGVSEARIPDVVMKAVTDGKIVGYQGAGAGRPIYETMIDGKKYNIAVTVGSNGYVVGANLRGSVK

Shenggan commented 1 year ago

I think it may be a problem with the input format, try using this fasta file as input. target.fasta.txt

ssn1771 commented 1 year ago

I tried the target fasta which you provided and met the same error ><

Traceback (most recent call last): File "inference.py", line 513, in main(args) File "inference.py", line 148, in main inference_multimer_model(args) File "inference.py", line 268, in inference_multimer_model processed_feature_dict = feature_processor.process_features( File "/home/FastFold/fastfold/data/feature_pipeline.py", line 124, in process_features return np_example_to_features( File "/home/FastFold/fastfold/data/feature_pipeline.py", line 96, in np_example_to_features features = input_pipeline_multimer.process_tensors_from_config( File "/home/FastFold/fastfold/data/input_pipeline_multimer.py", line 107, in process_tensors_from_config tensors = compose(nonensembled)(tensors) File "/home/FastFold/fastfold/data/data_transforms.py", line 76, in return lambda x: f(x, *args, **kwargs) File "/home/FastFold/fastfold/data/input_pipeline_multimer.py", line 124, in compose x = f(x) File "/home/FastFold/fastfold/data/data_transforms_multimer.py", line 298, in make_msa_profile batch['msa_mask'][..., None], KeyError: 'msa_mask'

Shenggan commented 1 year ago

Are you using the latest main branch? I can inference this fasta file successfully.

ssn1771 commented 1 year ago

ok, I pull the latest code and it works. Thanks a lot !

Shenggan commented 1 year ago

Thanks, feel free to contact us if you have ant further question.