Skip to content

Commit

Permalink
Initial Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
matty234 committed Jun 25, 2019
0 parents commit 38a8df3
Show file tree
Hide file tree
Showing 312 changed files with 25,627 additions and 0 deletions.
229 changes: 229 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,229 @@

# Created by https://www.gitignore.io/api/go,node,code,macos,intellij+iml
# Edit at https://www.gitignore.io/?templates=go,node,code,macos,intellij+iml

### Code ###
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json

### Go ###
# Binaries for programs and plugins
*.exe
*.exe~
*.dll
*.so
*.dylib

# Test binary, built with `go test -c`
*.test

# Output of the go coverage tool, specifically when used with LiteIDE
*.out

### Intellij+iml ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf

# Generated files
.idea/**/contentModel.xml

# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml

# Gradle
.idea/**/gradle.xml
.idea/**/libraries

# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/modules.xml
# .idea/*.iml
# .idea/modules

# CMake
cmake-build-*/

# Mongo Explorer plugin
.idea/**/mongoSettings.xml

# File-based project format
*.iws

# IntelliJ
out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Cursive Clojure plugin
.idea/replstate.xml

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

# Editor-based Rest Client
.idea/httpRequests

# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser

# JetBrains templates
**___jb_tmp___

### Intellij+iml Patch ###
# Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-249601023

*.iml
modules.xml
.idea/misc.xml
*.ipr

### macOS ###
# General
.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon

# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

### Node ###
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
**/bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
**/node_modules/
jspm_packages/

# TypeScript v1 declaration files
typings/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env
.env.test

# parcel-bundler cache (https://parceljs.org/)
.cache

# next.js build output
.next

# nuxt.js build output
.nuxt

# vuepress build output
.vuepress/dist

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# End of https://www.gitignore.io/api/go,node,code,macos,intellij+iml
**/.idea
**/vendor
services/verdict-web/dist
import-tool/input/omim/morbidmap.txt
import-tool/input/omim/mimTitles.txt
import-tool/input/omim/mim2gene.txt
import-tool/input/hugo/genes-with-ncbi-mapping.txt
import-tool/input/hprd/BINARY_PROTEIN_PROTEIN_INTERACTIONS.txt
import-tool/input/cardigan/weighted_predictions.txt
import-tool/input/caniza/combined_similarity_triplet.tsv
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# VerDICT - Visualisation of Disease-Gene Predictions in Context

