Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
jingraham committed Jan 26, 2017
0 parents commit 091fdb6
Show file tree
Hide file tree
Showing 10 changed files with 2,358 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
build/
node_modules/
**/*.params
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# EVzoom
[EVzoom](https://marks.hms.harvard.edu/evzoom/) is an interactive, embeddable tool for visualizing [undirected graphical models](https://en.wikipedia.org/wiki/Markov_random_field) of protein families. Since these models explicitly parameterize all possible combinations of amino acids at all pairs of positions in a sequence, they contain far too much information to depict statically.

EVzoom lets you zoom in on any pair of positions in a protein family and see both inferred couplings between amino acids and [sequence logos](https://en.wikipedia.org/wiki/Sequence_logo) that summarize conservation statistics.
<p align="center"><img src="https://marks.hms.harvard.edu/evzoom/evzoom.gif" width="500"></p>

EVzoom is based on SVG and powered by [D3](https://d3js.org/).

## Inference
EVzoom is designed to be used with models inferred by [plmc](https://github.com/debbiemarkslab/plmc). The [examples](https://github.com/debbiemarkslab/plmc#examples) in the plmc repo show how to export JSON-formatted model files for EVzoom.

Want to work directly with the couplings in an EVzoom visualization? Check out the [EVmutation](https://github.com/debbiemarkslab/EVmutation) Python package written by Thomas Hopf.

## Embedding
Embedding EVzoom takes two lines

```html
<div id="evzoom-viewer" data-couplings="/data/dhfr.json"> </div>
<script src="dist/evzoom.js"></script>
```

The `data-couplings` tag specifies the URL for the json file. This tag can be overridden by appending a query string `?data=JSON_URL` to the URL. An example of the tag-based approach is available in `example/evzoom.html`. To take it for a spin and serve it from your filesystem, run `python -m SimpleHTTPServer 8000` in the root of the repository (requires Python 2.7) and navigate to `localhost:8000/example/evzoom.html` in your browser.

## Author
EVzoom was written by [John Ingraham](mailto:[email protected]) in [Debora Marks' lab](https://marks.hms.harvard.edu/) at Harvard Medical School
811 changes: 811 additions & 0 deletions data/dhfr.json

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions dist/evzoom.js

Large diffs are not rendered by default.

15 changes: 15 additions & 0 deletions evzoom.sublime-project
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"folders":
[
{
"path": "."
}
],
"build_systems":
[
{
"name": "Build",
"shell_cmd": "npm run build"
}
]
}
7 changes: 7 additions & 0 deletions example/evzoom.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>EVzoom</title>
<center>
<div id="evzoom-viewer" data-couplings="../data/dhfr.json"> </div>
<script src="../dist/evzoom.js"></script>
</center>
29 changes: 29 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"name": "evzoom",
"version": "0.1.0",
"description": "",
"main": "dist/evzoom.js",
"scripts": {
"build": "rollup -c && uglifyjs build/evzoom.dev.js -cm > dist/evzoom.js"
},
"homepage": "https://github.com/debbiemarkslab/EVzoom",
"repository": {
"type": "git",
"url": "https://github.com/debbiemarkslab/EVzoom.git"
},
"bugs": {
"url": "https://github.com/debbiemarkslab/EVzoom/issues"
},
"author": "John Ingraham <[email protected]>",
"contributors": [],
"license": "",
"keywords": [
"Coevolution",
"Undirected graphical model"
],
"devDependencies": {
"d3": "^4.0.0",
"rollup-plugin-node-resolve": "^2.0.0"
},
"dependencies": {}
}
9 changes: 9 additions & 0 deletions rollup.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import npm from "rollup-plugin-node-resolve";

export default {
entry: "src/evzoom.js",
dest: "build/evzoom.dev.js",
format: "umd",
moduleName: "d3",
plugins: [npm({jsnext: true})]
};
17 changes: 17 additions & 0 deletions src/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

# Compiling EVzoom
Note: The following is only required for development. A compiled, ready-to-run version of EVzoom is provided at dist/evzoom.js.

## Install dependencies
EVzoom is bundled and minified with the Node.js packages `rollup` and `uglifyjs`. After installing Node, these dependencies can be globally installed with

npm install -g rollup
npm install -g uglify-js

## Building
To build EVzoom, run

npm install
npm run build

This will build evzoom into dist/evzoom.js.
Loading

0 comments on commit 091fdb6

Please sign in to comment.