3dem / model-angelo

Automatic atomic model building program for cryo-EM maps
MIT License
116 stars 18 forks source link

Error after Initial C-alpha prediction #30

Closed lstyp closed 1 year ago

lstyp commented 1 year ago

Hi,

I'm trying to run Model Angelo and get the following error after Initial C-alpha prediction:

2023-01-10 at 14:20:29 | INFO | GNN model refinement round 1 with args: {'num_rounds': 3, 'crop_length': 200, 'repeat_per_residue': 3, 'esm_model': 'esm1b_t33_650M_UR50S', 'aggressive_pruning': True, 'seq_attention_batch_size': 200, 'map': 'X.mrc', 'fasta': X1.fasta', 'struct': 'X/output/see_alpha_output/see_alpha_output_ca.cif', 'output_dir': 'X/output/gnn_output_round_1', 'model_dir': '/data/model_angelo_weights/hub/checkpoints/model_angelo/original/gnn', 'device': 'cuda:0'} 2023-01-10 at 14:20:32 | INFO | Loaded module from step: 301201 2023-01-10 at 14:20:41 | ERROR | Error in ModelAngelo Traceback (most recent call last):

File "/home/tafurpet/miniconda3/envs/model_angelo/bin/model_angelo", line 33, in sys.exit(load_entry_point('model-angelo==0.2.2', 'console_scripts', 'model_angelo')()) │ │ └ <function importlib_load_entry_point at 0x7fcf95889160> │ └ └ <module 'sys' (built-in)> File "/home/tafurpet/miniconda3/envs/model_angelo/lib/python3.9/site-packages/model_angelo-0.2.2-py3.9.egg/model_angelo/main.py", line 51, in main args.func(args) │ │ └ Namespace(volume_path='/X.mrc', fasta_path='/data/loewith/tafurp... │ └ <function main at 0x7fce5b046ca0> └ Namespace(volume_path='X.mrc', fasta_path='/data/loewith/tafurp...

File "/home/tafurpet/miniconda3/envs/model_angelo/lib/python3.9/site-packages/model_angelo-0.2.2-py3.9.egg/model_angelo/apps/build.py", line 225, in main gnn_output = gnn_infer(gnn_infer_args) │ └ {'num_rounds': 3, 'crop_length': 200, 'repeat_per_residue': 3, 'esm_model': 'esm1b_t33_650M_UR50S', 'aggressive_pruning': Tru... └ <function infer at 0x7fce5b046c10> File "/home/tafurpet/miniconda3/envs/model_angelo/lib/python3.9/site-packages/model_angelo-0.2.2-py3.9.egg/model_angelo/gnn/inference.py", line 243, in infer protein = get_lm_embeddings_for_protein(lang_model, batch_converter, protein) │ │ │ └ Protein(atom_positions=None, atom14_positions=None, aatype=None, atom_mask=None, atom14_mask=None, residueindex=None, chain... │ │ └ <esm.data.BatchConverter object at 0x7fce4c300190> │ └ ProteinBertModel( │ (embed_tokens): Embedding(33, 1280, padding_idx=1) │ (layers): ModuleList( │ (0): TransformerLayer( │ ... └ <function get_lm_embeddings_for_protein at 0x7fce5be48940> File "/home/tafurpet/miniconda3/envs/model_angelo/lib/python3.9/site-packages/model_angelo-0.2.2-py3.9.egg/model_angelo/data/generate_complete_prot_files.py", line 32, in get_lm_embeddings_for_protein [result[s]["representations"][33].cpu().numpy() for s in seq_names], │ └ ['0'] └ {} File "/home/tafurpet/miniconda3/envs/model_angelo/lib/python3.9/site-packages/model_angelo-0.2.2-py3.9.egg/model_angelo/data/generate_complete_prot_files.py", line 32, in [result[s]["representations"][33].cpu().numpy() for s in seq_names], │ │ └ '0' │ └ '0' └ {}

KeyError: '0' (END)

Unfortunately I lack the programming skills to understand the error message. I followed the standalone installation instructions and downloaded the weights.

I would greatly appreciate any help.

Thanks in advance!

jamaliki commented 1 year ago

Hi!

Seems like an issue with the FASTA file. Would you mind sharing it?

Best, Kiarash.

lstyp commented 1 year ago

Hi Kiarash,

Thanks for your quick reply.

Indeed there was a problem with the Fasta file. Everything is working smooth now.

Thanks a lot!