d33f10692e329f5f6a10508ed1c4d1123bf7a0e0 lrnassar Mon Mar 16 10:54:29 2026 -0700 Tweaking the sentence based on feedback from Jonathan, refs #36176 diff --git src/hg/htdocs/goldenPath/help/heatmap.html src/hg/htdocs/goldenPath/help/heatmap.html index 6055428036e..8abbd1746f2 100755 --- src/hg/htdocs/goldenPath/help/heatmap.html +++ src/hg/htdocs/goldenPath/help/heatmap.html @@ -102,37 +102,35 @@ The basic BED fields:
It is difficult to manage sizeable heatmap examples without resorting to scripting and automation. Small examples are the easiest ones to experiment with. For the sake of this example, imagine that we already have a list of two transcripts, T1 and T2, that we want to make heatmaps for. T1 and T2 themselves are described in a BED file like so:

 #chrom  chromStart  chromEnd  name  score  strand  thickStart  thickEnd  reserved  blockCount  blockSizes   chromStarts
 chr1    1000        2000      T1    1000   +       1000        2000      0         2           200,200,     0,800
 chr1    1200        2400      T2    1000   -       1200        2400      0         3           500,800,300  0,600,900
 

Separately, we have a list of four heatmap boxes that we want to draw for each of these transcripts. For T1, the heatmap boxes cover bases 100-200 of the transcript (1100-1200 in the genome) and 700-800 (1700-1800 in the genome), each with two boxes labeled Case 1 and Case 2. For T2, the labels are the same but the bases covered are 200-300 and 900-1000.

-

Before we can fill in the heatmap-specific extra fields, we need to finalize the block -structure of each item, since the number of blocks determines the number of columns in the -heatmap (and therefore the number of entries in _scoreArray and -_labelArray). Creating heatmaps for -the transcripts means changing the exon structure of each one - instead of -representing exon boundaries, those fields will be used to describe the regions -where we want to draw the heatmap boxes. We'll also need to add extra fields +

Creating heatmaps for the transcripts means changing the exon structure of each one - +instead of representing exon boundaries, those fields will be used to describe the regions +where we want to draw the heatmap boxes. The number of blocks determines the number of columns +in the heatmap (and therefore the number of entries in _scoreArray and +_labelArray). We'll also need to add extra fields with the remainder of the heatmap data, but let's start with the exons. We immediately have a problem - in a BED file, the exons are expected to span the length of the item. If our first line is intended to show a transcript on chr1 from base 1000 to 2000, then the first exon needs to start at 1000 and the last exon needs to end at 2000, even though we don't have heatmap data for those "exons". There are two ways to get around this.

Option 1 is to simply reduce the size of each transcript to match the extent of where we want to draw the heatmap. For that first line, if we only have heatmap data for bases 100-200 and 700-800 in the transcript (bases 1100-1200 and 1700-1800 in the genome), then those are the new bounds for our transcript (note that this means changing chromStart/End, thickStart/End, and the relative chromStarts values for the exons):

 #chrom  chromStart  chromEnd  name  score  strand  thickStart  thickEnd  reserved  blockCount  blockSizes  chromStarts
 chr1    1100        1800      T1    1000   +       1100        1800      0         2           100,100     0,600
 chr1    1400        2200      T2    1000   -       1400        2200      0         2           100,100     0,700