Example of sequence track in TnT Genome. Zoom in to reveal the genomic sequence of the region in the board.
Last active
January 12, 2016 16:44
-
-
Save emepyc/d64cf0c6d72a5ef2b1d1 to your computer and use it in GitHub Desktop.
Sequence track
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
<!DOCTYPE html> | |
<head> | |
<link rel="stylesheet" href="http://tntvis.github.io/tnt.genome/build/tnt.genome.css" type="text/css" /> | |
<style> | |
#mydiv { | |
margin-top: 50px; | |
} | |
</style> | |
<script src="http://d3js.org/d3.v3.min.js"></script> | |
<script src="http://tntvis.github.io/tnt.genome/build/tnt.genome.min.js"></script> | |
</head> | |
<body> | |
<div id="mydiv"></div> | |
<script> | |
var genome = tnt.board.genome().species("human").gene("brca2").width(950); | |
var gene_track = tnt.board.track() | |
.height(200) | |
.color("white") | |
.display(tnt.board.track.feature.genome.gene() | |
.color("#550055") | |
) | |
.data(tnt.board.track.data.genome.gene()); | |
var sequence_track = tnt.board.track() | |
.height(30) | |
.color("white") | |
.display(tnt.board.track.feature.genome.sequence()) | |
.data(tnt.board.track.data.genome.sequence() | |
.limit(150) | |
); | |
genome | |
.zoom_in(100) | |
.add_track(sequence_track) | |
.add_track(gene_track); | |
genome(document.getElementById("mydiv")); | |
genome.start(); | |
</script> | |
</body> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment