secom_dist  R Documentation 
Obtain the sparse correlation matrix for distance correlations between taxa.
secom_dist( data, assay_name = "counts", tax_level = NULL, pseudo = 0, prv_cut = 0.5, lib_cut = 1000, corr_cut = 0.5, wins_quant = c(0.05, 0.95), R = 1000, thresh_hard = 0, max_p = 0.005, n_cl = 1 )
data 
a list of the input data. Each element of the list can be a

assay_name 
character. Name of the count table in the data object
(only applicable if data object is a 
tax_level 
character. The taxonomic level of interest. The input data
can be agglomerated at different taxonomic levels based on your research
interest. Default is NULL, i.e., do not perform agglomeration, and the
SECOM anlysis will be performed at the lowest taxonomic level of the
input 
pseudo 
numeric. Add pseudocounts to the data. Default is 0 (no pseudocounts). 
prv_cut 
a numerical fraction between 0 and 1. Taxa with prevalences
less than 
lib_cut 
a numerical threshold for filtering samples based on library
sizes. Samples with library sizes less than 
corr_cut 
numeric. To prevent false positives due to taxa with
small variances, taxa with Pearson correlation coefficients greater than

wins_quant 
a numeric vector of probabilities with values between
0 and 1. Replace extreme values in the abundance data with less
extreme values. Default is 
R 
numeric. The number of replicates in calculating the pvalue for
distance correlation. For details, see 
thresh_hard 
Numeric. Set a hard threshold for the correlation matrix.
Pairwise distance correlation less than or equal to 
max_p 
numeric. Obtain the sparse correlation matrix by
pvalue filtering. Pairwise correlation coefficient with pvalue greater than

n_cl 
numeric. The number of nodes to be forked. For details, see

The distance correlation, which is a measure of dependence between two random variables, can be used to quantify any dependence, whether linear, monotonic, nonmonotonic or nonlinear relationships.
a list
with components:
s_diff_hat
, a numeric vector of estimated
samplespecific biases.
y_hat
, a matrix of biascorrected abundances
mat_cooccur
, a matrix of taxontaxon cooccurrence
pattern. The number in each cell represents the number of complete
(nonzero) samples for the corresponding pair of taxa.
dcorr
, the sample distance correlation matrix
computed using the biascorrected abundances y_hat
.
dcorr_p
, the pvalue matrix corresponding to the sample
distance correlation matrix dcorr
.
dcorr_fl
, the sparse correlation matrix obtained by
pvalue filtering based on the cutoff specified in max_p
.
Huang Lin
secom_linear
library(ANCOMBC) data(dietswap) # subset to baseline tse = dietswap[, dietswap$timepoint == 1] set.seed(123) res_dist = secom_dist(data = list(tse), assay_name = "counts", tax_level = "Phylum", pseudo = 0, prv_cut = 0.5, lib_cut = 1000, corr_cut = 0.5, wins_quant = c(0.05, 0.95), R = 1000, thresh_hard = 0.3, max_p = 0.005, n_cl = 2) dcorr_fl = res_dist$dcorr_fl
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.