CTTV Target Genome Browser
Minimal genome browser built for the CTTV web application.
Installation
From Git
git clone https://github.com/CTTV/targetGenomeBrowsercd targetGenomeBrowsernpm installnpm build-browser
From npm
npm install cttv.genome
Usage
cttvGenomeBrowser
is based on tnt.genome, a library for making minimal genome browsers and displaying genome annotation. Check its documentation for more options.
Example of usage:
// Define an instance of tnt.genomevar gB = tntboard width950; // Define and instance of cttv.targetGenomeBrowservar cttvGB = ; // Start the genome browser using the tnt.genome in the given div element;
More examples available in the examples
folder
API
cttvGenomeBrowser
exposes the following methods:
show_nav
If the buttons-based navigation is included in the display. Defaults to true.
var cttvGB = ;
show_links
If the link to the Ensembl Genome browser in included in the display. Defaults to true.
var cttvGB = ;
show_snps
If the SNPs tracks are displayed. Defaults to true.
var cttvGB = ;
track
Returns a given track by name. The following names are available:
Name | Track |
---|---|
gene | The Gene / Transcript track |
common_snps | The track containing SNPs associating the gene to common diseases |
rare_snps | The track containing SNPs associating the gene to reare diseases |
var cttvGB = ;var geneTrack = cttvGB; geneTrackdisplay;
If any change is made to the track after the plug-in has been initialised (see tnt.genome and tnt.board for examples), the visualisation needs to be re-started using the start
method
start
Re-start the genome browser after making any change. For example, the following snippet change the gene to be displayed as transcripts when a gene is clicked:
; var geneTrack = gBTheme;geneTrackdisplay;
Feedback
Please, send any comments, bug reports or features request to support (AT) targetvalidation.org