pulimeng / etoxpred Goto Github PK
View Code? Open in Web Editor NEWA simple tool to predict the general toxicity and calculate the synthesize accessibility (SA) score for small molecules.
License: GNU General Public License v3.0
A simple tool to predict the general toxicity and calculate the synthesize accessibility (SA) score for small molecules.
License: GNU General Public License v3.0
Is it must to use theano? Because theano will not get support anymore, so people use tensorflow instead, especially for keras users. I read your code. You used theano for graph. Do you have alternatives? Many thanks.
I want to use the trained model and predict the toxicity of new molecules. How can I use your tool? Can you please explain? Should I go about using the joblib or py file? How do I give input files in the model to test? readme is not much clear. Kindly elaborate.
Could you maybe provide a documentation on how to include your library into a self written program? That would help alot. :-)
Can you provide datasets for specific toxicities. They are not available in the dataset link mentioned in paper.
how do i use your tool in python to predict the toxicity of new compounds?
Hello, Thanks for this wonderful repo!
When i git clone and run this using python etoxpred_predict.py --datafile tcm600_nr.smi --modelfile etoxpred_best_model.joblib --outputfile results.csv
(after unzippiing tar) i get this error:
...loading models
C:\Users\Sri Raghu\AppData\Local\Programs\Python\Python312\Lib\site-packages\sklearn\base.py:376: InconsistentVersionWarning: Trying to unpickle estimator ExtraTreeClassifier from version 0.23.2 when using version 1.4.0. This might lead to breaking code or invalid results. Use at your own risk. For more info please refer to:
https://scikit-learn.org/stable/model_persistence.html#security-maintainability-limitations
warnings.warn(
Traceback (most recent call last):
File "C:\Users\Sri Raghu\Desktop\swift-trials\ind-projects\eToxPred\etoxpred_predict.py", line 74, in <module>
predict(opt)
File "C:\Users\Sri Raghu\Desktop\swift-trials\ind-projects\eToxPred\etoxpred_predict.py", line 59, in predict
clf = load(opt.modelfile)
^^^^^^^^^^^^^^^^^^^
File "C:\Users\Sri Raghu\AppData\Local\Programs\Python\Python312\Lib\site-packages\joblib\numpy_pickle.py", line 658, in load
obj = _unpickle(fobj, filename, mmap_mode)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Sri Raghu\AppData\Local\Programs\Python\Python312\Lib\site-packages\joblib\numpy_pickle.py", line 577, in _unpickle
obj = unpickler.load()
^^^^^^^^^^^^^^^^
File "C:\Users\Sri Raghu\AppData\Local\Programs\Python\Python312\Lib\pickle.py", line 1205, in load
PS C:\Users\Sri Raghu\Desktop\swift-trials\ind-projects\eToxPred> python etoxpred_predict.py --datafile tcm600_nr.smi --modelfile etoxpred_best_model.joblib --outputfile results.csv
...loading models
C:\Users\Sri Raghu\AppData\Local\Programs\Python\Python312\Lib\site-packages\sklearn\base.py:376: InconsistentVersionWarning: Trying to unpickle estimator ExtraTreeClassifier from version 0.23.2 when using version 1.4.0. This might lead to breaking code or invalid results. Use at your own risk. For more info please refer to:
https://scikit-learn.org/stable/model_persistence.html#security-maintainability-limitations
warnings.warn(
Traceback (most recent call last):
File "C:\Users\Sri Raghu\Desktop\swift-trials\ind-projects\eToxPred\etoxpred_predict.py", line 74, in <module>
predict(opt)
File "C:\Users\Sri Raghu\Desktop\swift-trials\ind-projects\eToxPred\etoxpred_predict.py", line 59, in predict
clf = load(opt.modelfile)
^^^^^^^^^^^^^^^^^^^
File "C:\Users\Sri Raghu\AppData\Local\Programs\Python\Python312\Lib\site-packages\joblib\numpy_pickle.py", line 658, in load
obj = _unpickle(fobj, filename, mmap_mode)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Sri Raghu\AppData\Local\Programs\Python\Python312\Lib\site-packages\joblib\numpy_pickle.py", line 577, in _unpickle
obj = unpickler.load()
^^^^^^^^^^^^^^^^
File "C:\Users\Sri Raghu\AppData\Local\Programs\Python\Python312\Lib\pickle.py", line 1205, in load
dispatch[key[0]](self)
File "C:\Users\Sri Raghu\AppData\Local\Programs\Python\Python312\Lib\site-packages\joblib\numpy_pickle.py", line 402, in load_build
Unpickler.load_build(self)
File "C:\Users\Sri Raghu\AppData\Local\Programs\Python\Python312\Lib\pickle.py", line 1710, in load_build
setstate(state)
File "sklearn\\tree\\_tree.pyx", line 865, in sklearn.tree._tree.Tree.__setstate__
File "sklearn\\tree\\_tree.pyx", line 1571, in sklearn.tree._tree._check_node_ndarray
ValueError: node array from the pickle has an incompatible dtype:
- expected: {'names': ['left_child', 'right_child', 'feature', 'threshold', 'impurity', 'n_node_samples', 'weighted_n_node_samples', 'missing_go_to_left'], 'formats': ['<i8', '<i8', '<i8', '<f8', '<f8', '<i8', '<f8', 'u1'], 'offsets': [0, 8, 16, 24, 32, 40, 48, 56], 'itemsize': 64}
- got : [('left_child', '<i8'), ('right_child', '<i8'), ('feature', '<i8'), ('threshold', '<f8'), ('impurity', '<f8'), ('n_node_samples', '<i8'), ('weighted_n_node_samples', '<f8')]
I tired reducing sk-learn to base version -> didnt work
installed MS visual tools and C++ tools -> didnt work
Kindly help me through this. Much Appreciated
I'm facing some issues with installing this software, more precisely clashes in the versions of the different libraries used (despite using conda
, a well-known package management system).
Can we please get more details on the development environment in which the software was created?
Ideally, a requirements.txt
or Dockerfile
file.
Thanks.
I am retraining your models. I want to compare my retrained models with yours. You said "The results of our experiments in terms of SAscores and Tox-scores are also provied in sa_results.txt and tox_results.txt". But I couldn't find them?
Hello,
I recently downloaded all dependencies (as you have listed) to all same versions other than openbabel 2.3.2 instead of 2.3.1. When I run the code, I get the following error...
Traceback (most recent call last): File "etoxpred.py", line 121, in <module> predicted_values,proba = predict(X,'SA_trained_model_cpu.pkl','Tox_trained_model.pkl') # if cuda is not installed, use the trained_model_cpu File "etoxpred.py", line 113, in predict xtree = joblib.load(tox_model) File "C:\Python27\lib\site-packages\sklearn\externals\joblib\numpy_pickle.py", line 575, in load obj = _unpickle(fobj, filename, mmap_mode) File "C:\Python27\lib\site-packages\sklearn\externals\joblib\numpy_pickle.py", line 507, in _unpickle obj = unpickler.load() File "C:\Python27\lib\pickle.py", line 864, in load dispatch[key](self) File "C:\Python27\lib\pickle.py", line 1139, in load_reduce value = func(*args) File "sklearn\tree\_tree.pyx", line 584, in sklearn.tree._tree.Tree.__cinit__ (sklearn\tree\_tree.c:7533) ValueError: Buffer dtype mismatch, expected 'SIZE_t' but got 'long long'
Which the internet says is from the mismatched bit versions. I could download a 64 bit python, but openbabel only works on 32 bit python. Let me know if you get any issues when trying to run it
Hello, I am a little new to python and was wondering if there was a more detailed description on how to extract the necessary files for this package to work.
I downloaded the entire package (.py, .smi, and .pkl files) but am struggling to get the predictor started.
python etoxpred_predict.py --datafile tcm600_nr.smi --modelfile etoxpred_best_model.joblib --outputfile results.csv
gives me an invalid syntax error. Should I be changing anything in this line of code?A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.