tyang816 / ProtSSN

Fusion of protein sequence and structural information, using denoising pre-training network for zero-shot protein engineering (eLife 2024).
MIT License
47 stars 4 forks source link

AssertionError #6

Open QUEST2179 opened 3 months ago

QUEST2179 commented 3 months ago

python zeroshot_predict.py --gnn_model_name k20_h512 --mutant_dataset_dir data/mutant_example/no_exp --result_dir result/no_exp

--------------- ProtSSN k20_h512 --------------- Processing... Processing A0A5J4FAY1_MICAE: 100%|████████████████████████████████████████████████████████| 1/1 [00:02<00:00, 2.10s/it] Total proteins: ['A0A5J4FAY1_MICAE'] Wrong proteins: [] Processing A0A5J4FAY1_MICAE.pt: 100%|█████████████████████████████████████████████████████| 1/1 [00:00<00:00, 61.59it/s] Done!

Protein names: ['A0A5J4FAY1_MICAE'] Number of proteins: 1 k20_h512 Number of trainable parameter: 148.10M Traceback (most recent call last): File "/home/structure/ProtSSN-master/zeroshot_predict.py", line 183, in predict(args=args, plm_model=plm_model, gnn_model=gnn_model, loader=mutant_loader) File "/home/structure/ProtSSN-master/zeroshot_predict.py", line 81, in predict mutant_df[args.score_name] = mutant_df[args.mutant_pos_col].apply( File "/home/miniconda/envs/gpu9/lib/python3.9/site-packages/pandas/core/series.py", line 4757, in apply return SeriesApply( File "/home/miniconda/envs/gpu9/lib/python3.9/site-packages/pandas/core/apply.py", line 1209, in apply return self.apply_standard() File "/home/miniconda/envs/gpu9/lib/python3.9/site-packages/pandas/core/apply.py", line 1289, in apply_standard mapped = obj._map_values( File "/home/miniconda/envs/gpu9/lib/python3.9/site-packages/pandas/core/base.py", line 921, in _map_values return algorithms.map_array(arr, mapper, na_action=na_action, convert=convert) File "/home/miniconda/envs/gpu9/lib/python3.9/site-packages/pandas/core/algorithms.py", line 1814, in map_array return lib.map_infer(values, mapper, convert=convert) File "lib.pyx", line 2926, in pandas._libs.lib.map_infer File "/home/structure/ProtSSN-master/zeroshot_predict.py", line 82, in lambda x: label_row(x, seq, out.cpu().numpy(), offset) File "/home/structure/ProtSSN-master/zeroshot_predict.py", line 45, in label_row assert sequence[idx] == wt, f"The {row}, {sequence[idx]}" AssertionError: The A5V, V

tyang816 commented 3 months ago

Hi, I have fixed the error, I have updated the mutation file due to issues with its generation. Thx

QUEST2179 commented 3 months ago

Great, Thanks!