|
a |
|
b/README.md |
|
|
1 |
# Deep Motif Dashboard: Visualizing and Understanding Genomic Sequences Using Deep Neural Networks |
|
|
2 |
### Jack Lanchantin, Ritambhara Singh, Beilun Wang, and Yanjun Qi |
|
|
3 |
### Pacific Symposium on Biocomputing (PSB) 2017 |
|
|
4 |
https://arxiv.org/abs/1608.03644 |
|
|
5 |
|
|
|
6 |
### Talk slides: |
|
|
7 |
https://github.com/QData/DeepMotif/blob/master/psb_talk_slides.pdf |
|
|
8 |
|
|
|
9 |
### bibtex: |
|
|
10 |
``` |
|
|
11 |
@inproceedings{lanchantin2017deep, |
|
|
12 |
title={Deep motif dashboard: Visualizing and understanding genomic sequences using deep neural networks}, |
|
|
13 |
author={Lanchantin, Jack and Singh, Ritambhara and Wang, Beilun and Qi, Yanjun}, |
|
|
14 |
booktitle={PACIFIC SYMPOSIUM ON BIOCOMPUTING 2017}, |
|
|
15 |
pages={254--265}, |
|
|
16 |
year={2017}, |
|
|
17 |
organization={World Scientific} |
|
|
18 |
} |
|
|
19 |
``` |
|
|
20 |
|
|
|
21 |
[](https://github.com/QData/DeepMotif/blob/master/LICENSE) |
|
|
22 |
|
|
|
23 |
|
|
|
24 |
# Installation |
|
|
25 |
|
|
|
26 |
|
|
|
27 |
## Lua setup |
|
|
28 |
The main modeling code is written in Lua using [torch](http://torch.ch) |
|
|
29 |
Installation instructions are located [here](http://torch.ch/docs/getting-started.html#_) |
|
|
30 |
|
|
|
31 |
After installing torch, install / update these packages by running the following: |
|
|
32 |
|
|
|
33 |
```bash |
|
|
34 |
luarocks install torch |
|
|
35 |
luarocks install nn |
|
|
36 |
luarocks install optim |
|
|
37 |
``` |
|
|
38 |
|
|
|
39 |
### CUDA support (Optional) |
|
|
40 |
To enable GPU acceleration with [CUDA](https://developer.nvidia.com/cuda-downloads), you'll need to install CUDA 6.5 or higher as well as [cutorch](https://github.com/torch/cutorch) and [cunn](https://github.com/torch/cunn). You can install / update the torch CUDA libraries by running: |
|
|
41 |
|
|
|
42 |
```bash |
|
|
43 |
luarocks install cutorch |
|
|
44 |
luarocks install cunn |
|
|
45 |
``` |
|
|
46 |
|
|
|
47 |
## LFS |
|
|
48 |
|
|
|
49 |
Install git large file storage (LFS) in order to download the dataset directly from this git repository. |
|
|
50 |
|
|
|
51 |
https://git-lfs.github.com/ |
|
|
52 |
|
|
|
53 |
|
|
|
54 |
## Visualization Method Dependencies |
|
|
55 |
|
|
|
56 |
Weblogo: http://weblogo.berkeley.edu/ |
|
|
57 |
|
|
|
58 |
R: https://www.r-project.org/ |
|
|
59 |
|
|
|
60 |
|
|
|
61 |
# Usage |
|
|
62 |
|
|
|
63 |
|
|
|
64 |
## Step 1: Get the Data |
|
|
65 |
tar xvzf data/deepbind.tar.gz -C data/ |
|
|
66 |
|
|
|
67 |
|
|
|
68 |
## Step 2: Train the model |
|
|
69 |
You can train one of the 3 types of models (CNN, RNN, or CNN-RNN). Check the flags in main.lua for parameters to run the code. |
|
|
70 |
|
|
|
71 |
For CNN model: |
|
|
72 |
```bash |
|
|
73 |
th main.lua -cnn |
|
|
74 |
``` |
|
|
75 |
|
|
|
76 |
For CNN model: |
|
|
77 |
```bash |
|
|
78 |
th main.lua -rnn |
|
|
79 |
``` |
|
|
80 |
|
|
|
81 |
For CNN-RNN model: |
|
|
82 |
```bash |
|
|
83 |
th main.lua -cnn -rnn |
|
|
84 |
``` |
|
|
85 |
|
|
|
86 |
## Step 3: Visualize the Model's Predictions |
|
|
87 |
Once you have trained models, you can visualize the predictions. |
|
|
88 |
|
|
|
89 |
|
|
|
90 |
Saliency Map |
|
|
91 |
```bash |
|
|
92 |
th saliency_map.lua |
|
|
93 |
``` |
|
|
94 |
|
|
|
95 |
Temporal Output Values |
|
|
96 |
```bash |
|
|
97 |
th temporal_output_values.lua |
|
|
98 |
``` |
|
|
99 |
|
|
|
100 |
Class Optimization |
|
|
101 |
```bash |
|
|
102 |
th class_optimization.lua |
|
|
103 |
``` |
|
|
104 |
|
|
|
105 |
|
|
|
106 |
|