plotIBDproportions: XIBD Locus Proportion Plot

Description Usage Arguments Examples

Description

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

Usage

1
2
3
plotIBDproportions(locus.proportions, interval = NULL,
  annotation.genes = NULL, highlight.genes = NULL, add.rug = TRUE,
  plot.title = NULL)

Arguments

locus.proportions

a data frame containing the proportion of pairs IBD at each SNP. See value description in getLocusProportion for more details.

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 proportions over all chromosomes in locus.proportions.

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.

add.rug

Logical. Whether to include SNP positions as a rug in the figure. The default is add.rug=FALSE

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.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
# generate a binary IBD matrix
my_locus_matrix <- getLocusMatrix(ped.genotypes = example_genotypes,
                                  ibd.segments = example_ibd)

# calculate the proportion of pairs IBD at each SNP
my_locus_prop <- getLocusProportion(ped.genotypes = example_genotypes,
                                    locus.matrix = my_locus_matrix,
                                    groups = NULL)

# plot the proportion of pairs IBD
plotIBDproportions(locus.proportions = my_locus_prop,
                   interval = NULL,
                   annotation.genes = NULL,
                   highlight.genes = NULL,
                   add.rug = TRUE,
                   plot.title = NULL)

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