plotdistmat: Plot genetic distance matrix

Description Usage Arguments Details See Also Examples

View source: R/plotdistmat.R

Description

Provides a graphical representation of the pairwise genetic distance matrix for a collection of genomes.

Usage

1
2
plotdistmat(distmat, colvec, coltext, pos = "topleft", labels = NULL, 
            numbers = TRUE, ...)

Arguments

distmat

Symmetrical pairwise distance matrix, the [i,j]th entry corresponding to the genetic distance between genomes i and j.

colvec

Vector of colors to represent increasing genetic distance.

coltext

Vector of colors for numerals representing geentic distance on plot (if numbers=TRUE).

pos

Position of the matrix in plot. Allowed values are "topleft", "topright", "bottomleft" and "bottomright".

labels

Axis labels for genomes (by default, marked 1,...,n).

numbers

Should the genetic distance be recorded in each cell?

...

Additional arguments to be passed to plot.

Details

Plots the upper (or lower) diagonal genetic distance matrix, with each entry colored according to geentic distance.

See Also

gd

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
	
data(withinhost)
Gmat <- gd(withinhost$obs.strain, withinhost$libr, withinhost$nuc, 
           withinhost$librstrains)

colvec <- rainbow(1200)[1:1000] # Color palette
coltext <- rep("black", length(colvec)) # Corresponding text colors
coltext[680:970] <- "white" # White text for darker background colours

plotdistmat(Gmat, colvec, coltext, pos="bottomleft", labels=NULL, numbers=TRUE)

seedy documentation built on May 29, 2017, 10:58 a.m.