Giter Club home page Giter Club logo

simsearch's Introduction

Similarity search

Multi-threaded similarity search in LevelDb databases.

Motivation

In early-stage drug-development, it is important to find equal or similar to hits structures in big databases (open-access or in-house). For example, the REAL database contains more than 1 Billion compounds. To find out if a compound is in this database, the LevelDB index is used. The canonical SMILES is a key, and the ID of a compound is a value. Thus, the search is very fast and as a result, we also have a link to a web page of the found compound. The LevelDBServ provides a TCP-server that searches an input query in the index and returns ID if the query is found, or none, otherwise.

Dependency

Build

The project uses CMake build system.

Usage

The project consists of three programs: LevelDbAdd - to create an index; LevelDbSearch - to search similar compounds; LevelDbServ - a TCP-server for on-line exact search.

LevelDbAdd - creating an index

LevelDbAdd program accepts two arguments: the name of the LevelDB database (if the DB is missing, it will be created) and the file with compounds. The file is treated as space/tab delimited string, where the first item in a line (zero position) corresponds to a SMILES string, the second item (1st position) - ID of the compound. Other items may also be present but not important. Before adding to the index, the SMILES is canonicalized.

LevelDbSearch - search similar compounds

LevelDbSearch has the following arguments:

  1. LevelDb database name (haystack),
  2. File name with SMILES (needle),
  3. Number of threads to be used,
  4. Tanimoto cutoff value, usually set to 0.75 for drug-like compounds.

Found compounds are printed to stdout.

LevelDbServ - a TCP server

LevelDbServ has two arguments: the LevelDb file name and the port to start the TCP-server. The server assumes receiving lines (separated with '\n', Linux style). Each line is converted to a canonical SMILES and searched in the index. If found, the ID is returned, otherwise none.

simsearch's People

Contributors

carpovpv avatar

Watchers

 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.