View source: R/vis_hapVisualization.R
| plotHapTable | R Documentation |
display hap result as a table-like figure
plotHapTable(hapSummary,
hapPrefix = "H",
title = "",
geneName = geneName,
INFO_tag = NULL,
tag_split = tag_split,
tag_field = tag_field,
tag_name = tag_name,
displayIndelSize = 0, angle = c(0,45,90),
replaceMultiAllele = TRUE,
ALLELE.color = "grey90")
hapSummary |
object of hapSummary class |
hapPrefix |
prefix of haplotype names. Default as "H" |
title |
the main title of the final figure |
geneName |
character, will be used for filter INFO filed of ANN |
INFO_tag |
The annotations in the INFO field are represented as tag-value pairs, where the tag and value are separated by an equal sign, ie "=", and pairs are separated by colons, ie ";". For more information please see details. |
tag_split |
usually, the value of tag-value contains one information.
However, if a tag contains more than one fields, eg "ANN", then |
tag_field |
integer, if a tag-value contains more than one fields,
user need to specified which field should be display. If |
tag_name |
tag name is displayed in Hap figure. If |
displayIndelSize |
display indels with max size of |
angle |
the angle of coordinates, should be one of 0, 45 and 90 |
replaceMultiAllele |
whether to replace MultiAllele with "T*",
default as |
ALLELE.color |
the color of ALLELE row, default as "grey90" |
In VCF files, the INFO field are represented as tag-value pairs, where the tag and value are separated by an equal sign, ie "=", and pairs are separated by colons, ie ";".
If hapSummarys were generated from sequences, INFO row is null.
If hapSummarys were generated from VCF, INFO was take from the INFO column
in the source VCF file.
Some tag-values may contains more than one value separated by
"|", eg.: "ANN" or "snpEFF" added by 'snpeff' or other software. For those
fields we need specified value of tag_field = "ANN" and tag_split = "[\|]",
it's suggest specified the value of tag_name for display in figure.
'snpeff', a toolbox for genetic variant annotation and functional effect prediction, will add annotations to INFO filed in VCF file under a tag named as "ANN". The annotations contains several fields separated by "|". eg.:
Allele
Annotation
Annotation_Impact
Gene_Name
Gene_ID
Feature_Type
Feature_ID
Transcript_BioType
Rank
HGVS.c
HGVS.p
cDNA.pos/cDNA.length ... ...
However, the INFO in hapResults may missing annotations that we need.
In this case, we can custom INFOs in hapSummarys with addINFO().
Once the needed annotations were included in hap results, we can display
them with plotHapTable() by specify the value of INFO_tag.
ggplot2 object
addINFO()
data("geneHapR_test")
plotHapTable(hapResult)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.