Code Monkey home page Code Monkey logo

chembl_sim's Introduction

chembl_sim

ChEMBL Similarity Search

This code accompanies my blog post "What Do Molecules That Look LIke This Tend To Do"

Installation

This code requires the RDKit. For more information on installation set this link.

Install the necessary python libraries

pip install SQLAlchemy tqdm docopt
conda install -c conda-forge fpsim2

Download chembl_27_sqlite.tar.gz from ftp://ftp.ebi.ac.uk/pub/databases/chembl/ChEMBLdb/latest/

wget ftp://ftp.ebi.ac.uk/pub/databases/chembl/ChEMBLdb/latest/chembl_27_sqlite.tar.gz

Untar the file and put chembl_27.db somewhere and put the attached scripts in the same directory.

Create the fingerprint database, note that this takes a while

create_fpsim2_db.py chembl_27.db chembl_27.h5

Usage

Usage: chembl_sim.py --query QUERY_SMI --out OUT_CSV [--sim SIM_CUTOFF]

--help print this help message
--query QUERY_SMI query SMILES file (takes the form SMILES name)
--out OUT_CSV output csv file
--sim SIM_CUTOFF similarity cutoff, default=0.7

As an example:

chembl_sim_search.py --query query.smi --out out.csv

To set the similarity cutoff:

chembl_sim_search.py --query query.smi --out out.csv --sim 0.6

A More General Solution for Searching Databases Other Than ChEMBL

I also created a couple of scripts that will enable you to create and search FpSim2 databases from SMILES files. As a quick example

smi2fpsim2.py test.smi
search_fpsim2.py --query query.smi --db test --out test.csv --sim 0.3

Please see the help for these scripts for more information

chembl_sim's People

Contributors

patwalters avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

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.