Learn R Programming

RFLPtools (version 2.0)

RFLPplot: Function to plot RFLP data.

Description

Given RFLP data is plotted where the samples are sorted according to the corresponding dendrogram.

Usage

RFLPplot(x, nrBands, nrMissing, distfun = dist, 
         hclust.method = "complete", mar.bottom = 5, 
         cex.axis = 0.5, colBands, xlab = "", 
         ylab = "molecular weight", ylim, …)

Arguments

x

data.frame with RFLP data; see RFLPdata.

nrBands

if not missing, then only samples with the specified number of bands are considered.

nrMissing

if not missing, then it is assumed that some bands may be missing. That is, all samples with number of bands in nrBands, nrBands+1, ..., nrBands+nrMissing are considered.

distfun

function computing the distance with default dist; see dist.

hclust.method

method used for hierarchical clustering; see hclust.

mar.bottom

bottom margin of the plot; see par.

cex.axis

size of the x-axis annotation.

colBands

color for the bands. Has to be of length 1 or number of samples. If missing, "Set1" of RColorBrewer is used; see ColorBrewer.

xlab

passed to function plot.

ylab

passed to function plot.

ylim

passed to function plot. If missing an appropriate range of y-values is computed.

additional arguments passed to function plot except xlim which is defined inside of RFLPplot.

Value

invisible

Details

RFLP data is plotted. The samples are sorted according to the corresponding dendrogram which is computed via function hclust.

The option to specify nrMissing may be useful, if gel image quality is low, and the detection of bands is doubtful.

References

Flessa, F., Kehl, A., Kohl, M. Analysing diversity and community structures using PCR-RFLP: a new software application. Molecular Ecology Resources 2013 Jul; 13(4):726-33.

See Also

RFLPdata, dist

Examples

Run this code
# NOT RUN {
data(RFLPdata)
par(mfrow = c(1,2))
plot(hclust(RFLPdist(RFLPdata, nrBands = 3)), cex = 0.7)
RFLPplot(RFLPdata, nrBands = 3, mar.bottom = 6, cex.axis = 0.8)

par(mfrow = c(1,2))
plot(hclust(RFLPdist2(RFLPdata, nrBands = 9, nrMissing = 1)), cex = 0.7)
RFLPplot(RFLPdata, nrBands = 9, nrMissing = 1, mar.bottom = 6, cex.axis = 0.8)


distfun <- function(x) dist(x, method = "maximum")
par(mfrow = c(1,2))
plot(hclust(RFLPdist(RFLPdata, nrBands = 3, distfun = distfun), 
            method = "average"), cex = 0.7, cex.lab = 0.7)
RFLPplot(RFLPdata, nrBands = 3, distfun = distfun, hclust.method = "average", 
         mar.bottom = 6, cex.axis = 0.8)
# }

Run the code above in your browser using DataLab