var pileup = require("pileup");

var sources = [
  {
    viz: pileup.viz.genome(),
    isReference: true,
    data: pileup.formats.twoBit({
      url: 'http://www.biodalliance.org/datasets/hg19.2bit'
    })
  },
  {
    viz: pileup.viz.variants(),
    data: pileup.formats.vcf({
      url: '/test/data/snv.chr17.vcf'
    })
  },
  {
    viz: pileup.viz.genes(),
    data: pileup.formats.bigBed({
      url: 'http://www.biodalliance.org/datasets/ensGene.bb'
    })
  },
  {
    viz: pileup.viz.pileup(),
    data: pileup.formats.bam({
      url: '/test/data/synth3.normal.17.7500000-7515000.bam',
      indexUrl: '/test/data/synth3.normal.17.7500000-7515000.bam.bai'
    }),
    cssClass: 'normal'
  }
];

var p = pileup.create(yourDiv, {
  range: {contig: 'chr17', start: 7512384, stop: 7512544},
  tracks: sources
});

@@ -191,33 +191,56 @@
 g19.2bit'%0A    %7D)
+,%0A    name: 'Reference'
 %0A
-
   %7D,%0A  %7B%0A    viz
@@ -331,32 +331,54 @@
 hr17.vcf'%0A    %7D)
+,%0A    name: 'Variants'
 %0A  %7D,%0A  %7B%0A    vi
@@ -501,16 +501,35 @@
 '%0A    %7D)
+,%0A    name: 'Genes'
 %0A  %7D,%0A  
@@ -727,24 +727,24 @@
 ai'%0A    %7D),%0A
-
     cssClass
@@ -753,16 +753,40 @@
 'normal'
+,%0A    name: 'Alignments'
 %0A  %7D%0A%5D;%0A

Set track labels in demo