Skip to content

Track list and Facet Table

Colleen Reilly edited this page Apr 4, 2024 · 3 revisions

The facet table creates an ordered table under the Tracks button.

Track list

To begin, create the track list using the following example as a guide:

[
  {
    "type": "bedj",
    "file": "path/to/file.gz",
    "name": "my track"
  },
  { … another track … },
  {
    "isfacet": true,
    … a facet table, see below … 
  }
]


Facet table

A facet table can be encoded in the JSON file as an object.

  {
    "isfacet": true,
    "name": "My facet table",
    "tracks": [
      {
        "type": "bigwig",
        "assay": "WGBS",
        "sample": "Retina Wk 10",
        "file": "retina/hg19/wgbs/Methyl-FW10.bw",
        "name": "Retina Wk 10, WGBS"
      },
      {
        "type": "bigwig",
        "assay": "WGBS",
        "sample": "Retina Wk 14",
        "file": "retina/hg19/wgbs/Methyl-FW14.bw",
        "name": "Retina Wk 14, WGBS"
      },
      … more tracks 
    ]
  }

In which “assay” and “sample” attributes are required for all tracks in a table. Then, unique lists of assay and sample names from the track list are used to build a facet table accessible from the Track button. Click on a cell, sample label, or assay header to selectively show/hide tracks.


Adding a hierarchy to the facet table

Samples may be presented in a two or three level hierarchical structure, shown on the left-hand side of the facet table.

To create a two level structure, add the “level1” attribute.

{        
        "assay": "WGBS",
        "type": "bigwig",
        "name": "WGBS RB patient rep1",
        "level1": "RB",
        "sample": "patient rep1",
        "file": "retina/hg19/wgbs/Methyl-RB-D1.bw"
      },
      … more tracks 

This creates a new column on the farthest left hand side grouping samples assigned to the same value. A clickable link is also created, so all tracks in the group may be shown or hidden at once.

1

To create a two level structure, add the “level1” and “level2” attributes.

      {        
        "assay": "WGBS",
        "type": "bigwig",
        "name": "WGBS RB patient rep1",
        "level1": "RB",
        "level2": "patient",
        "sample": "patient rep1",
        "file": "retina/hg19/wgbs/Methyl-RB-D1.bw"
      },
      … more tracks 

“level1” still appears on the farthest left column and “level2” creates a new column in the middle. Both attributes create clickable links to show or hide all tracks in the specified level, at once.

2