plot.geneMat: Plot Gene Coverage of All Individuals

View source: R/plot.geneMat.R

plot.geneMatR Documentation

Plot Gene Coverage of All Individuals

Description

Plot gene coverage for each tip of a gene matrix produced by make.gene.matrix, where columns are tips and rows are genes.

Usage

plot.geneMat(x, tr = NA, genes = colnames(x)[6:(dim(x)[2])], panes = c(5, 1, 2), margins = c(0, 1, 0.5, 0), geneColors = c("red", "black"), minGenes = 10, sortByFreq = T, label.cex = 0.7, pdfTitle = format(Sys.time(), "geneMat.plot.%Y.%m.%d.%H%M.pdf"), pdfW = 10, pdfH = 10, remove.tips = TRUE, ...)

Arguments

x

The gene matrix from make.gene.matrix

tr

Optional. A phylogenetic tree which dictates tip order in the columns. The tree's topography is plotted above the plot corresponding to columns.

genes

Optional. A vector of genes to include in the plot.

panes

Optional. A vector with the heights of each portion of the plot to be passed to layout.

margins

Optional. A vector with margin dimensions for the plot. See the par argument mai.

geneColors

Optional. A vector of the colors to use to mark each gene. If less than the number of genes are provided, then colors will repeat.

minGenes

Optional. The minimum number of individuals which must have a gene sequence for that gene to be included in the plot.

sortByFreq

Optional. A boolean determining whether genes should be ordered by the number of individuals with data for that gene, from most to least.

label.cex

Optional. The cex value for row and column labels.

pdfTitle

Optional. The name of the pdf file to be exported.

pdfW

Optional. The width of the pdf file in inches.

pdfH

Optional. The height of the pdf file in inches.

remove.tips

Optional. A boolean determining whether or not tip labels should be plotted.

...

Other arguments to be passed to the points function.

Details

The default for genes is all columns in the gene matrix excluding the first five, which contain summary statistics. The default for panes is 5,1,2, and for margins it is 0,1,0.5,0. The default for geneColors is red and black. The default for minGenes is 10, for sortByFreq it is TRUE, and for label.cex it is 0.7. The default pdf file name is geneMat.plot plus the date and time, delimited by periods. The default for PDF width and height are both 10. Tip labels are removed from the plot by default.

Value

tree

The tree plotted above tips. If none, this value is NA.

geneSums

A plot of the number of individuals possessing data for each gene.

ngenes

A plot of the number of genes per individual.

Author(s)

Andrew Hipp and Kasey Pham

See Also

make.gene.matrix, layout, par


andrew-hipp/morton documentation built on April 7, 2024, 12:15 p.m.