Needleplot example
HTML
<link rel="stylesheet" href="https://rawgit.com/reimandlab/needleplot/master/style.css">
<script src="https://rawgit.com/reimandlab/needleplot/master/needleplot.js"></script>
<script src="https://d3js.org/d3.v3.min.js"></script>
<div id="needleplot"></div>
CSS
.phosphorylation rect, .phosphorylation path{
fill: rgb(67, 162, 202)
}
JavaScript
var needle_plot = new NeedlePlot({
use_log: true,
legends: {y: 'Frequency of mutations', x: 'Sequence'},
element: document.getElementById('needleplot'),
sequence_length: 393,
data: {
mutations: [
{pos: 157, alt: "F", value: 0.001},
{pos: 234, alt: "C", value: 0.0004},
{pos: 273, alt: "H", value: 0.023},
{pos: 282, alt: "W", value: 0.23}
],
sites: []
}
});