Giter Site home page Giter Site logo

razi's People

Contributors

adrian-jasinski avatar efliks avatar llazzaro avatar mwojcikowski avatar rvianello avatar yamasakih avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

razi's Issues

I get a runtime error, can't execute the sql

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 ?

`operator does not exist: bfp %% bfp` error

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.