RFLPqc: Quality control for RFLP data

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/RFLPqc.R

Description

Function to perform quality control for RFLP data based on a comparison between the total length of the digested PCR amplification product and the sum of the fragment lengths. If the sum is smaller or larger than the PCR amplification product (within a certain range to define), the samples can be excluded from further analyses. This function is helpful for data sets containig faint or uncertain bands. It is necessary to include the total length of the PCR amplification product for each sample as largest fragment in the data set, see RFLPdata.

Usage

1
RFLPqc(x, rm.band1 = TRUE, QC.lo = 0.8, QC.up = 1.07, QC.rm = FALSE)

Arguments

x

data.frame with RFLP data.

rm.band1

logical: remove first band.

QC.lo

numeric: a real number in (0,1).

QC.up

numeric: a real number larger than 1.

QC.rm

logical: remove samples with unsufficient quality.

Details

In case the first band corresponds to the total length of the fragment one can perform a quality control comparing the length of the first band with the sum of the lengths of the remaining bands for each sample. If the sum is smaller than QC.lo times the length of the first band or larger than QC.up times the length of the first band, respectively, a text message is printed.

If rm.band1 = TRUE band 1 of all samples is removed and the remaining band numbers are reduced by 1.

If QC.rm = TRUE samples of insufficient quality are entirely removed from the given data and the resulting data.frame is returned.

Value

A data.frame with variables

Sample

character: sample identifier.

Band

integer: band number.

MW

integer: molecular weight.

Gel

character: gel identifier.

Author(s)

Fabienne Flessa Fabienne.Flessa@uni-bayreuth.de,
Alexandra Kehl Alexandra.Kehl@uni-tuebingen.de,
Matthias Kohl Matthias.Kohl@stamats.de

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, RFLPdist

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
Dir <- system.file("extdata", package = "RFLPtools") # input directory 
filename <- file.path(Dir, "AZ091016_report.txt")
RFLP1 <- read.rflp(file = filename)
str(RFLP1)

RFLP2 <- RFLPqc(RFLP1, rm.band1 = FALSE) # identical to RFLP1
identical(RFLP1, RFLP2)

RFLP3 <- RFLPqc(RFLP1)
str(RFLP3)

RFLP4 <- RFLPqc(RFLP1, rm.band1 = TRUE, QC.rm = TRUE)
str(RFLP4)

Example output

Loading required package: RColorBrewer
'data.frame':	73 obs. of  4 variables:
 $ Sample: chr  "AZ38_B1" "AZ38_B1" "AZ38_B1" "AZ38_C1" ...
 $ Band  : int  1 2 3 1 2 3 1 2 3 1 ...
 $ MW    : int  767 443 257 763 439 254 760 459 238 750 ...
 $ Gel   : chr  "091016A" "091016A" "091016A" "091016A" ...
Sum of bands of sample AZ38_B2 out of range (227.97%)!
Sum of bands of sample AZ38_C2 out of range (69.47%)!
[1] TRUE
Sum of bands of sample AZ38_B2 out of range (227.97%)!
Sum of bands of sample AZ38_C2 out of range (69.47%)!
'data.frame':	51 obs. of  4 variables:
 $ Sample: chr  "AZ38_B1" "AZ38_B1" "AZ38_C1" "AZ38_C1" ...
 $ Band  : num  1 2 1 2 1 2 1 2 3 4 ...
 $ MW    : int  443 257 439 254 459 238 212 186 144 97 ...
 $ Gel   : chr  "091016A" "091016A" "091016A" "091016A" ...
Sum of bands of sample AZ38_B2 out of range (227.97%)!
Sum of bands of sample AZ38_C2 out of range (69.47%)!
'data.frame':	43 obs. of  4 variables:
 $ Sample: chr  "AZ38_B1" "AZ38_B1" "AZ38_C1" "AZ38_C1" ...
 $ Band  : num  1 2 1 2 1 2 1 2 3 4 ...
 $ MW    : int  443 257 439 254 459 238 212 186 144 97 ...
 $ Gel   : chr  "091016A" "091016A" "091016A" "091016A" ...

RFLPtools documentation built on Feb. 8, 2022, 5:06 p.m.