aIc.coherent {aIc} | R Documentation |
Calculate the subcompositional coherence of samples in a dataset for a given correction.
Description
'aIc.coherent' compares the correlation coefficients of features in common of the full dataset and a subset of the dataset. This is expected to be false for all compositional datasets and transforms.
Usage
aIc.coherent(
data,
norm.method = "prop",
zero.remove = 0.95,
zero.method = "prior",
log = FALSE,
group = NULL,
cor.test = "spearman"
)
Arguments
data |
can be any dataframe or matrix with samples by column |
norm.method |
can be prop, clr, RLE, TMM, TMMwsp, lvha, iqlr |
zero.remove |
is a value. Filter data to remove features that are 0 across at least that proportion of samples: default 0.95 |
zero.method |
can be any of NULL, prior, GBM or CZM. NULL will not impute or change 0 values, GBM and CZM are from the zCompositions R package, and prior will simply add 0.5 to all counts. |
log |
is a logical. log transform the prop, RLE or TMM outputs, default=FALSE |
group |
is a vector containing group information. Required for clr, RLE, |
cor.test |
is either the pearson or spearman method (default) |
Value
Returns a list with the correlation in cor
, a yes/no binary
decision in is.coherent
, the x and y values for a scatterplot
of the correlations in the full and subcompositions, and the plot and axis
labels in main
xlab
and ylab
.
Author(s)
Greg Gloor
Examples
data(selex)
group = c(rep('N', 7), rep('S', 7))
x <- aIc.coherent(selex, group=group, norm.method='clr', zero.method='prior')
plot(x$plot[,1], x$plot[,2], main=x$main, ylab=x$ylab, xlab=x$xlab)