QCAT {miLineage} | R Documentation |
Quasi-Conditional Association Test (QCAT)
Description
This function allows users to (a) perform QCAT on multivariate taxon counts; (b) perform QCAT on the taxonomic tree to localize the covariate-associated lineages; and (c) assess the overall association of the microbial community with the covariate of interest.
Usage
QCAT(OTU, X, X.index, Tax = NULL,
min.depth = 0, n.resample = NULL, fdr.alpha = 0.05)
Arguments
OTU |
a numeric matrix contains counts with each row corresponds to a sample and each column corresponds to an OTU or a taxon. Column name is mandatory. No missing values are allowed. |
X |
a numeric matrix contains covariates with each column pertains to one variable. Samples in the OTU and X matrices should be identical and in the same order. No missing values are allowed. |
X.index |
a vector indicates the columns in X for the covariate(s) of interest. The remaining columns in X will be treated as confounders. |
Tax |
a matrix define the taxonomic ranks with each row corresponds to an OTU or a taxon and each column corresponds to a rank (start from the higher taxonomic level, e.g., from kingdom to genus). Row name is mandatory and should be consistent with the column name of the OTU table, Column name should be formatted as "Rank1", "Rank2", etc, representing the taxonomic levels from highest to lowest. |
min.depth |
lower bound for sample read depth. Samples with read depth less than min.depth will be removed before the analysis. |
n.resample |
number of reamplings/permutations |
fdr.alpha |
desired false discovery rate for multiple tests on the lineages. |
Value
If Tax=NULL (Default), a test is performed using all the OTUs/taxa.
If Tax is provided, tests are performed for lineages derived from the taxonomic hierarchy. The output is a list that contains 3 components
lineage.pval |
p-values for all lineages. By default (n.resample=NULL), only the asymptotic test will be performed. |
sig.lineage |
a vector of significant lineages |
global.pval |
p-values of the global tests |
Author(s)
Zheng-Zheng Tang
References
Tang, Z.-Z., Chen, G., Alekseyenko, A. V., and Li, H. (2017). A General Framework for Association Analysis of Microbial Communities on a Taxonomic Tree. Bioinformatics, 33(9), 1278-1285.
Examples
data(data.toy)
OTU.toy = data.toy$OTU.toy
Tax.toy = data.toy$Tax.toy
case = data.toy$covariate.toy
# the OTUs should be consistent between the OTU table and the taxonomy table
OTU.toy.reorder = OTU.toy[,match(rownames(Tax.toy), colnames(OTU.toy))]
# perform QCAT
QCAT(OTU.toy.reorder, case, 1, Tax.toy, fdr.alpha=0.05)