Giter Site home page Giter Site logo

merck / matcher Goto Github PK

View Code? Open in Web Editor NEW
50.0 12.0 9.0 7.59 MB

Matcher is a tool for understanding how chemical structure optimization problems have been solved. Matcher enables deep control over searching structure/activity relationships (SAR) derived from large datasets, and takes the form of an accessible web application with simple deployment. Matcher is built around the mmpdb platform.

License: MIT License

Dockerfile 0.24% Python 80.42% Shell 3.08% CSS 4.05% HTML 3.68% JavaScript 8.33% Makefile 0.21%
chemistry docker-compose drug-discovery search-algorithm search-engine web-application

matcher's Introduction

matcher search example Publication: Matcher: An Open-Source Application for Translating Large Structure/Property Data Sets into Insights for Drug Design
Free preprint of above publication

Matcher is a tool for understanding how chemical structure optimization problems have been solved.

Matcher enables deep control over searching structure/activity relationships (SAR) derived from large datasets, and takes the form of an accessible web application with simple deployment.

Matcher is built around the mmpdb platform for matched molecular pair (MMP) analysis. Matcher extends the mmpdb data model, introduces new search algorithms, provides a backend API for executing queries and fetching results, and provides a frontend user interface.

Table of Contents

  1. System Requirements
  2. Quick Start
  3. Run Example Query
  4. Data Included
  5. Use Different Data
  6. Metadata Information
  7. OpenAPI for Backend
  8. Using mmpdb Commands

System Requirements

  • Computer with x86 processor (i.e. most desktop/laptop computers except Apple M-series)
    • ARM processors are not yet supported, due to certain dependencies

Quick Start

Clone this repository, and the mmpdb submodule (with git submodule init and git submodule update).

Navigate to the parent matcher directory, then execute:

docker-compose up

Three containers will be launched:

  1. database container, which contains the PostgreSQL database
  2. backend container, which is controlled through a FastAPI accessible at localhost:8001
  3. frontend container, which hosts a Dash app through a Flask API, accessible at localhost:8000

The rate-determining step is for the backend container to use mmpdb commands to process input data, and write resulting MMP data to the database. This process is complete when the below output is observed in the docker-compose console:

INFO:uvicorn.error:Uvicorn running on http://0.0.0.0:8001 (Press CTRL+C to quit)

After the above is observed, in a web browser (Google Chrome or Microsoft Edge), navigate to localhost:8000. The Matcher query interface should load after a few seconds.

Run Example Query

Matcher query logic can be learned by example: click the "Run Example Search" link at the top of the matcher query frontend page (localhost:8000), which will direct to localhost:8000/examples.

Several example inputs/outputs will be displayed. Upon clicking on an example, a new tab will open with the live Matcher interface, containing appropriately-populated input. Output results will load below the input.

Important: The example queries are only guaranteed to work with the example data provided in this package, because these queries specify properties that are present in the example data. If new data is used which has property names differing from the example data's property names, an exception will be thrown in the client js layer, and the example queries will not execute when loaded.

Data Included

Data is present in the backend/initialize_db directory.

Quick Start data (default): Data filenames begin with "quick_start". Contains 1089 ChEMBL compounds, the minimum to fully reproduce queries described in our publication (TODO: Add hyperlink here).

Rapidly test/debug the deployment: Data filenames begin with "test". Contains 16 ChEMBL compounds, a subset of the Quick Start 1078 compounds, for the purpose of rapid testing during development or troubleshooting. All example queries work, but return only a few results.

Full ChEMBL dataset: Data filenames begin with "ChEMBL_CYP3A4_hERG". Contains 20267 ChEMBL compounds having CYP3A4 inhibition and/or hERG inhibition data, which were included with the mmpdb publication. A superset of the Quick Start data.

Use Different Data

The default input compound/property dataset is intentionally very small, so that the containers will initialize quickly for demo purposes.

To use arbitrary data, follow the below steps.

