hans-vg / jbplugin-varianteffect

A JBrowse plugin to display the Variant Effect information in the "ANN" field of a VCF file
MIT License
6 stars 4 forks source link

Variant Effect Plugin

Parses the ANN field from a VCF file that has been ran through Ensembl's VEP tool or another tool SNPEff. This plugin will format the ANN field to a human readable field in the Primary Data popup info window and will color code Variants based on mutation type.

Install

For JBrowse 1.11.6+ in the JBrowse/plugins folder, type:
git clone https://github.com/hans-vg/jbplugin-varianteffect.git VariantEffectPlugin

Activate

Add this to jbrowse.conf under [GENERAL]:

[ plugins.VariantEffectPlugin ]
location = plugins/VariantEffectPlugin

Then, in your track configuration, use the following example block:

[ tracks.MyTrack ]
storeClass     = JBrowse/Store/SeqFeature/VCFTabix
type = VariantEffectPlugin/View/Track/CanvasEffectVariants
urlTemplate    = vcf_files/mysample.vcf.gz
csiUrlTemplate = vcf_files/mysample.vcf.gz.csi
maxHeight = 1000
unsafePopup = True
category = Varietal SNPs 
key  = MyTrackName
metadata.Description = 1000 Wheat Exomes - SNPeff
metadata.SNP-Colors = <span style='background-color:red'>&nbsp;</span> <span style='color:red'>(Red)</span> - SNPs with truncations<br><span style='background-color:purple'>&nbsp;</span> <span style='color:purple'>(Violet)</span> - amino acid changes<br><span style='background-color:green'>&nbsp;</span> <span style='color:green'>(Green)</span> - silent mutations<br><span style='background-color:blue'>&nbsp;</span> <span style='color:blue'>(Blue)</span> - outside gene regions

Note use of CSI index, instead of TBI for larger genomes. Generated by tabix --csi option.

Usage

demo window
demo zoomedout
demo color

Each variant in the loaded VCF file that has the 'ANN' field in the last column will be parsed to display the Variant Effect information in human-readable format in the Info Window box when a variant is clicked in the Browser view. It also changes the default coloring of the Zoomed Out view to be color coded, as well as when you zoom in.