missingPersonPlot: Missing person plot

Description Usage Arguments Details Value Examples

View source: R/missingPersonPlot.R

Description

Visualises the competing hypotheses of a family reunion case. A plot with two panels is generated. The left panel shows a pedigree in which the person of interest (POI) is identical to the missing person (MP). The right panel shows the situation where these two are unrelated. See Details for further explanations.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
missingPersonPlot(
  reference,
  missing,
  labs = labels(reference),
  marker = NULL,
  hatched = typedMembers(reference),
  MP.label = "MP",
  POI.label = "POI",
  POI.sex = getSex(reference, missing),
  POI.col = "red",
  POI.hatched = FALSE,
  POI.height = 8,
  titles = c(expression(H[1] * ": POI = MP"), expression(H[2] * ": POI unrelated")),
  width = 4,
  newdev = interactive(),
  ...
)

Arguments

reference

A pedtools::ped() object.

missing

The ID label of the missing pedigree member.

labs

A character vector with labels for the pedigree members. See pedtools::plot.ped().

marker

Optional vector of marker indices to be included in the plot.

hatched

A vector of ID labels indicating who should appear with hatched symbols in the plot. By default, all typed members.

MP.label

The label of the missing member. Default: "MP".

POI.label

The label of the person of interest. Default: "POI".

POI.sex

The sex of POI. This defaults to that of the missing person, but may be set explicitly. This is particularly useful when the missing person has unknown sex.

POI.col

The plot colour of POI. Default: red.

POI.hatched

A logical: If TRUE (default), the POI is plotted with a hatched symbol.

POI.height

A numeric controlling the vertical placement of the POI singleton (in the right panel).

titles

A character of length 2, with subtitles for the two frames.

width

A positive number controlling the width of the plot. More specifically this number is the relative width of the reference pedigree, compared to a singleton. Default: 4.

newdev

A logical: If TRUE the plot is created in a new plot window.

...

Extra parameters passed on to pedtools::plotPedList().

Details

A standard family reunification case involves the following ingredients:

After genotyping of POI, the genetic evidence is typically assessed by computing the likelihood ratio of the following hypotheses:

The goal of this function is to illustrate the above hypotheses, using labels, colours and shading to visualise the different aspects of the situation.

This function cannot handle cases with more complicated hypotheses (e.g. multiple missing persons, or where H2 specifies a different relationship). However, as it is basically a wrapper of pedtools::plotPedList(), an interested user should be able to extend the source code to such cases without too much trouble.

Value

None

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
x = nuclearPed(father = "fa", mother = "mo", children = c("b1", "b2"))

# Default plot
missingPersonPlot(x, missing = "b2")

# A bit nicer using various options
missingPersonPlot(x, missing = "b2", MP.label = "Missing", labs = NULL,
                  hatched = "b1", POI.hatched = TRUE,
                  width = 2,      # adjust internal spacing (see above)
                  dev.width = 7,  # device width (see ?plotPedList())
                  dev.height = 3, # device height (see ?plotPedList())
                  fmar = 0.02,    # adjust frame margin (see ?plotPedList())
                  cex = 1.5,      # larger symbols and label font (see ?par())
                  cex.main = 1.3  # larger frame titles (see ?par())
                  )

forrel documentation built on March 14, 2021, 1:06 a.m.