plot_logfoldchange: Plot densities of expression differences, possibly normalized

Description Usage Arguments Value Examples

View source: R/brownian_motion_package.r

Description

This function plots the densities of log fold change in each species relative to a single species. Expression differences may be normalized, to assess the fit of the phylogentic model

Usage

1
2
3
plot_logfoldchange(dat, groups, group_name = "", normalize = rep(1,
  nrow(dat)), remove.row = 1, color = 1:nrow(dat), main = group_name,
  names.arg = rownames(dat)[-remove.row], plot.legend = T, lwd = 1)

Arguments

dat

a matrix of comparative data, in which rows correspond to species and columns correspond to traits

groups

a list of gene groups, in the same format as the output of read.groups

group_name

the name of the gene group for which to plot density. Leave as default to use all genes

normalize

a vector of normalizations, corresponding to the order of speices in dat

remove.row

a species of the data matrix to remove. Use this option to ensure that the normalizing species is not plotted

color

a vector of colors in which to plot densities

main

the title of the plot. Default is group name.

names.arg

the name to assign to each density. Default is species name.

plot.legend

a logical indicating whether to plot a legend

lwd

the line width for each density

Value

Nothing

Examples

1
2
3
4
5
6
data(yeast)
sqrt.dist = compute.sqrt.dist(yeast.tree)
par(mfrow=c(1,2))
test_group = "GO:0007346|regulation of mitotic cell cycle"
plot_logfoldchange(yeast.homozygote,GO.groups,test_group)
plot_logfoldchange(yeast.homozygote,GO.groups,test_group,normalize=sqrt.dist)

PIGShift documentation built on May 2, 2019, 9:02 a.m.