plotIBDsegments: XIBD Plot IBD Segments

Description Usage Arguments Examples

Description

Plot IBD segments for pairs across the genome. Annotation genes can be added to the plot and specific genes on interest can be highlighted.

Usage

1
2
3
4
plotIBDsegments(ibd.segments, ped.genotypes, interval = NULL,
  annotation.genes = NULL, highlight.genes = NULL, segment.height = 0.5,
  number.per.page = NULL, add.fid.name = TRUE, add.iid.name = TRUE,
  add.rug = FALSE, plot.title = NULL, add.legend = TRUE)

Arguments

ibd.segments

a named list containing the ibd_segments inferred from pairs of samples. See value description in getIBDsegments for more details.

ped.genotypes

a named list containing pedigree, genotypes and model. See Value description in getGenotypes for more details. The family IDs and individual IDs in pedigree must match the family IDs and individual IDs in the header of genotypes.

interval

a vector of length 3 containing a chromosome, a start position (bp) and an end position (bp) of an interval to plot. The default is interval=NULL which will plot the IBD segments over all chromosomes in ped.genotypes.

annotation.genes

a data frame with at least 5 columns of information:

  1. Chromosome (type numeric or integer)

  2. Gene name (type character)

  3. Start location of the gene in base-pairs (type numeric or integer)

  4. End location of the gene in base-pairs (type numeric or integer)

  5. Gene strand (+ or -)

annotation.genes should contain the following headers chr, name, start, end and strand. This data frame does not have to be in a specific order, however it must contain all of the above information with respective labels.

highlight.genes

a data frame with at least 4 columns of information:

  1. Chromosome (type numeric or integer)

  2. Gene name (type character)

  3. Start location of the gene in base-pairs (type numeric or integer)

  4. End location of the gene in base-pairs (type numeric or integer)

highlight.genes should contain the following headers chr, name, start and end. This data frame does not have to be in a specific order, however it must contain all of the above information with respective labels.

segment.height

the height of IBD segment blocks, such that 0 < segment.height <= 1. The default is segment.height=0.5.

number.per.page

the maximum number of IBD pairs to plot in a single praphics window. The default is number.per.page=NULL which will plot all IBD pairs in a single window. This may not be ideal when there are many IBD pairs. If number.per.page is set, it is recommended to plot the output to a file as opposed to the R console.

add.fid.name

a logical value indicating if family IDs should be included in the y-axis labels. The default is add.fid.name=TRUE.

add.iid.name

a logical value indicating if individual IDs should be included in the y-axis labels. The default is add.iid.name=TRUE.

add.rug

a logical value indicating whether SNP positions should be added to the plot. The default is add.rug=TRUE.

plot.title

a character string of a title to be added to the plot. The default is plot.title=NULL which does not add a title to the plot.

add.legend

a logical value indicating whether the IBD status legend should be plotted. The default is add.legend=TRUE.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
# plot IBD segments
plotIBDsegments(ibd.segments = example_ibd,
                ped.genotypes = example_genotypes,
                interval = NULL,
                annotation.genes = NULL,
                highlight.genes = NULL,
                segment.height = 0.5,
                number.per.page = NULL,
                add.fid.name = FALSE,
                add.iid.name = TRUE,
                add.rug = TRUE,
                plot.title = "Inferred IBD Segments",
                add.legend = TRUE)

bahlolab/XIBD documentation built on May 11, 2019, 5:24 p.m.