plotHaplotype: Graphical output of an inferred haplotype

View source: R/graphic_functions.R

plotHaplotypeR Documentation

Graphical output of an inferred haplotype

Description

The plotHaplotype functions visualizes an inferred haplotype.

Usage

plotHaplotype(
  hap_table,
  html_output = FALSE,
  genes_order = NULL,
  text_size = 14,
  removeIGH = TRUE,
  plotYaxis = TRUE,
  chain = c("IGH", "IGK", "IGL", "TRB"),
  dir
)

Arguments

hap_table

haplotype summary table. See details.

html_output

if TRUE, a html5 interactive graph is outputed. Default is FALSE.

genes_order

A vector of the genes by the desired order. Default is by GENE.loc

text_size

the size of graph labels. Default is 14 (pts).

removeIGH

if TRUE, 'IGH'\'IGK'\'IGL'\'TRB' prefix is removed from gene names.

plotYaxis

if TRUE, Y axis labels (gene names) are plotted on the middle and right plots. Default is TRUE.

chain

the Ig/TR chain: IGH,IGK,IGL,TRB. Default is IGH.

dir

The output folder for saving the haplotype map for multiple individuals.

Details

A data.frame in a haplotype format created by createFullHaplotype function.

Value

A haplotype map visualization. If more than one subject is visualized, a pdf is created. If html_output is TRUE, a folder named html_output is created with individual graphs.

Examples


# Selecting a single individual from the haplotype samples data
haplo_db = samplesHaplotype[samplesHaplotype$subject=='I5', ]

# plot haplotype
plotHaplotype(haplo_db)


rabhit documentation built on Feb. 16, 2023, 9:25 p.m.