Description Usage Arguments Details Value Author(s) References See Also Examples
The pbray function partitions the Bray-Curtis distance matrix based on the who community and the subset of the community data.
1 |
allComm |
A otu table of microbial community which contains sample in rows and taxa in column. The otu table should not contain a taxonomic column. |
subComm |
A subset of the otu table, with the same samples as allComm. |
tolower |
Logical, by default the function returns the lower triangular matrix. |
The Bray-Curtis dissimilarity is a scaled summation of abundance differences between two communities, it is thus could be partitioned between two samples attributable to a subset of the community (Shade et al., 2014; Yang et al., 2017). Note, the pbray function requires the input for "allComm" and "subComm" keep consistent either in either counts or relative abundance. If the input for "allComm" and "subComm" are the same data, the function will return the Bray-Curtis matrix for the whole community.
The function returns a distance matrix by using the subset community against the whole community data.
Sizhong Yang <yanglzu@163.com>
Shade A, Jones SE, Caporaso JG, Handelsman J, Knight R, Fierer N, and Gilbert JA. Conditionally rare taxa disproportionately contribute to temporal changes in microbial diversity. Mbio, 2014, 5(4): e01371-01314.
Yang S, Winkel M, Wagner D, and Liebner S. Community structure of rare methanogenic archaea: insight from a single functional group. FEMS Microbiology Ecology, 2017: fix126.
function contrib(), matrixConvert().
1 2 3 4 5 6 7 8 9 10 | data(otumothur)
subotus <- subOTU(otutab = otumothur, taxhead = "taxonomy", siteInCol = TRUE,
percent=FALSE, choose = "rare", outype = "counts", sort = FALSE)
pRare <- pbray(allComm = t(otumothur[,-454]), subComm = t(subotus[,-454]))
class(pRare)
# convert to long format data frame
longdist <- matrixConvert(pRare, colname = c("sp1", "sp2", "bray"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.