smilesvecproteinrepresentation's People
Forkers
zhixuni aspirincode caozhengquan virtualchemist ammar257ammar cuidachao shunsunsun yanxf7 bbyun28 andrey1362010 mislam5285 rnaimehaom zengydd kmballantynesmilesvecproteinrepresentation's Issues
Interaction fetch not continue after connection error.
When fetching interactions if any connection error occurs fetch process is ended. It might be good if there is a --max-try parameter to continue trying after this error.
Error message is below;
('Fetching interactions for', 'P63092', 'CHEMBL4377')
Traceback (most recent call last):
File "getligprotvec.py", line 104, in
getProteinVec(proteins_path)
File "getligprotvec.py", line 78, in getProteinVec
PLIlist = getLigandInteractions(proteins_path)
File "getligprotvec.py", line 63, in getLigandInteractions
compounds = activity_parser(activities)
File "getligprotvec.py", line 38, in activity_parser
for activity in activities:
File "/home/srb/.local/lib/python2.7/site-packages/chembl_webresource_client/query_set.py", line 116, in next
self.chunk = self.query.next_page()
File "/home/srb/.local/lib/python2.7/site-packages/chembl_webresource_client/url_query.py", line 435, in next_page
return self.get_page()
File "/home/srb/.local/lib/python2.7/site-packages/chembl_webresource_client/url_query.py", line 390, in get_page
res = session.post(self.base_url + '.' + self.frmt, json=data, timeout=self.timeout)
File "/home/srb/.local/lib/python2.7/site-packages/requests/sessions.py", line 581, in post
return self.request('POST', url, data=data, json=json, **kwargs)
File "/home/srb/.local/lib/python2.7/site-packages/requests_cache/core.py", line 132, in request
**kwargs
File "/home/srb/.local/lib/python2.7/site-packages/requests/sessions.py", line 533, in request
resp = self.send(prep, **send_kwargs)
File "/home/srb/.local/lib/python2.7/site-packages/requests_cache/core.py", line 105, in send
return send_request_and_cache_response()
File "/home/srb/.local/lib/python2.7/site-packages/requests_cache/core.py", line 97, in send_request_and_cache_response
response = super(CachedSession, self).send(request, **kwargs)
File "/home/srb/.local/lib/python2.7/site-packages/requests/sessions.py", line 646, in send
r = adapter.send(request, **kwargs)
File "/home/srb/.local/lib/python2.7/site-packages/requests/adapters.py", line 498, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', BadStatusLine("''",))
Same vector produced for all proteins
When I try to generate protein vectors with;
python getligprotvec.py drug.l8.chembl23.canon.ws20.txt
command, same vector is written to protein.vec file. I'm attaching prots_sample.txt and protein.vec files.
Division by zero error
When I try to get vectors of human proteins using;
python getligprotvec.py drug.pubchem.canon.l8.ws20.txt
or
python getligprotvec.py drug.l8.chembl23.canon.ws20.txt
I got error as;
('Fetching interactions for', 'Q9HAV4', 'none')
Traceback (most recent call last):
File "getligprotvec.py", line 103, in <module>
getProteinVec(proteins_path)
File "getligprotvec.py", line 94, in getProteinVec
sumVec = [sumVec[i]/len(ligands) for i in range(len(sumVec))]
ZeroDivisionError: float division by zero
If you need any further info I can happy to supply it.
Protein vector readability
Created protein vectors saved in a list by the getligprotvec.py in order to protein names in smiles_sample.txt. For big files it creates a readability problem. A dictionary might help for this issue such as ['protname1':[vectorvalue1, vectorvalue2], ['protname2':[vectorvalue1, vectorvalue2] ... ]
Pickle object error in Python3
The created protein vector can be opened with python2 but can not be opened with python3.
>>> import pickle
>>> pickle.load(open("protein.vec"))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: a bytes-like object is required, not 'str'
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.