Sequence Viewer 3.48.0

Help page

Embedding the NCBI Sequence View in Web Content


The NCBI Graphical Sequence Viewer (SV) is a general purpose tool for viewing biological sequence data. The Sequence Viewer has a very rich set of options and can display virtually any sequence. It can be embedded in a wide variety of web pages serving many different needs. This page has examples showing best practice for embedding Sequence Viewer with several different sets of options.

The API Reference should be consulted for the full suite of options and parameters. Additional documentation can be found here:

Questions should be addressed to: sviewer-service AT

For users that want to embed the sequence viewer on their page, please pay attention to the cross-domain scripting section of the API Reference. Sequence Viewer makes use of AJAX and the EXTjs library and is tied to the infrastructure at NCBI; if you fail to adjust for cross-domain scripting, your embedding will not work.

List of separate pages with embedding examples

1. Remote BAM files visualization
2. BAM file display with haplotype grouping
3. Marker demo
4. HGVS and SNP Search demo
5. Graph Overlay demo
6. Sequence Viewer event listening demo
7. Tree Viewer embeds Sequence Viewer
8. BigBED and BigWIG files visualization
9. VCFtabix and plain VCF files visualization

View of single sequence with full and minimal frame decoration

These examples demonstrate a way of loading and switching Sequence Viewer instances dynamicaly.

View of single sequence with initial tracks configuration and with external file upload

View in slim mode (tracks w/o title bars)

Iframed Sequence View

Example below illustrates iframe embedding. In this case, the Sequence Viewer instance is put into an iframe to avoid possible CSS and JavaScript interference with the main page. Sequence Viewer implements automatic iframe resizing to maintain vertical size budget and avoid unnecessary vertical scrolling. All user actions (zoom in and out, track reconfigurations, etc.) should automatically recalculate vertical size.