Learn R Programming

RFLPtools (version 2.0)

RFLPrefplot: Function for a visual comparison of RFLP samples with reference samples.

Description

Given RFLP samples are plotted together with reference samples and sorted by their distance to the reference sample.

Usage

RFLPrefplot(x, ref, distfun = dist, nrBands, mar.bottom = 5, 
            cex.main = 1.2, cex.axis = 0.5, devNew = FALSE, 
            colBands, xlab = "", ylab = "molecular weight", 
            ylim, ...)

Arguments

x

data.frame with RFLP data; e.g. RFLPdata.

ref

data.frame with RFLP reference data; e.g. RFLPref.

distfun

function computing the distance with default dist; see dist.

nrBands

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

mar.bottom

bottom margin of the plot; see par.

cex.main

size of the plot title.

cex.axis

size of the x-axis annotation.

devNew

logical. Open new graphics device for each plot.

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

Given RFLP samples are plotted together with reference samples and sorted by their distance to the reference sample.

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

RFLPplot

Examples

Run this code
# NOT RUN {
data(RFLPdata)
data(RFLPref)
dev.new(width = 12)
RFLPrefplot(RFLPdata, RFLPref, nrBands = 4, cex.axis = 0.5)

dev.new()
RFLPrefplot(RFLPdata, RFLPref, nrBands = 6, cex.axis = 0.8)
RFLPrefplot(RFLPdata, RFLPref, nrBands = 9, cex.axis = 0.8)

RFLPrefplot(RFLPdata, RFLPref[RFLPref$Sample == "Ni_29_A3",], nrBands = 4, cex.axis = 0.7)

Dir <- system.file("extdata", package = "RFLPtools") # input directory 
filename <- file.path(Dir, "AZ091016_report.txt")
RFLP1 <- read.rflp(file = filename)
RFLP2 <- RFLPqc(RFLP1)

dev.new(width = 12)
RFLPrefplot(RFLP1, RFLPref, nrBands = 4, cex.axis = 0.8)

dev.new()
RFLPrefplot(RFLP1, RFLPref, nrBands = 5, cex.axis = 0.8)
# }

Run the code above in your browser using DataLab