graphical_genotype: Graphical genotype plotter

graphical_genotypeR Documentation

Graphical genotype plotter

Description

Given an IBD matrix or a list of matrices, a graphical genotype plot is returned. Graphical genotypes allow to assess which homologue an individual has obtained, they highlight putative errors and show non-informative genotypes.

Usage

graphical_genotype(
  IBD,
  only_informative = F,
  cex.axis = 0.8,
  main = NULL,
  non_inf = c(0.3, 0.7),
  ...
)

## S3 method for class 'matrix'
graphical_genotype(
  IBD,
  only_informative = F,
  cex.axis = 0.8,
  main = NULL,
  non_inf = c(0.3, 0.7),
  ...
)

## S3 method for class 'list'
graphical_genotype(
  IBD,
  only_informative = F,
  cex.axis = 0.8,
  main = NULL,
  non_inf = c(0.3, 0.7),
  ...
)

Arguments

IBD

IBD matrix or list of IBD matrices. If IBD is a list, the names are used as subplot titles.

only_informative

logical, should only informative markers be plotted? False by default.

cex.axis

size of the bottom labels.

main

title to display in the plot.

non_inf

numeric, lower and upper probability boundaries to consider an IBD probability non-informative (if they fall within the threshold they will be ignored during prediction). Defaults to 0.3 - 0.7. Symmetrical boundaries are recommended but not necessary.

...

Additional parameters to be passed to 'plot'. For instance 'cex.axis' or 'main'.

Value

A plot containing graphical representations of IBD. Dark is a probability close to 1 and light is a probability close to 0.

Methods (by class)

  • matrix: function for a single matrix.

  • list: function for a list of matrices.

Examples

data("smooth_descent")
IBD <- sdescent$predIBD

#One single homologue
graphical_genotype(IBD[[1]], only_informative = TRUE)
#Or all homologues
graphical_genotype(IBD, only_informative = TRUE)

Alethere/SmoothDescent documentation built on Oct. 21, 2023, 7:11 a.m.