plotMutations: Plots the QTL effect coefficients of a population.

Description Usage Arguments Value Examples

View source: R/in_silico_population.R

Description

Plots the QTL effect coefficients for all the genes of a in silico system of the in silico individuals.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
plotMutations(
  insilicopopulation,
  insilicosystem,
  scaleLims = NULL,
  qtlEffectCoeffs = insilicopopulation$indargs$qtlnames,
  inds = names(insilicopopulation$individualsList),
  alleles = insilicosystem$sysargs$gcnList,
  genes = 1:length(insilicopopulation$GenesVariants),
  nGenesPerRow = 10,
  ...
)

Arguments

insilicopopulation

The in silico population to be simulated (see createInSilicoPopulation).

insilicosystem

The in silico system (object of class insilicosystem, see createInSilicoSystem).

scaleLims

A vector of length 2 giving the lower and upper limits of the continuous scale (of the QTL effect coefficient values) to be plotted. QTL effect coefficients with values outside these limits are plotted as NA (gray). If NULL (default), the limits are automatically set to the min and max values in the dataset.

qtlEffectCoeffs

A character vector of QTL effect coefficient names to plot. By default, all QTL effect coefficients are represented.

inds

A character vector giving the names of the individuals to plot. By default, all individuals in the population are represented.

alleles

A character vector giving the names of the alleles to plot. By default, all the alleles are represented.

genes

A character or numeric vector of gene IDs to plot. By default, all the genes in the system are represented.

nGenesPerRow

Integer. Number of genes to plot per row.

...

Any additional parameter to be passed to theme for the plot.

Value

A plot representing the value (colour) of each QTL effect coefficient (x-axis) of each allele (y-axis) of the different individuals (rows) for each gene (column) in the system. For noncoding genes, some QTL effect coefficients are not relevant (the ones related to protein or translation) and are represented in gray as NA.

Examples

1
2
3
4
5
6
mysystem = createInSilicoSystem(G = 10, ploidy = 2)
mypop = createInSilicoPopulation(10, mysystem)
plotMutations(mypop, mysystem)
## Only plot the 1st allele of each genes for the genes 1 to 5 and the individuals 1 to 3
plotMutations(mypop, mysystem, alleles = c("GCN1"), genes = 1:5,
 inds = c("Ind1", "Ind2", "Ind3"))

sismonr documentation built on Feb. 11, 2020, 9:07 a.m.