visualisePairing: Visualise pairing of parental homologues

Description Usage Arguments Value Examples

View source: R/polyqtlR_functions.R

Description

Function to visualise the pairing of parental homologues across the population using graph, with nodes to denote parental homologues and edges to denote deviations from expected proportions under a polysomic model of inheritance

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
visualisePairing(
  meiosis_report.ls,
  pos.col = "red",
  neg.col = "blue",
  parent,
  max.lwd = 20,
  datawidemax,
  add.label = TRUE,
  return.data = FALSE,
  ...
)

Arguments

meiosis_report.ls

List output of function meiosis_report

pos.col

Colour corresponding to excess of pairing associations predicted (positive deviations), by default red

neg.col

Colour corresponding to lack of pairing associations predicted (negative deviations), by default blue

parent

The parent, either "P1" (mother) or "P2 (father)

max.lwd

Maximum line width, by default 20

datawidemax

This argument is currently a work-around to allow multiple plots to have the same scale (line thicknesses consistent). No default is provided. To estimate this value, simply set argument return.data = TRUE, and record the maximum absolute value over columns 'count', which are the deviations from random expectations. This should be done over multiple function calls if e.g. comparing both P1 and P2 values. When a global maximum (absolute) deviation is known, re-run the function with this value for datawidemax. The line width specified by max.lwd will then be used for this, and all other line widths re-scaled accordingly.

add.label

Should a label be applied, giving the maximum deviation in the plot? By default TRUE

return.data

Should plot data be returned? By default FALSE

...

Optional arguments passed to plot.igraph

Value

If return.data = TRUE, the values for pairwise deviations from the expected numbers are returned, useful for determining the value datawidemax to provide consistent scaling across multiple plots

Examples

1
2
3
4
data("mr.ls")
visualisePairing(meiosis_report.ls = mr.ls,
                 parent = "P1",
                 datawidemax = 3)

polyqtlR documentation built on Feb. 2, 2022, 5:09 p.m.