-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
an error in train_ligand_binging_model. #6
Comments
Hi I cant test your command line now, but I think there are several issue why yours is not working:
|
As Feriolet mentioned, the uniprot ID "Q9Y572O" does not seem to be valid. What protein target are you attempting to train a model for? This issue does highlight that POLYGON should be more graceful when invalid IDs are used. Best, |
Thank you for your advices. File "/home/yanbosmu/mambaforge/lib/python3.10/site-packages/pandas/core/indexes/base.py", line 3805, in get_loc I believe that it was something wrong with my BindingDB files. Can you share the CSV files in tutorial? That would help me find out the reason. |
(/home/yanbosmu/your_path/polygonfinal) 20:15:44yanbosmu@Yanbosmu-PC:~/Bioinfo/polygonfinal/polygon$ polygon train_ligand_binding_model --uniprot_id Q9Y572 --binding_db_path /home/yanbosmu/Bioinfo/polygon/data/outputxx.csv --output_path /home/yanbosmu/Bioinfo/polygon/data/Q9Y572_ligand_binding.pkl The above exception was the direct cause of the following exception: Traceback (most recent call last): |
just ignore those warnings. I also saw those errors, but still got hte pkl files |
Yepp, I also ignore these warnings and still got the pkl result |
@Feriolet Dear all, I solved the problem because I used my proteinID by revising the script. But in the last step Use the chemical embedding to design polypharmacology compounds, I met the another question, errors as follows: I was wondering if you have had the same problem and how you solved it. Thanks. |
Can you send the full error message? The logs that you sent is only from the 'torch' package, not the polygon package. The Error indicates that there is no torch tensor for the The error can be reproduced by the following:
|
Yes I'm very confused. The full error messages as follows: I donnot sure which step is wrong. In the scoring_definition.csv, the pkl file and smi file should be matched? I think my files are matched well. Does a pre-trained model cause this error ? |
Yes, the directory you put in the scoring_definition.csv should match the corresponding target of your interest. I am not using POLYGON anymore, so I cant try to reproduce your error. My wild guess is that there is no potent ligand available in BindingDB.tsv file. Can you try to see if there is a potent ligand in the BindingDB website if it is true? |
The first process of train VAE was successful.
But an error occurred when train_ligand_binging_model.
polygon train_ligand_binding_model --uniprot_id Q9Y572O --binding_db_path /home/yanbosmu/Bioinfo/polygon/data/output.csv --output_path /home/yanbosmu/Bioinfo/polygon/data/Q9Y572_ligand_binding.pkl
Traceback (most recent call last):
File "/home/yanbosmu/mambaforge/bin/polygon", line 8, in
sys.exit(main())
File "/home/yanbosmu/mambaforge/lib/python3.10/site-packages/polygon/run.py", line 849, in main
r = train_ligand_binding_model_main(args)
File "/home/yanbosmu/mambaforge/lib/python3.10/site-packages/polygon/run.py", line 810, in train_ligand_binding_model_main
train_ligand_binding_model( args.uniprot_id,
File "/home/yanbosmu/mambaforge/lib/python3.10/site-packages/polygon/utils/train_ligand_binding_model.py", line 17, in train_ligand_binding_model
binddb = pd.read_csv(binding_db_path, sep="\t",header=0,low_memory=False,error_bad_lines=False)
TypeError: read_csv() got an unexpected keyword argument 'error_bad_lines'
GPT said it was because that PANDAS 2.2 lack of error_bad_lines function. So I delete it in the "train_ligand_binding_model.py".
But then I got a new error listed below.
polygon train_ligand_binding_model --uniprot_id Q9Y572O --binding_db_path /home/yanbosmu/Bioinfo/polygon/data/output.csv --output_path /home/yanbosmu/Bioinfo/polygon/data/Q9Y572_ligand_binding.pkl
Traceback (most recent call last):
File "/home/yanbosmu/mambaforge/lib/python3.10/site-packages/pandas/core/indexes/base.py", line 3805, in get_loc
return self._engine.get_loc(casted_key)
File "index.pyx", line 167, in pandas._libs.index.IndexEngine.get_loc
File "index.pyx", line 196, in pandas._libs.index.IndexEngine.get_loc
File "pandas/_libs/hashtable_class_helper.pxi", line 7081, in pandas._libs.hashtable.PyObjectHashTable.get_item
File "pandas/_libs/hashtable_class_helper.pxi", line 7089, in pandas._libs.hashtable.PyObjectHashTable.get_item
KeyError: 'UniProt (SwissProt) Primary ID of Target Chain'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/yanbosmu/mambaforge/bin/polygon", line 8, in
sys.exit(main())
File "/home/yanbosmu/mambaforge/lib/python3.10/site-packages/polygon/run.py", line 849, in main
r = train_ligand_binding_model_main(args)
File "/home/yanbosmu/mambaforge/lib/python3.10/site-packages/polygon/run.py", line 810, in train_ligand_binding_model_main
train_ligand_binding_model( args.uniprot_id,
File "/home/yanbosmu/mambaforge/lib/python3.10/site-packages/polygon/utils/train_ligand_binding_model.py", line 20, in train_ligand_binding_model
d = binddb[binddb['UniProt (SwissProt) Primary ID of Target Chain']==target_unit_pro_id]
File "/home/yanbosmu/mambaforge/lib/python3.10/site-packages/pandas/core/frame.py", line 4102, in getitem
indexer = self.columns.get_loc(key)
File "/home/yanbosmu/mambaforge/lib/python3.10/site-packages/pandas/core/indexes/base.py", line 3812, in get_loc
raise KeyError(key) from err
any ideas or solution to this?
Is that because it was the newest pandas version I used?
The text was updated successfully, but these errors were encountered: