Skip to content
This repository has been archived by the owner on Jul 30, 2019. It is now read-only.

elifesciences-publications/microbeFDT-neo4j

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 

Repository files navigation

microbeFDT-neo4j

This code is associated with the paper from Guthrie et al., "The human gut chemical landscape predicts microbe-mediated biotransformation of foods and drugs". eLife, 2019. http://dx.doi.org/10.7554/eLife.42866

About microbeFDT

The gut microbiota complements host-driven metabolism of dietary compounds and xenobiotics, such as therapeutic drugs. Some gastrointestinally-routed drugs with uncharacterized metabolism and downstream effects on patients, have overlapping chemical properties with dietary compounds, and thus may share gut microbiota enzymatic susceptibilities.

Here, we present a database, MicrobeFDT, which predicts food and drug susceptibility to microbial metabolism by clustering chemically similar drug and food compounds and linking these compounds to microbial enzymes and known toxicities. We hypothesize that the chemical structures of dietary compounds metabolized by bacteria can be used to infer microbial metabolism of uncharacterized drugs with overlapping chemical similarity. We identify therapeutic drugs with potential microbiota-mediated toxicity, highlight understudied microbial enzyme families that may influence drug metabolism and identify drug-food-microbiome interactions that may alter microbiome function and influence host phenotypes.

Running MicrobeFDT

Option 1 -- Run a local Neo4j instance with MicrobeFDT

Instructions for installing docker

Download MicrobeFDT database and configuration

mkdir MicrobeFDT_db
cd MicrobeFDT_db
wget https://www.dropbox.com/s/3xqdrhhamjxhja8/microbefdt.tar
tar xvf microbefdt.tar
ls

output

conf                data                microbefdt.tar?dl=0

Run neo4j docker image with MicrobeFDT database

Replace $fullpathto with the full path to the data/ and conf/ directories.

docker run --publish=7474:7474 --publish=7687:7687 --volume=/*$fullpathto*/MicrobeFDT_db/data/:/data --volume=/$fullpathto/MicrobeFDT_db/conf:/conf neo4j:3.4.4

output

Active database: graph.db
Directories in use:
  home:         /var/lib/neo4j
  config:       /var/lib/neo4j/conf
  logs:         /var/lib/neo4j/logs
  plugins:      /var/lib/neo4j/plugins
  import:       /var/lib/neo4j/import
  data:         /var/lib/neo4j/data
  certificates: /var/lib/neo4j/certificates
  run:          /var/lib/neo4j/run
Starting Neo4j.
2018-09-28 15:27:52.495+0000 INFO  ======== Neo4j 3.4.4 ========
2018-09-28 15:27:52.526+0000 INFO  Starting...
2018-09-28 15:27:55.624+0000 INFO  Bolt enabled on 0.0.0.0:7687.
2018-09-28 15:27:58.358+0000 INFO  Started.
2018-09-28 15:27:59.575+0000 INFO  Remote interface available at http://localhost:7474/

Go to http://localhost:7474/ in your browser.

Option 2 -- Run MicrobeFDT locally on your machine

Install

Neo4j

Neo4j is an open source graph database. To interact with the MicrobeFDT database you will need to download Neo4j and follow their instructions for your operating system. MicrobeFDT is run on the Community Edition 3.4.4.

Connect to MicrobeFDT

Navigate to the database sub directory of neo4j and copy the microbeFDT database file here.

The database file is hosted here.

cd neo4j-community-3.4.4/data/databases
wget https://www.dropbox.com/s/0w85jstzubbk7yz/MicrobefdtNeo4jgraph.zip?dl=0 or download this file from the link.
unzip MicrobefdtNeo4jgraph.zip?dl

Navigate to the root of your neo4j directory and copy the microbeFDT guide file file here.

The guide file is hosted here.

cd neo4j-community-3.4.4/
wget https://www.dropbox.com/s/z3e917ovxx1xwcm/microbeFDT_guide.zip
mkdir guides
cd guides
unzip microbeFDT_guide.zip

output

