Example of TnT Genome showing transcript information.
Last active
January 12, 2016 16:46
-
-
Save emepyc/695c447c5298386dea6f to your computer and use it in GitHub Desktop.
Transcripts
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 transcript_track = tnt.board.track() | |
.height(200) | |
.color("#EEEFFF") | |
.display(tnt.board.track.feature.genome.transcript() | |
.color (function (t) { | |
if (t.isGene) { | |
return "#005588"; | |
} | |
return "red"; | |
}) | |
.on("click", function (d) { | |
console.log(d); | |
}) | |
) | |
.data(tnt.board.track.data.genome.transcript()); | |
var genome = tnt.board.genome().species("human").gene("PTEN").width(950); | |
genome(document.getElementById("mydiv")); | |
genome | |
.zoom_in(100) | |
.add_track(transcript_track); | |
genome.start(); | |
</script> | |
</body> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment