elsiklab / multibigwig

A JBrowse plugin for plotting multiple bigwig subtracks
12 stars 2 forks source link

multibigwig

A JBrowse plugin for plotting multiple bigwig files on a single track. Includes a storeclass that accepts multiple bigwig URLs and a custom tracktype for rendering the subtracks.

Figure with MultiDensity and MultiXYPlot with different group colorings

Example configs

Example for trackList.json (MultiDensity as example)

  {
     "storeClass" : "MultiBigWig/Store/SeqFeature/MultiBigWig",
     "urlTemplates" : [
        {"url":"bw/C0535ACXX_LJA288_0.bw","name":"C0535ACXX_LJA288_0", "color": "red"},
        {"url":"bw/C0535ACXX_LJA38_0.bw","name":"C0535ACXX_LJA38_0", "color": "red"},
        {"url":"bw/C0535ACXX_LJA96_0.bw","name":"C0535ACXX_LJA96_0", "color": "red"},
        {"url":"bw/D09A8ACXX_LJA201_0.bw","name":"D09A8ACXX_LJA201_0", "color": "green"},
        {"url":"bw/D09A8ACXX_LJA232a_0.bw","name":"D09A8ACXX_LJA232a_0", "color": "green"},
        {"url":"bw/D09A8ACXX_LJA233_0.bw","name":"D09A8ACXX_LJA233_0", "color": "green"},
        {"url":"bw/D09A8ACXX_LJA234b_0.bw","name":"D09A8ACXX_LJA234b_0", "color": "green"},
        {"url":"bw/D09A8ACXX_LJA236_0.bw","name":"D09A8ACXX_LJA236_0", "color": "green"},
        {"url":"bw/D09A8ACXX_LJA237_0.bw","name":"D09A8ACXX_LJA237_0", "color": "green"},
        {"url":"bw/D09A8ACXX_LJA240_0.bw","name":"D09A8ACXX_LJA240_0", "color": "green"},
        {"url":"bw/D09A8ACXX_LJA241_0.bw","name":"D09A8ACXX_LJA241_0", "color": "green"}
     ],
     "showTooltips": true,
     "label" : "Multibigwig",
     "type" : "MultiBigWig/View/Track/MultiWiggle/MultiDensity"
  }

Example for tracks.conf (MultiXYPlot as example)

[tracks.multibigwigxy]
key=RNA-seq BigWig XY
type=MultiBigWig/View/Track/MultiWiggle/MultiXYPlot
style.height=100
storeClass=MultiBigWig/Store/SeqFeature/MultiBigWig
max_score=400
autoscale=global
urlTemplates+=json:{"url":"bw/C0535ACXX_LJA276_0.bw", "name": "C0535ACXX_LJA276_0.bw", "color": "#235"}
urlTemplates+=json:{"url":"bw/C0535ACXX_LJA288_0.bw", "name": "C0535ACXX_LJA288_0.bw", "color": "#a54"}
urlTemplates+=json:{"url":"bw/C0535ACXX_LJA38_0.bw", "name": "C0535ACXX_LJA38_0.bw", "color": "#ae2"}
urlTemplates+=json:{"url":"bw/C0535ACXX_LJA96_0.bw", "name": "C0535ACXX_LJA96_0.bw", "color": "#339"}
urlTemplates+=json:{"url":"bw/D09A8ACXX_LJA201_0.bw", "name": "D09A8ACXX_LJA201_0.bw", "color": "#156"}
urlTemplates+=json:{"url":"bw/D09A8ACXX_LJA235_0.bw", "name": "D09A8ACXX_LJA235_0.bw", "color": "#918"}

Simple config using just array of filenames available since version 0.10 of this plugin

[tracks.multibigwigxy]
key=RNA-seq BigWig XY
type=MultiBigWig/View/Track/MultiWiggle/MultiXYPlot
storeClass=MultiBigWig/Store/SeqFeature/MultiBigWig
randomizeColors=true
colorizeAbout=true
urlTemplates+=bw/C0535ACXX_LJA276_0.bw
urlTemplates+=bw/C0535ACXX_LJA288_0.bw
urlTemplates+=bw/C0535ACXX_LJA38_0.bw
urlTemplates+=bw/C0535ACXX_LJA96_0.bw
urlTemplates+=bw/D09A8ACXX_LJA201_0.bw
urlTemplates+=bw/D09A8ACXX_LJA235_0.bw

Same thing in trackList.json

  {
     "storeClass" : "MultiBigWig/Store/SeqFeature/MultiBigWig",
     "urlTemplates" : [
        "bw/C0535ACXX_LJA288_0.bw",
        "bw/C0535ACXX_LJA38_0.bw",
        "bw/C0535ACXX_LJA96_0.bw",
        "bw/D09A8ACXX_LJA201_0.bw",
        "bw/D09A8ACXX_LJA232a_0.bw",
        "bw/D09A8ACXX_LJA233_0.bw",
        "bw/D09A8ACXX_LJA234b_0.bw",
        "bw/D09A8ACXX_LJA236_0.bw",
        "bw/D09A8ACXX_LJA237_0.bw",
        "bw/D09A8ACXX_LJA240_0.bw",
        "bw/D09A8ACXX_LJA241_0.bw"
     ],
     "showTooltips": true,
     "label" : "Multibigwig",
     "type" : "MultiBigWig/View/Track/MultiWiggle/MultiDensity"
  }

Options

Main configuration

Example

"urlTemplates": [
    { "name": "sample1", "description": "liver", "color": "red", "nonCont": true, "url": "sample1.bw" }
]

The configuration can also specify a storeClass if something other than BigWig is used

urlTemplates+=json:{"storeClass": "JBrowse/Store/SeqFeature/BedGraphTabix", "url":"volvox_microarray.bg.gz", "name": "volvox_positive", "color": "#235"}
urlTemplates+=json:{"storeClass": "JBrowse/Store/SeqFeature/BedGraphTabix", "url":"volvox_microarray_negative.bg.gz", "name": "volvox_negative", "color": "#a54", "lineWith": 3}

Note BedGraph is still unimplemented on JBrowse master but will be soon

Attributes inherited from Wiggle tracks

MultiDensity specific options

Other options

Filled histograms

If you specify both nonCont: true and fill: true then you can get overlaid bargraphs, which if using an alpha color, can show multiple at a time better

Install

Please see http://gmod.org/wiki/JBrowse_FAQ#How_do_I_install_a_plugin for more information about installing plugins

Still in beta! Feel free to provide feedback