http-server.py		microbeFDT.html		microbeFDT_guide.zip

Open the neo4j browser

./bin/neo4j console
Starting Neo4j.
2018-07-31 10:51:31.661+0000 INFO  ======== Neo4j 3.4.4 ========
2018-07-31 10:51:31.750+0000 INFO  Starting...
2018-07-31 10:51:35.761+0000 INFO  Bolt enabled on 127.0.0.1:7687.
2018-07-31 10:51:39.992+0000 INFO  Started.
2018-07-31 10:51:41.831+0000 WARN  Low configured threads: (max={} - required={})={} < warnAt={} for {}
2018-07-31 10:51:41.850+0000 INFO  Remote interface available at http://localhost:7474/

Create a neo4j login

By default your login and password credentials are:

login: neo4j

password: neo4j

After logging in you will be prompted to change your password.

Run MicrobeFDT neo4j guide in browser

For help getting started run the microbefdt guide.

In a new terminal window navigate to the guides directory.

cd neo4j-microbeFDT/guides

Run the local python server.

python http-server.py

In the neo4j browser run:

:play http://localhost:8001/microbeFDT.html

Nodes

Nodes

To recreate the database from source or to access flatfiles used to create the database use the following link.

Node Properties Property Description
Compound cpID PubChem CID
name Compound name
type_OtherMultiCpd_drug Status as therapeutic drug or other
Enzyme enzymeID Unique ID code
ec_class Enzyme Class
ecsd_score Enzyme specific dominance scores
enzymeECnum Enzyme Commision ID
hmpGenomeCount Count across Genomes in HMP
hmpMetagenomeCount Count across Metagenomes in HMP
Use ATC_mainGroup 1st level, anatomical main group
ATC_TherapeuticGroup 2nd level, therapeutic subgroup
ATC_Pharmaologicalsub 3rd level, pharmacological subgroup
ATC_ChemicalGroup 4th level, chemical subgroup
ATC_codeID 5th level, chemical substance

Relationships

Relationships

Relationship Properties Property Description
HAS_SUBSTRUCTURE_OVERLAP_WITH score Pairwise substructure overlap score
HAS_TOX_OVERLAP_WITH score Pairwise toxicity overlap score
METABOLIZED_BY
TREATMENT_FOR

Cypher

Cypher Documentation

Enzyme-based search

MATCH p=()-[r:METABOLIZED_BY]->(n:Enzyme)
WHERE n.enzymeECnum = '3.2.1.31' 
RETURN p LIMIT 100

Toxicity-based search

MATCH p=(c:Compound)-[r:HAS_TOX_OVERLAP_WITH]->(c1:Compound)
WHERE r.score > 0.5
RETURN c.cpdID,c1.cpdID,r.score

Drivers

Drivers

There are a number of driver that provide access to Neo4j from a variety of supported languages.

Rneo4j Example

Running this example assumes that neo4jis running in the background.

library(RNeo4j)

Connecto the graph

graph = startGraph("http://127.0.0.1:7474/db/data/", username = "neo4j", password = "microbetest")
graph

Query the database with cypher

query = "MATCH p=()-[r:METABOLIZED_BY]->(n:Enzyme) RETURN n.enzymeID,n.ec_class,n.ecsd_score"
cypher(graph, query)

output

                              n.enzymeID  n.ec_class n.ecsd_score
1 (23-dihydroxybenzoyl)adenylate-synthase Transferase    0.6515893
2 (23-dihydroxybenzoyl)adenylate-synthase Transferase    0.6515893
3                           (d)CMP-kinase Transferase    0.9362530
4                           (d)CMP-kinase Transferase    0.9362530
5                (R)-citramalate-synthase Transferase    0.5533522
6                (R)-citramalate-synthase Transferase    0.5533522

Neo4j-APOC

Neo4j-APOC

The Awesome Procedures for Neo4j (APOC) library extends user options for data analysis and conversion beyond the limitations of CYPHER.

For more information can be found at the APOC github repository.

Releases

No releases published

Packages