single_exp_to_snQTL_stats {snQTL} | R Documentation |
Generate one single snQTL test statistics from expression data
Description
Generate one single snQTL test statistics from a given list of expression data. This function takes a list of expression data, the choice of test statistics, the choice to permute or not, the choice of considering trans-correlation or not, and other computational tuning parameters as inputs. Outputs include the calculated statistics, recall of the choices, and the decomposition components associated with the statistics.
Usage
single_exp_to_snQTL_stats(
seed = NULL,
permute = FALSE,
exp_list,
method = c("sum", "sum_square", "max", "tensor"),
rho = 1000,
sumabs = 0.2,
niter = 20,
trace = FALSE,
adj.beta = -1,
tensor_iter = 20,
tensor_tol = 10^(-3),
trans = FALSE,
location = NULL
)
Arguments
seed |
number, the random seed to shuffle the expression data if |
permute |
logic variable, whether to shuffle the samples in expression data; see "details" |
exp_list |
list, a list of expression data from samples with different genotypes; see "details" |
method |
character, the choice of test statistics (see |
rho |
number, a large positive constant adding to the diagonal elements to ensure positive definiteness in symmetric matrix spectral decomposition |
sumabs |
number, the number specify the sparsity level in the matrix/tensor eigenvector; |
niter |
integer, the number of iterations to use in the PMD algorithm (see |
trace |
logic variable, whether to trace the progress of PMD algorithm (see |
adj.beta |
number, the power transformation to the correlation matrices (see |
tensor_iter |
integer, the maximal number of iteration in SSTD algorithm (see |
tensor_tol |
number, a small positive constant for error difference to indicate the SSTD convergence (see |
trans |
logic variable, whether to only consider the trans-correlation (between genes from two different chromosomes or regions); see "details" |
location |
vector, the (chromosome) locations for genes if |
Details
In exp_list
, the dimensions for data matrices are n1-by-p, n2-by-p, and n3-by-p, respectively.
The expression data is usually normalized. We use expression data to generate the Pearson's correlation co-expression networks.
If permute = TRUE
, we shuffle the samples in three expression matrices while keeping the same dimensions.
The test statistics from randomly shuffled data are considered as the statistics from null distribution.
If trans = TRUE
, we only consider the trans-correlation between the genes from two different chromosomes or regions in co-expression networks.
The entries in correlation matrices N_{ij} = 0
if gene i and gene j are from the same chromosome or region.
Value
a list containing the following:
method |
character, recall of the choice of test statistics |
permute |
logic variable, recall of the choice of permutation |
stats |
number, the calculated test statistics with given expression list and choices |
decomp_result |
list, if |
References
Hu, J., Weber, J. N., Fuess, L. E., Steinel, N. C., Bolnick, D. I., & Wang, M. (2025). A spectral framework to map QTLs affecting joint differential networks of gene co-expression. PLOS Computational Biology, 21(4), e1012953.