As an example, we illustrate how to use a "medium-size" dataset containing 20,267 compounds taken from the mmpdb publication, and referenced in our publication.

  1. Add raw data to the matcher/backend/initialize_db directory. Two files are required, a third file is optional. All files must begin with the same identifier: your_dataset_name, which in this example is ChEMBL_CYP3A4_hERG:

    • Required: File containing compound SMILES and compound IDs.
      • For this example, ChEMBL_CYP3A4_hERG_structures.smi is already included.

    • Required: File containing compound IDs and property values.
      • For this example, ChEMBL_CYP3A4_hERG_props.txt is already included.

    • Optional: File containing metadata about the compound property data (whether the data is log transformed, the units, and how the data should be displayed to users).
      • For this example, ChEMBL_CYP3A4_hERG_metadata.csv is already included. If you do not wish to provide metadata, edit out the --metadata argument from this line of code in entrypoint.sh: conda run --no-capture-output -n matcher-api python $MMPDB_DIR/mmpdb.py loadprops -p "${properties}" --metadata "${metadata}" "$postgres_schema\$postgres" && \. If no metadata file is provided, then by default, property labels and data will be displayed to users exactly as provided in the above property value file, and changes between two properties will be treated as differences (B - A).

  2. Edit matcher/backend/entrypoint.sh by setting DATASET=your_dataset_name, using your_dataset_name from step 1. above.



  1. Recreate the containers:
    • Navigate to the parent directory (matcher/), and execute the following commands (note that using the --volumes flag deletes your previous matcher DB data):
docker-compose down --volumes && \
docker-compose build && \
docker-compose up --force-recreate

This time, around 20 minutes will be required to build the database (depending on computer), due to the larger number of compounds in the input data as compared to the original Quick Start data.

Metadata Information

Optionally, property metadata can be passed to the mmpdb loadprops command, for the purpose of customizing how data is displayed to end users in matcher's web UI.

If metadata is not provided, then all data will be displayed as it exists in the database, and all changes will be calculated and displayed as deltas (B-A).

Here is an example property metadata table (values should be tab separated):

  property_name base  unit  display_name  display_base  display_unit  change_displayed
  hERG_pIC50  negative_log  M hERG_IC50_uM  raw uM  fold-change

Example:

% mmpdb loadprops --properties hERG.csv --metadata hERG_medatadata.csv 'database$5432$postgres'

In the above case, hERG data is provided in the --properties file as a negative log of molarity, but we provide additional metadata which causes the data to appear to users in the matcher web UI as micromolar IC50 values. This is the most common base/unit conversion use case; not all conversions are supported.

Metadata is stored in columns within the property_name table, and therefore is easy to modify (albeit manually with SQL) even after the database is built.

Supported metadata options are below. All other values, or * value, will be converted to default. None means that the column value will be NULL in property_name table.

  base [default=raw]: raw, log, negative_log 
  unit [default=None]: M, uM
  display_name [default=property_name]: characters other than *
  display_base [default=raw]: raw
  display_unit [default=None]: uM, M
  change_displayed [default=delta]: delta, fold-change

OpenAPI for Backend

Matcher's backend API can be used for querying and gathering results, independently of the frontend, if desired.

The backend API endpoints are documented in backend/openapi.json. This documentation can be viewed when the matcher application is running, at localhost:8001/docs

Using mmpdb Commands

The matcher database is an extended mmpdb database, and is reverse-compatible with mmpdb commands.

For example, to run mmpdb transform with matcher's database, outputting results to results.csv within your local directory:

First launch matcher as described in Quick Start, then run this command:

docker exec -it \
"$(docker ps | grep 'matcher_backend' | awk '{ print $1 }')" \
conda run -n matcher-api \
python /opt/mmpdb/mmpdb.py transform --smiles 'O=C1NC2=C(C=NC(OC)=N2)N=C1' 'public$postgres' > results.csv

matcher's People

Contributors

hooveran avatar jasonmvictor avatar velikiinehochuha 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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

matcher's Issues

Issue when using my own data: psycopg2.errors.DuplicateTable: relation "dataset" already exists

I am getting the following errors:

