clr_lite | R Documentation |
Microbiome data is compositional. When compositional data is examined using non-compositional methods, many problems arise.
Performing a centered log-ratio transformation is a reasonable way to address these problems reasonably well.
A major problem with this approach is that microbiome data typically contains lots of zeroes and the logarithm of zero is undefined.
Here, we implemented a few methods discussed by Lubbe et al. 2021 to replace zeroes with non-zero values in such a way that the structure of the data remains reasonably well preserved.
Some of these methods (namely 'logunif' and 'runif') involve imputing small values between 0 and the lowest non-zero value in the dataset.
For these methods, we have implemented a resampling approach in order to stabilize the inter-run variability. See method
for more information.
clr_lite(counts, samples_are = "cols", method = "logunif", replicates = 1000)
clr_c(counts, samples_are = "cols")
clr_unif(counts, samples_are = "cols", replicates = 1000)
clr_logunif(counts, samples_are = "cols", replicates = 1000)
counts |
A compositional count table. |
samples_are |
Either "cols" or "rows". Default is "cols". Denotes whether the columns or rows depict individual samples. |
method |
The method for zero imputation. One of |
replicates |
An integer. For the two random sampling methods, if this is larger than 1, every zero will be imputed that many times. The median of the CLR of all those replicates will be returned. If |
A CLR-transformed count table.
clr_c:
A wrapper for clr_lite(counts, method = "const", replicates = 1)
.
clr_unif:
A wrapper for clr_lite(counts, method = "unif")
.
clr_logunif:
A wrapper for clr_lite(counts, method = "logunif")
.
Sugnet Lubbe, Peter Filzmoser, Matthias Templ (2021) Comparison of zero replacement strategies for compositional data with large numbers of zeros. doi:https://doi.org/10.1016/j.chemolab.2021.104248
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.