-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
71 additions
and
23 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
// BioJS-Sniper creates the DOM-element yourDiv by default | ||
yourDiv.innerHTML = ''; | ||
|
||
// d3 & underscore are imported through the header | ||
// import our plot-library | ||
var mutneedles = require("muts-needle-plot"); | ||
|
||
var target = yourDiv; // autmically generated in snippets examples | ||
|
||
var muts = [ | ||
{ coord: "148", category : "neutral", value: 3 }, | ||
{ coord: "150", category : "severe", value: 44 }, | ||
{ coord: "150", category : "mild", value: 8 }, | ||
{ coord: "152", category : "neutral", value: 2 }, | ||
{ coord: "154", category : "neutral", value: 1 }, | ||
{ coord: "155", category : "neutral", value: 3 }, | ||
{ coord: "160", category : "mild", value: 4 }, | ||
{ coord: "170", category : "severe", value: 2 }, | ||
{ coord: "171", category : "mild", value: 30 }, | ||
{ coord: "172", category : "mild", value: 50 } | ||
]; | ||
|
||
var regions = { | ||
"cluster 1": "145-155", | ||
"cluster 2": "170-172" | ||
}; | ||
|
||
var legends = {x: "Mutations Needle Plot", y: "# Mutations"} | ||
|
||
|
||
var colorMap = { | ||
// mutation categories | ||
"mild": "orange", | ||
"severe": "red", | ||
"neutral": "lightblue", | ||
"cluster 1": "marine", | ||
"cluster 2": "olive" | ||
}; | ||
|
||
var config = {maxCoord: 220, minCoord: 130, mutationData: muts, regionData: regions, target: target, legends: legends, colorMap: colorMap } | ||
|
||
var plot1 = new mutneedles(config); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters