This example illustrates use of the igv.js API to dynamically add tracks from a dropdown menu. Selecting 'GBM Copy # (TCGA Broad GDAC)' in the menu above results in the following call.

                browser.loadTrack({
                    url: 'https://s3.amazonaws.com/igv.org.demo/GBM-TP.seg.gz',
                    name: 'GBM Copy # (TCGA Broad GDAC)'})
                

See the developer documentation for more details.