Example of TnT Genome that shows genes and transcripts in the same track, but transcripts only for a specific gene. This is done by getting the default data retriever for the gene track (which is a promise) and set a new retriever that chains the original one with a function that retrieves all the transcripts (exons, etc) only for the specific gene (PTEN in this case).
xxxxxxxxxx
<head>
<link rel="stylesheet" href="https://tntvis.github.io/tnt.genome/build/tnt.genome.css" type="text/css" />
<style>
#mydiv {
margin-top: 50px;
}
</style>
<script src="https://d3js.org/d3.v3.min.js"></script>
<script src="https://tntvis.github.io/tnt.genome/build/tnt.genome.min.js"></script>
<script src="render.js"></script>
</head>
<body>
<div id="mydiv"></div>
<script>
render(document.getElementById("mydiv"));
</script>
</body>
Modified http://d3js.org/d3.v3.min.js to a secure url
Modified http://tntvis.github.io/tnt.genome/build/tnt.genome.min.js to a secure url
https://d3js.org/d3.v3.min.js
https://tntvis.github.io/tnt.genome/build/tnt.genome.min.js