backend_1   | Finished loading fragments, seconds taken = 0.0056688785552978516
backend_1   | Starting to find pairs at 1684792578.256481
backend_1   |     commandline.main()
backend_1   |   File "/opt/mmpdb/mmpdblib/commandline.py", line 1089, in main
backend_1   |     parsed_args.command(parsed_args.subparser, parsed_args)
backend_1   |   File "/opt/mmpdb/mmpdblib/commandline.py", line 393, in index_command
backend_1   |     do_index.index_command(parser, args)
backend_1   |   File "/opt/mmpdb/mmpdblib/do_index.py", line 203, in index_command
backend_1   |     with index_algorithm.open_mmpa_writer(args.output, format=args.out,
backend_1   |   File "/opt/mmpdb/mmpdblib/index_algorithm.py", line 1333, in open_mmpa_writer
backend_1   |     index_writer = index_writers.open_postgres_index_writer(destination, title)
backend_1   |   File "/opt/mmpdb/mmpdblib/index_writers.py", line 741, in open_postgres_index_writer
backend_1   |     schema.create_schema_for_postgres(db, schema_name=schema_name)
backend_1   |   File "/opt/mmpdb/mmpdblib/schema.py", line 233, in create_schema_for_postgres
backend_1   |     _execute_sql(c,
backend_1   |   File "/opt/mmpdb/mmpdblib/schema.py", line 200, in _execute_sql
backend_1   |     c.execute(statement)
backend_1   | psycopg2.errors.DuplicateTable: relation "dataset" already exists
backend_1   |
backend_1   | ERROR conda.cli.main_run:execute(47): `conda run python ./mmpdb/mmpdb.py index ./initialize_db/test.fragments -o public$postgres` failed. ```

start error "Service 'database' failed to build : Build failed"

my ubuntu version is 18.04,docker version is 23.0.3, docker-compose version is 1.29.2.
I have already install matcher through your tutorial.
$ git clone https://github.com/Merck/matcher.git
$ cd matcher
$ sudo systemctl start docker
$ git submodule init
$ git submodule update
$ sudo docker-compose up
However. when running the last step, an error was encountered.

user@user-b:/mnt/***/matcher$ sudo docker-compose up
Building database
[+] Building 25.8s (3/3) FINISHED
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 251B 0.0s
=> ERROR [internal] load metadata for docker.io/library/postgres:13 25.8s

[internal] load metadata for docker.io/library/postgres:13:


Dockerfile:1

1 | >>> FROM postgres:13
2 |     
3 |     # Install "rdkit" PostgreSQL extension

ERROR: failed to solve: error getting credentials - err: exit status 1, out: Error calling StartServiceByName for org.freedesktop.secrets: Timeout was reached
ERROR: Service 'database' failed to build : Build failed

I have installed rdkit-postgresql.
What should I do in this situation?

Installation issue on Mac M1 Max: No matching distribution found for rdkit-pypi==2021.3.5

I followed all of the instructions and I was having trouble launching the docker image from my Mac M1 Max. I was wondering if you have seen the error below before. Another user attempting the process on a PC did not have the same issue. If I try to run the same conda command from the docker image on my Mac I get the same error. The docker image should run as Linux OS though. Sorry- I cannot seem to figure this out.

1.) If you catch the error in the docker-compose console it reads:
=> => # Pip subprocess error:
=> => # ERROR: Could not find a version that satisfies the requirement rdkit-p
=> => # ypi==2021.3.5
=> => # ERROR: No matching distribution found for rdkit-pypi==2021.3.5
=> => # CondaEnvException: Pip failed

2.) The remaining output shows below:
docker-compose up
[+] Building 381.3s (9/12)
=> [backend internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [backend internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 490B 0.0s
=> [backend internal] load metadata for docker.io/condaforge/miniforge3: 0.6s
=> [backend 1/8] FROM docker.io/condaforge/miniforge3@sha256:285a0927e33 0.0s
=> [backend internal] load build context 0.0s
=> => transferring context: 3.52kB 0.0s
=> CACHED [backend 2/8] RUN apt-get update -y && apt-get install libxren 0.0s
=> CACHED [backend 3/8] WORKDIR /opt 0.0s
=> CACHED [backend 4/8] COPY environment.yml requirements.txt ./ 0.0s
=> ERROR [backend 5/8] RUN conda env create -f /opt/environment.yml 34.6s

3.) Running the conda install command from the docker image on my Mac yields a similar error:

conda env create -f /matcher/backend/environment.yml
Collecting package metadata (repodata.json): done
Solving environment: done
Downloading and Extracting Packages
libsqlite-3.42.0 | 804 KB | ##################################### | 100%
python-3.9.2 | 12.0 MB | ##################################### | 100%
libzlib-1.2.13 | 47 KB | ##################################### | 100%
setuptools-67.7.2 | 569 KB | ##################################### | 100%
sqlite-3.42.0 | 794 KB | ##################################### | 100%
pip-21.0.1 | 1.1 MB | ##################################### | 100%
ncurses-6.4 | 780 KB | ##################################### | 100%
openssl-1.1.1u | 1.6 MB | ##################################### | 100%
zlib-1.2.13 | 78 KB | ##################################### | 100%
libcxx-16.0.5 | 1.1 MB | ##################################### | 100%
Preparing transaction: done
Verifying transaction: done
Executing transaction: done

Installing pip dependencies: | Ran pip subprocess with arguments:
['/opt/homebrew/anaconda3/envs/matcher-api/bin/python', '-m', 'pip', 'install', '-U', '-r', '/matcher/backend/condaenv.nf9w2agt.requirements.txt']

Pip subprocess output:
Collecting asyncpg==0.24.0
Downloading asyncpg-0.24.0.tar.gz (787 kB)
Collecting fastapi==0.73.0
Downloading fastapi-0.73.0-py3-none-any.whl (52 kB)
Collecting orjson==3.6.0
Downloading orjson-3.6.0-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (436 kB)
Collecting pandas==1.4.1
Downloading pandas-1.4.1-cp39-cp39-macosx_11_0_arm64.whl (10.5 MB)
Collecting pillow==8.3.1
Downloading Pillow-8.3.1-cp39-cp39-macosx_11_0_arm64.whl (2.7 MB)
Collecting python-multipart==0.0.5
Downloading python-multipart-0.0.5.tar.gz (32 kB)
Pip subprocess error:
ERROR: Could not find a version that satisfies the requirement rdkit-pypi==2021.3.5
ERROR: No matching distribution found for rdkit-pypi==2021.3.5
failed
CondaEnvException: Pip failed

Pip error while run docker-compose

I am trying to install and "docker-compose up" give this error, can I have some suggestions :


Building backend
[+] Building 517.3s (9/11)
 => [internal] load .dockerignore                                                                                                                                                                                                                                                        0.0s
 => => transferring context: 2B                                                                                                                                                                                                                                                          0.0s
 => [internal] load build definition from Dockerfile                                                                                                                                                                                                                                     0.0s
 => => transferring dockerfile: 497B                                                                                                                                                                                                                                                     0.0s
 => [internal] load metadata for docker.io/condaforge/miniforge3:latest                                                                                                                                                                                                                  1.4s
 => [internal] load build context                                                                                                                                                                                                                                                        0.0s
 => => transferring context: 4.91kB                                                                                                                                                                                                                                                      0.0s
 => [1/7] FROM docker.io/condaforge/miniforge3@sha256:7fc9a3d4b4bc45afc3e338533da41b283e38958f772aefdc4a179f36e5f75cd0                                                                                                                                                                   0.0s
 => CACHED [2/7] RUN apt-get update -y && apt-get install libxrender1 -y                                                                                                                                                                                                                 0.0s
 => CACHED [3/7] WORKDIR /opt                                                                                                                                                                                                                                                            0.0s
 => CACHED [4/7] COPY ./backend/environment.yml ./backend/requirements.txt ./backend/                                                                                                                                                                                                    0.0s
 => ERROR [5/7] RUN conda env create -f ./backend/environment.yml                                                                                                                                                                                                                      515.9s
------
 > [5/7] RUN conda env create -f ./backend/environment.yml:
#6 0.779 Collecting package metadata (repodata.json): ...working... done
#6 93.82 Solving environment: ...working... done
#6 98.81
#6 98.81
#6 98.81 ==> WARNING: A newer version of conda exists. <==
#6 98.81   current version: 23.3.1
#6 98.81   latest version: 23.10.0
#6 98.81
#6 98.81 Please update conda by running
#6 98.81
#6 98.81     $ conda update -n base -c conda-forge conda
#6 98.81
#6 98.81 Or to minimize the number of packages updated during conda update use
#6 98.81
#6 98.81      conda install conda=23.10.0
#6 98.81
#6 98.81
#6 98.82
#6 98.82 Downloading and Extracting Packages

#6 119.1 Preparing transaction: ...working... done
#6 119.3 Verifying transaction: ...working... done
#6 120.4 Executing transaction: ...working... done
#6 122.3 Installing pip dependencies: ...working... Pip subprocess error:
#6 510.9 WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7fc3baa4af70>, 'Connection to pypi.org timed out. (connect timeout=15)')': /simple/asyncpg/
#6 510.9 WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7fc3ba9e4190>, 'Connection to pypi.org timed out. (connect timeout=15)')': /simple/asyncpg/
#6 510.9 WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7fc3ba9e4310>, 'Connection to pypi.org timed out. (connect timeout=15)')': /simple/asyncpg/
#6 510.9 WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7fc3ba9e4490>, 'Connection to pypi.org timed out. (connect timeout=15)')': /simple/asyncpg/
#6 510.9 WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7fc3ba9e4610>, 'Connection to pypi.org timed out. (connect timeout=15)')': /simple/asyncpg/
#6 510.9 ERROR: Could not find a version that satisfies the requirement asyncpg==0.24.0
#6 510.9 ERROR: No matching distribution found for asyncpg==0.24.0
#6 510.9
#6 510.9 Ran pip subprocess with arguments:
#6 510.9 ['/opt/conda/envs/matcher-api/bin/python', '-m', 'pip', 'install', '-U', '-r', '/opt/backend/condaenv.wfjig_m2.requirements.txt', '--exists-action=b']
#6 510.9 Pip subprocess output:
#6 510.9
#6 510.9 failed
#6 510.9
#6 510.9 CondaEnvException: Pip failed
#6 510.9
------
process "/bin/sh -c conda env create -f ./backend/environment.yml" did not complete successfully: exit code: 1
ERROR: Service 'backend' failed to build : Build failed


Dash components fail to load

Recently, using code from commit eea5d98b84b27f96a5b65a374baf0a67ce44aa7a, the loading of Dash components through the Dash CDN, unpkg.com, was unreliable.

Steps to reproduce:

  1. Launch matcher following the instructions in the README quickstart, using the code from commit eea5d98b84b27f96a5b65a374baf0a67ce44aa7a

Expected behavior:

After loading localhost:8000 in Chrome: For a brief period, the plain text "Loading..." should be visible at the bottom of the interface, but then disappear and be replaced by a purple "Submit Query" button, signifying that the Dash app has completed loading.

Actual behavior

After loading localhost:8000 in Chrome: The plain text "Loading..." is visible at the bottom of the interface, but remains and does not disappear, and no purple button appears. The app stalls and several errors are visible when inspecting the javascript console.

Challenges with 'docker compose up': Backend OperationalError Despite Frontend and Database Running Smoothly

Hello,

I've been working with the Matcher project and have run into a bit of a snag when using Docker Compose. Although the frontend and database containers seem to be up and running without any issues (as verified by the docker ps command), I'm encountering a persistent error with the backend when attempting to integrate all components using docker compose up.

Here's a bit more context: When I execute the backend commands individually through Conda (conda run python ...), everything works as expected, with no errors. However, this issue arises specifically when I try to bring up the entire setup through Docker Compose.

I'm wondering if there are any additional considerations or configurations that I might be missing, particularly related to Docker Compose's handling of the backend service. Has anyone else encountered a similar issue, or could provide insights into what might be going wrong?

Any guidance or suggestions would be greatly appreciated!

Thank you in advance for your help.

$ docker compose up
[+] Running 4/4
 ✔ Network matcher_matcher-network  Created                                                                                                                                   0.1s 
 ✔ Container matcher-database-1     Created                                                                                                                                   0.1s 
 ✔ Container matcher-backend-1      Created                                                                                                                                   0.1s 
 ✔ Container matcher-frontend-1     Created                                                                                                                                   0.1s 
Attaching to matcher-backend-1, matcher-database-1, matcher-frontend-1
matcher-database-1  | The files belonging to this database system will be owned by user "postgres".
matcher-database-1  | This user must also own the server process.
matcher-database-1  | 
matcher-database-1  | The database cluster will be initialized with locale "en_US.utf8".
matcher-database-1  | The default database encoding has accordingly been set to "UTF8".
matcher-database-1  | The default text search configuration will be set to "english".
matcher-database-1  | 
matcher-database-1  | Data page checksums are disabled.
matcher-database-1  | 
matcher-database-1  | fixing permissions on existing directory /var/lib/postgresql/data ... ok
matcher-database-1  | creating subdirectories ... ok
matcher-database-1  | selecting dynamic shared memory implementation ... posix
matcher-database-1  | selecting default max_connections ... 100
matcher-database-1  | selecting default shared_buffers ... 128MB
matcher-database-1  | selecting default time zone ... Etc/UTC
matcher-database-1  | creating configuration files ... ok
matcher-database-1  | running bootstrap script ... ok
matcher-backend-1   | 
matcher-database-1  | performing post-bootstrap initialization ... ok
matcher-database-1  | initdb: warning: enabling "trust" authentication for local connections
matcher-database-1  | You can change this by editing pg_hba.conf or using the option -A, or
matcher-database-1  | --auth-local and --auth-host, the next time you run initdb.
matcher-database-1  | syncing data to disk ... ok
matcher-database-1  | 
matcher-database-1  | 
matcher-database-1  | Success. You can now start the database server using:
matcher-database-1  | 
matcher-database-1  |     pg_ctl -D /var/lib/postgresql/data -l logfile start
matcher-database-1  | 
matcher-database-1  | waiting for server to start....2024-01-15 07:52:58.301 UTC [48] LOG:  starting PostgreSQL 13.13 (Debian 13.13-1.pgdg120+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit
matcher-database-1  | 2024-01-15 07:52:58.308 UTC [48] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
matcher-database-1  | 2024-01-15 07:52:58.331 UTC [49] LOG:  database system was shut down at 2024-01-15 07:52:57 UTC
matcher-database-1  | 2024-01-15 07:52:58.344 UTC [48] LOG:  database system is ready to accept connections
matcher-database-1  |  done
matcher-database-1  | server started
matcher-backend-1   | Preparing record 0[07:52:58] SMILES Parse Error: syntax error while parsing: SMILES
matcher-backend-1   | [07:52:58] SMILES Parse Error: Failed parsing SMILES 'SMILES' for input: 'SMILES'
matcher-database-1  | CREATE DATABASE
matcher-database-1  | 
matcher-database-1  | 
matcher-database-1  | /usr/local/bin/docker-entrypoint.sh: running /docker-entrypoint-initdb.d/load-extensions.sh
matcher-database-1  | CREATE EXTENSION
matcher-database-1  |   oid  | extname | extowner | extnamespace | extrelocatable | extversion | extconfig | extcondition 
matcher-database-1  | -------+---------+----------+--------------+----------------+------------+-----------+--------------
matcher-database-1  |  13454 | plpgsql |       10 |           11 | f              | 1.0        |           | 
matcher-database-1  |  16385 | rdkit   |       10 |         2200 | t              | 4.3.0      |           | 
matcher-database-1  | (2 rows)
matcher-database-1  | 
matcher-database-1  | 
matcher-database-1  | 2024-01-15 07:52:58.811 UTC [48] LOG:  received fast shutdown request
matcher-database-1  | waiting for server to shut down....2024-01-15 07:52:58.818 UTC [48] LOG:  aborting any active transactions
matcher-database-1  | 2024-01-15 07:52:58.822 UTC [48] LOG:  background worker "logical replication launcher" (PID 55) exited with exit code 1
matcher-database-1  | 2024-01-15 07:52:58.822 UTC [50] LOG:  shutting down
matcher-database-1  | 2024-01-15 07:52:58.897 UTC [48] LOG:  database system is shut down
matcher-database-1  |  done
matcher-database-1  | server stopped
matcher-database-1  | 
matcher-database-1  | PostgreSQL init process complete; ready for start up.
matcher-database-1  | 
matcher-database-1  | 2024-01-15 07:52:58.961 UTC [1] LOG:  starting PostgreSQL 13.13 (Debian 13.13-1.pgdg120+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit
matcher-database-1  | 2024-01-15 07:52:58.961 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
matcher-database-1  | 2024-01-15 07:52:58.961 UTC [1] LOG:  listening on IPv6 address "::", port 5432
matcher-frontend-1  | [2024-01-15 07:52:58 +0000] [15] [INFO] Starting gunicorn 20.1.0
matcher-frontend-1  | [2024-01-15 07:52:58 +0000] [15] [INFO] Listening at: http://0.0.0.0:8000 (15)
matcher-frontend-1  | [2024-01-15 07:52:58 +0000] [15] [INFO] Using worker: gevent
matcher-frontend-1  | [2024-01-15 07:52:58 +0000] [16] [INFO] Booting worker with pid: 16
matcher-database-1  | 2024-01-15 07:52:58.974 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
matcher-database-1  | 2024-01-15 07:52:58.991 UTC [66] LOG:  database system was shut down at 2024-01-15 07:52:58 UTC
matcher-database-1  | 2024-01-15 07:52:59.005 UTC [1] LOG:  database system is ready to accept connections
matcher-frontend-1  | [2024-01-15 07:52:59 +0000] [17] [INFO] Booting worker with pid: 17
matcher-backend-1   | Started indexing at time = 1705305180.6845496
matcher-backend-1   | Finished loading fragments, seconds taken = 0.0030546188354492188
matcher-backend-1   | Starting to find pairs at 1705305180.6876042
Traceback (most recent call last):
matcher-backend-1   |   File "/opt/./backend/mmpdb/mmpdb.py", line 9, in <module>
matcher-backend-1   |     commandline.main()
matcher-backend-1   |   File "/opt/backend/mmpdb/mmpdblib/commandline.py", line 1089, in main
matcher-backend-1   |     parsed_args.command(parsed_args.subparser, parsed_args)
matcher-backend-1   |   File "/opt/backend/mmpdb/mmpdblib/commandline.py", line 393, in index_command
matcher-backend-1   |     do_index.index_command(parser, args)
matcher-backend-1   |   File "/opt/backend/mmpdb/mmpdblib/do_index.py", line 203, in index_command
matcher-backend-1   |     with index_algorithm.open_mmpa_writer(args.output, format=args.out,
matcher-backend-1   |   File "/opt/backend/mmpdb/mmpdblib/index_algorithm.py", line 1333, in open_mmpa_writer
matcher-backend-1   |     index_writer = index_writers.open_postgres_index_writer(destination, title)
matcher-backend-1   |   File "/opt/backend/mmpdb/mmpdblib/index_writers.py", line 739, in open_postgres_index_writer
matcher-backend-1   |     db = dbutils.open_postgres_database(filename)
matcher-backend-1   |   File "/opt/backend/mmpdb/mmpdblib/dbutils.py", line 155, in open_postgres_database
matcher-backend-1   |     conn = psycopg2.connect(
matcher-backend-1   |   File "/opt/conda/envs/matcher-api/lib/python3.9/site-packages/psycopg2/__init__.py", line 122, in connect
matcher-backend-1   |     conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
matcher-backend-1   | psycopg2.OperationalError: timeout expired
matcher-backend-1   | 
matcher-backend-1   | ERROR conda.cli.main_run:execute(47): `conda run python ./backend/mmpdb/mmpdb.py index ./backend/initialize_db/test_structures.fragments -o public$postgres` failed. (See above for error)
$ docker ps
CONTAINER ID   IMAGE              COMMAND                  CREATED         STATUS         PORTS                                       NAMES
2887c1c6c6a2   matcher-frontend   "conda run --no-capt…"   8 seconds ago   Up 6 seconds   0.0.0.0:8000->8000/tcp, :::8000->8000/tcp   matcher-frontend-1
cc8b51c6d099   matcher-backend    "bash -c 'echo $RUN_…"   8 seconds ago   Up 6 seconds   0.0.0.0:8001->8001/tcp, :::8001->8001/tcp   matcher-backend-1
4428773eea48   matcher-database   "docker-entrypoint.s…"   8 seconds ago   Up 6 seconds   0.0.0.0:5432->5432/tcp, :::5432->5432/tcp   matcher-database-1
$ conda run python ./backend/mmpdb/mmpdb.py index ./backend/initialize_db/test_structures.fragments -o public$postgres
Started indexing at time = 1705305537.7112198
Finished loading fragments, seconds taken = 0.0006251335144042969
Starting to find pairs at 1705305537.711845
Starting to write pairs at 1705305537.901698

How to access the metadata table in the container

Hello, I'd like to modify some property metadata without processing the entire dataset again, so I aim to mount the database container and modify the table. What is the path to the table in the container? I tried mounting and doing a search on a property name, but it did not turn up anything (possibly due to permissions issues), so I was wondering where to look.

Docker mmpdb.py error

Hey,

Trying to run this, but I seem to be unable to run the mmpdb.py when running the docker compose up command. This is the error I am obtaining:

matcher-backend-1   | python: can't open file '/opt/./mmpdb/mmpdb.py': [Errno 2] No such file or directory
matcher-backend-1   | ERROR conda.cli.main_run:execute(49): `conda run python ./mmpdb/mmpdb.py fragment ./initialize_db/quick_structures.smi -o ./initialize_db/quick_structures.fragments --cut-smarts matcher_alpha` failed. (See above for error)
matcher-backend-1 exited with code 1

Do you have any thoughts on how to fix this?

conda parameter error 'conda: error: unrecognized arguments: --no-capture-output'

When I use this command,‘docker-compose up',there was a mistake. I checked my version of conda, it has the--no-capture-output parameter, I don't know why it can't recognize this parameter when I run this command.

Attaching to matcher-backend-1, matcher-database-1, matcher-frontend-1
matcher-database-1 |
matcher-database-1 | PostgreSQL Database directory appears to contain a database; Skipping initialization
matcher-database-1 |
matcher-database-1 | 2023-11-14 17:17:40.592 UTC [1] LOG: starting PostgreSQL 13.5 (Debian 13.5-1.pgdg110+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit
matcher-database-1 | 2023-11-14 17:17:40.592 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432
matcher-database-1 | 2023-11-14 17:17:40.592 UTC [1] LOG: listening on IPv6 address "::", port 5432
matcher-database-1 | 2023-11-14 17:17:40.595 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
matcher-database-1 | 2023-11-14 17:17:40.598 UTC [26] LOG: database system was shut down at 2023-11-14 17:13:13 UTC
matcher-database-1 | 2023-11-14 17:17:40.601 UTC [1] LOG: database system is ready to accept connections
matcher-backend-1 |
matcher-backend-1 | usage: conda [-h] [-V] command ...
matcher-backend-1 | conda: error: unrecognized arguments: --no-capture-output
matcher-backend-1 exited with code 1
matcher-frontend-1 | usage: conda [-h] [-V] command ...
matcher-frontend-1 | conda: error: unrecognized arguments: --no-capture-output

Installation Issue - Please help me

First of all, thanks for your valuable repository.

I am working on Windows 10 environment. After cloning repository, I got the same error as described in #1. Again, follow the resolve steps. But after that I am getting the folloing error

matcher

Regards,
Sitanshu

Help needed for installation

I'm running Ubuntu 19.3.
I tried to install matcher as below:

$ git clone https://github.com/Merck/matcher.git
$ cd matcher
$ git submodule init
$ git submodule update
$ docker-compose up
ERROR: The Compose file './docker-compose.yml' is invalid because:
Unsupported config option for services: 'database'
Unsupported config option for networks: 'matcher-network'

What did I do wrong?

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.