plotHapTable: plotHapTable

View source: R/vis_hapVisualization.R

plotHapTableR Documentation

plotHapTable

Description

display hap result as a table-like figure

Usage

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")

Arguments

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_split is needed. When INFO_tag was set as "ANN" or "SNPEFF", tag_split will be set as "|" by default, see details.

tag_field

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

tag name is displayed in Hap figure. If tag_name is missing, will take the value of INFO_tag.

displayIndelSize

display indels with max size of displayIndelSize, If set as 0, all indels will convert into "i*" of which "i" represents "indel".

angle

the angle of coordinates, should be one of 0, 45 and 90

replaceMultiAllele

whether to replace MultiAllele with "T*", default as TRUE.

ALLELE.color

the color of ALLELE row, default as "grey90"

Details

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.:

  1. Allele

  2. Annotation

  3. Annotation_Impact

  4. Gene_Name

  5. Gene_ID

  6. Feature_Type

  7. Feature_ID

  8. Transcript_BioType

  9. Rank

  10. HGVS.c

  11. HGVS.p

  12. 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.

Value

ggplot2 object

See Also

addINFO()

Examples

data("geneHapR_test")
plotHapTable(hapResult)

geneHapR documentation built on May 29, 2024, 11:59 a.m.