Skip to content

bhofmei/jbplugin-nucdens

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#Nucleotide Density Plugin

This is a JBrowse plugin

Allows the user to create multi-lined heatmaps for different nucleotide contexts. User can set the color for each context, a single color for all contexts, or "random" colors will be chosen (see [below]). ##Special Thanks Special thanks to Colin Diesh who inspired components of this plugin. Particularly, the GC Content plugin (for the storage class) and Multi BigWig plugin (for multiple density tracks).

##Install

For JBrowse 1.11.6+ in the JBrowse/plugins folder, type:
git clone https://github.com/bhofmei/jbplugin-nucdens.git NucleotideDensityPlugin

or

downloaded the latest release version at releases.
Unzip the downloaded folder, place in JBrowse/plugins, and rename the folder NucleotideDensityPlugin

##Activate

Add this to jbrowse.conf under [GENERAL]:

    [plugins.NucleotideDensityPlugin]
    location = plugins/NucleotideDensityPlugin

If that doesn't work, add this to jbrowse_conf.json:

    "plugins" : {
        "NucleotideDensityPlugin" : { 
            "location" : "plugins/NucleotideDensityPlugin"
        }
    }

##Using Nucleotide Density Traacks ###Example {
"key" : "Nucleotide Density", "label" : "nuc_dens", "storeClass" : "JBrowse/Store/SeqFeature/SequenceChunks", "urlTemplate" : "seq/{refseq_dirpath}/{refseq}-", "context" : ["CG", "CHG", "CHH", "NNN"] }

Sequence contexts must be specified in an array.
Degenerate/IUPAC nucleotides are supported. Gaps are not. Nucleotides can be lowercase or uppercase.

###Color Parameters For all contexts, density is indicated by the intensity of color. Color is computed as a blend between the background color and specified color weighted by the scaled density.
Density is scaled to the track configuration min_score and max_score.

Color can be specified in four ways.

  1. Random [default]
    Equidistant colors are assigned to each context based on the number of contexts specified.
    "colors": "random"
  1. Single Color
    A single color is used for all contexts. Color can be specified as a string or hexidecimal value
    "colors" : "hotpink"
  1. Array
    Colors in the array for assigned to each context based on order. If there are more contexts than colors specified, colors are reused in order.
    "colors" : ["red", "orange", "yellow", "greenyellow"]
  1. Object
    Colors can be specified using a javascript object assigning a color to each context. If a context is not assigned a color, the cooresponding "random" color is used.
    "colors" : { "CG" : "#A36085", "CHG": "#0072B2", "CHH" : "#CF8F00", "CH" : "#88C043" }

Example for color parameters

###Addititional Parameters Additional parameters that can be specified for the track configuration.

  • "min_score" : 0 , minimum density when computing color
  • "max_score" : 1 , maximum density when computing color
  • "windowSize" : 100 , window size for sliding window when computing density
  • "windowDelta" : 10 , window step size for sliding window
  • "showLabels" : true , show context sublabels on track
  • "showScores" : true , show density value when mouse is over the track
  • "bothStrands" : false , use sequence on forward strand only or both strands to compute density
  • "style" : { "height" : 70 } , track height

##Future Plans

  • Ability to add track locally by adding option to menu bar, "File"
  • Possibly improved score view (currently works fine but is not visually appealing)