-
Notifications
You must be signed in to change notification settings - Fork 62
Description
This is a great library, really useful! I have a couple of questions. Apologies in advance if they have already been answered somewhere on the repo.
-
Is there any documentation? For example there are some really useful functions such as the ability to click on variants to trigger something (https://github.com/hammerlab/pileup.js/blob/master/examples/data.js#L38), however I only found these by looking at the few example. Are all the possible options and configurations covered in the examples or are the potentially other useful ones that are not documented?
-
I read on some of the github issues that it is possible to limit the region which the viewer can load. Is there any documentation on how to do this?
-
I am having some issues with the formatting of the reference. At some zoom levels the reference nucleotides and the pileup track seem slightly out of sync, however this is not the case in your online example.
I have served the files and included them in my html page like this:
<html>
<head>
<script src="/static/pileup.js"></script>
<link rel="stylesheet" href="/static/pileup.css" >
</head>
<body>
<div class="" id="your-id">
hello
</div>
<script type="text/javascript">
var bamSource = pileup.formats.bam({
url: "/static/synth3.normal.17.7500000-7515000.bam",
indexUrl: "/static/synth3.normal.17.7500000-7515000.bam.bai",
});
var div = document.getElementById('your-id');
var p = pileup.create(div, {
range: {contig: 'chr17', start: 7512384, stop: 7512544},
tracks: [
{
viz: pileup.viz.genome(),
isReference: true,
data: pileup.formats.twoBit({
url: 'http://www.biodalliance.org/datasets/hg19.2bit'
}),
name: 'Reference'
},
{
viz: pileup.viz.coverage(),
data: bamSource,
cssClass: 'normal',
name: 'Coverage'
},
{
viz: pileup.viz.pileup(),
data: bamSource,
cssClass: 'normal',
name: 'Alignments'
},
// ...
]
});
</script>
</body>
