karyoDiploid {ibdsim2}R Documentation

Diploid karyogram

Description

Show chromosomal segments in a diploid karyogram

Usage

karyoDiploid(
  paternal,
  maternal,
  chrom = 1:22,
  col = c(paternal = "lightblue", maternal = "orange"),
  alpha = 1,
  bgcol = "gray95",
  title = NULL
)

Arguments

paternal, maternal

data.frames (or objects coercible to data.frames) containing the segments to be shown on the paternal and maternal strands of the karyogram. The first three columns must contain chromosome (with or without "chr" prefix), start position and stop position (in Mb). Column names are ignored, as well as any further columns.

chrom

The (autosomal) chromosomes to be included in the plot, given as a subset of the integers 1, 2,..., 22.

col

A vector of two colours (in any form recognisable by R). If only one colour is given it is recycled. If the vector is named, a colour legend is included in the plot, using the names as labels.

alpha

A single numeric in ⁠[0,1]⁠ indicating colour transparency.

bgcol

The background colour of the chromosomes.

title

Plot title.

Value

The plot object is returned invisibly, so that additional ggplot layers may be added if needed.

Examples


## Not run: 
pat = data.frame(chrom = c(1,4,5,5,10,10), start = c(100,50,20,80,10,80),
                 end = c(120,100,25,100,70,120))
mat = data.frame(chrom = c(2,4,5,5,10), start = c(80,50,10,80,50),
                 end = c(120,100,35,100,120))
karyoDiploid(pat, mat)

## End(Not run)



[Package ibdsim2 version 2.0.0 Index]