R: Measure Of Discordance Between Two Amplicon Data Sets
discordance.delta
R Documentation
Measure Of Discordance Between Two Amplicon Data Sets
Description
Calculates delta (Δ) and delta prime (Δ'), the fraction of amplicon frequencies and amplicons, respectively, with a false discovery rate below a certain threshold θ as a measure of discordance between two amplicon data sets A and B.
A list of amplicon duo data frames as returned by the ampliconduo function.
names
Optional. Vector or list of characters specifying the sample/amplicon pair names. By default
names are taken from the element names of x.
theta
Optional. Numeric, threshold for the false discovery rate. Default value is 0.05.
corrected
Optional. Logical, indicates whether the p-value from Fisher's exact test (FALSE) or the
adjusted p-value (TRUE), here called q, is used for calculation of Δ and Δ'.
printToTex
Optional. Logical, if TRUE writes a file with the resulting table in Tex format. Default is FALSE.
directory
Optional. If printToTex is TRUE, the output file will be saved in the specified directory.
file.name
Optional. If printToTex is TRUE, the output file will have the name file.name.
Details
Calculates Δ and Δ', the fraction of frequencies of amplicons and amplicons, respectively, with false discovery rate below a certain threshold θ as a measure of discordance between two amplicon data sets A and B with occurence r_{(iAS)} of amplicon i in amplicon set A of sample S (the ampliconduo data frame).
Δ and Δ' are defined as follows:
for number n_S of amplicons detected in sample/ampliconduo S. Δ_{Sθ} and Δ'_{Sθ} are located between 0 (no discordance, i.e. no statistically significant deviations between experimental branches) and 1 (complete discordance).
x is the return value of a ampliconduo call.
Value
Data frame with three columns. The first column contains the sample/amplicon pair names. Second and third column
harbor the corresponding Δ and Δ' values, respectively.
Author(s)
Anja Lange
&
Daniel Hoffmann
See Also
ampliconduo, generates the expected data format for x
xtable, used to convert the returned data frame into a Latex table.
Examples
## load example ampliconduo data frame
data(amplicons)
## calculate the discordance between amplicon data sets of an ampliconduo data frame
dd.a <- discordance.delta(amplicons)
dd.b <- discordance.delta(amplicons, theta = 0.1)
dd.c <- discordance.delta(amplicons, printToTex = TRUE)
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(AmpliconDuo)
Loading required package: ggplot2
Loading required package: xtable
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/AmpliconDuo/discordance.delta.Rd_%03d_medium.png", width=480, height=480)
> ### Name: discordance.delta
> ### Title: Measure Of Discordance Between Two Amplicon Data Sets
> ### Aliases: discordance.delta
> ### Keywords: htest
>
> ### ** Examples
>
> ## load example ampliconduo data frame
> data(amplicons)
>
> ## calculate the discordance between amplicon data sets of an ampliconduo data frame
> dd.a <- discordance.delta(amplicons)
> dd.b <- discordance.delta(amplicons, theta = 0.1)
> dd.c <- discordance.delta(amplicons, printToTex = TRUE)
>
>
>
>
>
> dev.off()
null device
1
>