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")
ggplot2 object
object of hapSummary class
prefix of haplotype names. Default as "H"
the main title of the final figure
character, will be used for filter INFO filed of ANN
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.
usually, the value of tag-value contains one information.
However, if a tag contains more than one fields, eg "ANN", then tag_split
is
needed. When INFO_tag
was set as "ANN" or "SNPEFF", tag_split
will be set
as "|" by default, see details.
integer, if a tag-value contains more than one fields,
user need to specified which field should be display. If tag_field
set as
0, the whole contents will be displayed. Default as 0.
tag name is displayed in Hap figure. If tag_name
is
missing, will take the value of INFO_tag
.
display indels with max size of displayIndelSize
,
If set as 0, all indels will convert into "i*" of which "i" represents "indel".
the angle of coordinates, should be one of 0, 45 and 90
whether to replace MultiAllele with "T*",
default as TRUE
.
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
.
addINFO()
data("geneHapR_test")
plotHapTable(hapResult)
Run the code above in your browser using DataLab