According to the recently developed paradigm of Network Medicine, hereditary diseases can be thought of as perturbations in the transmission of signals on networks of interacting biomolecules, known as the interactome. Several algorithms have recently been proposed that exploit the principles of Network medicine to predict disease genes for hereditary diseases. However, no tool currently exists that allows the clinician scientists to visualise the predicted disease genes in the context of the interactome. This project aims at filling this gap, by developing VerDICT, an intuitive, user-friendly environment where clinician-scientists can reason about the predictions generated by the algorithms and generate a hypothesis to test experimentally. The program allows the users to include in their analysis of metabolic pathways, information about related medical conditions as well as user-specific domain knowledge in the form of custom groups of genes. VerDICT is highly customizable, it integrates data from the most relevant disease-related database, OMIM, Kegg and Entrez, and is freely available to the scientific community as a web application from the [PaccanaroLab website](https://www.paccanarolab.org/VerDICT).

# Installation
This installation requires a Kubernetes cluster. Instructions for installation will be added soon.

# Testing
Instructions for testing will be added soon.
1 change: 1 addition & 0 deletions deployment
Submodule deployment added at e9966c
111 changes: 111 additions & 0 deletions import-tool/builder.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
# CARDIGAN
# cd cardigan; tail -n+2 dt2.txt| python ./split-to-lines.py > ../nov15/disease-cardigan-gene.txt; cd ..
# import sys

# for line in sys.stdin:
# disease = str(line).split('\t')[0]
# prots = str(line).split('\t')[2].split('|')
# for protein in prots:
# print(disease.rstrip() + '|' + protein.rstrip() + '|PREDICTED_INTERACTION')
# pass
# pass


# cut -d'|' -f1 diseases.nodes.txt | python build-entrez-morbidmap.py > ../nov15/disease-morbidmap-gene.txt
# import sys
# from collections import defaultdict
#
# FORMATTED_MORBID_MAP_FILE = './morbidmap-omimdisease-omimgene.txt'
# MIM_TO_GENE = './mim2gene.txt'
#
# #
# # Expects OMIM disease identifiers from stdin which are then mapped to `morbidmap.txt`
# # where the entrez ID is found from mim2gene
# #
#
# mimtogene = {}
#
# with open(MIM_TO_GENE, "rb") as mimToGenePSV:
# for line in mimToGenePSV:
# fields = line.split('\t')
# if(len(fields) > 1
# and fields[1] == 'gene'
# and fields[2] != ''):
# mimtogene[fields[0].rstrip()] = fields[2].rstrip()
# mimToGenePSV.close()
#
# morbidmap = defaultdict(list)
#
# with open(FORMATTED_MORBID_MAP_FILE, "rb") as morbidmapPSV:
# for line in morbidmapPSV:
# fields = line.split('|')
# if(len(fields) > 1 and fields[1].rstrip() in mimtogene):
# morbidmap[fields[0]].append(mimtogene[fields[1].rstrip()])
# morbidmapPSV.close()
#
# for diseaseomim in sys.stdin:
# formattedDiseaseOmim = str(diseaseomim).rstrip()
# for relatedgenes in morbidmap[formattedDiseaseOmim]:
# print(formattedDiseaseOmim+ '|' + relatedgenes + '|'+'HAS_GENE')
# pass
# pass


from pathlib import Path

from lib.DiseaseSimilarity import DiseaseSimilarity
from lib.Hugo import Hugo
from lib.OMIM import OMIM
from lib.FileUtilities import FileUtilities
from lib.Cardigan import Cardigan
from lib.PPI import PPI
from lib.HPRD import HPRD

OUTPUT_DIR = Path('output')

OMIM_MIMTITLES = Path('input/omim/mimTitles.txt')
OMIM_MORBIDMAP = Path('input/omim/morbidmap.txt')
OMIM_MIM2GENE = Path('input/omim/mim2gene.txt')

CARDIGAN_PREDICTIONS = Path('input/cardigan/weighted_predictions.txt')

BIOGRID_PPI = Path('input/biogrid/ppi.txt')

HUGO_GENES = Path('input/hugo/genes-with-ncbi-mapping.txt')

HPRD_PPI = Path('input/hprd/BINARY_PROTEIN_PROTEIN_INTERACTIONS.txt')

CANIZA_SIMILARITY = Path('input/caniza/combined_similarity_triplet.tsv')


abnormal_omim_entries = [616902]


if __name__ == '__main__':

fileUtils = FileUtilities()

hugo = Hugo(HUGO_GENES)
omim = OMIM(OMIM_MIMTITLES, OMIM_MORBIDMAP, OMIM_MIM2GENE)
cardigan = Cardigan(CARDIGAN_PREDICTIONS)
# biogrid = PPI(BIOGRID_PPI)
disease_sim = DiseaseSimilarity(CANIZA_SIMILARITY)
hprd = HPRD(HUGO_GENES, HPRD_PPI)

fileUtils.write_nodes(hugo.get_genes(), OUTPUT_DIR.joinpath('gene.nodes.txt').open('w+'))

fileUtils.write_nodes(omim.get_phenotypes(), OUTPUT_DIR.joinpath('disease.nodes.txt').open('w+'))

fileUtils.json_write_nodes(omim.get_phenotypes(), OUTPUT_DIR.joinpath('disease.nodes.json').open('w+'))

fileUtils.json_write_nodes(hugo.get_genes(), OUTPUT_DIR.joinpath('gene.nodes.json').open('w+'))

fileUtils.write_relationships(omim.get_morbidmap_associations(), OUTPUT_DIR.joinpath('disease-morbidmap-gene.txt').open('w+'))

fileUtils.write_relationships(cardigan.get_predictions(), OUTPUT_DIR.joinpath('disease-cardigan-gene.txt').open('w+'))

# fileUtils.write_relationships(biogrid.get_values(), OUTPUT_DIR.joinpath('gene-interacts-gene.txt').open('w+'))

fileUtils.write_relationships(hprd.get_hprd(), OUTPUT_DIR.joinpath('gene-interacts-gene.txt').open('w+'))

fileUtils.write_relationships(disease_sim.get_similarity(), OUTPUT_DIR.joinpath('disease-sim-disease.txt').open('w+'))
5 changes: 5 additions & 0 deletions import-tool/do-import.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh

neo4j-admin import --nodes:PHENOTYPE /var/lib/neo4j/import/output/disease.nodes.txt --nodes:GENE /var/lib/neo4j/import/output/gene.nodes.txt --relationships /var/lib/neo4j/import/output/disease-cardigan-gene.txt --relationships /var/lib/neo4j/import/output/disease-morbidmap-gene.txt --relationships /var/lib/neo4j/import/output/disease-sim-disease.txt --relationships /var/lib/neo4j/import/output/gene-interacts-gene.txt --id-type=INTEGER --delimiter="|" --ignore-duplicate-nodes --ignore-missing-nodes

exec /var/lib/neo4j/bin/neo4j console
Empty file.
Empty file.
Empty file added import-tool/input/hprd/.gitkeep
Empty file.
Empty file added import-tool/input/omim/.gitkeep
Empty file.
Loading

0 comments on commit 38a8df3

Please sign in to comment.