rvianello / razi Goto Github PK
View Code? Open in Web Editor NEWA cheminformatics extension for the SQLAlchemy database toolkit.
Home Page: http://razi.readthedocs.org/
License: Other
A cheminformatics extension for the SQLAlchemy database toolkit.
Home Page: http://razi.readthedocs.org/
License: Other
I use razi and sqlchemy generate a similary sql like
SELECT "RdkitMol_c5".id, "RdkitMol_c5".canonical_smiles, "RdkitMol_c5".canonical_smiles_key, mol_to_pkl("RdkitMol_c5".rdkit_mol) AS rdkit_mol, bfp_to_binary_text("RdkitMol_c5".rdkit_bfp) AS rdkit_bfp
FROM "RdkitMol_c5" JOIN "Molecules_c5" ON "Molecules_c5".canonical_smiles = "RdkitMol_c5".canonical_smiles
WHERE "RdkitMol_c5".rdkit_bfp # morganbv_fp('Cc1ccc2nc(-c3ccc(NC(C4N(C(c5cccs5)=O)CCC4)=O)cc3)sc2c1')
but after the sql execute, I get a runtime error:
File ".conda\envs\3.7\lib\site-packages\sqlalchemy\engine\result.py", line 393, in <listcomp>
return [make_row(row) for row in rows]
File ".conda\envs\3.7\lib\site-packages\razi-0.0.0-py3.7.egg\razi\rdkit_postgresql\types.py", line 43, in process
RuntimeError: Unexpected row value type for a Mol instance
when I try to select less field. I generate a sql
SELECT bfp_to_binary_text("RdkitMol_c5".rdkit_bfp) AS rdkit_bfp
FROM "RdkitMol_c5" JOIN "Molecules_c5" ON "Molecules_c5".canonical_smiles = "RdkitMol_c5".canonical_smiles
WHERE "RdkitMol_c5".rdkit_bfp # morganbv_fp('Cc1ccc2nc(-c3ccc(NC(C4N(C(c5cccs5)=O)CCC4)=O)cc3)sc2c1')
then I get a runtime error too,
File ".conda\envs\3.7\lib\site-packages\sqlalchemy\engine\result.py", line 393, in <listcomp>
return [make_row(row) for row in rows]
File "code\razi\razi\rdkit_postgresql\types.py", line 85, in process
"Unexpected row value type for a Bfp instance")
RuntimeError: Unexpected row value type for a Bfp instance
seem like sqlalchemy can't generate select result. I don't konw what happen? Dost anybody can help me ?
SQLAlchemy>2.0.0 is using different dialect and handles %
sign differently. As a result, the operators defined in tanimoto_sml
function are parsed as %%
and this causes the operator does not exist: bfp %% bfp
error.
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.