Learn R Programming

snQTL (version 0.2)

diffnet_to_snQTL_stats: Test statistics for snQTL

Description

Generate snQTL test statistics from a given list of differential networks. This function takes a list of differential networks, the choice of test statistics, and other computational tuning parameters as inputs. Outputs include the calculated statistics, recall of the choice, and the decomposition components associated with the statistics.

Usage

diffnet_to_snQTL_stats(
  diffnet_list,
  method = c("sum", "sum_square", "max", "tensor"),
  rho = 1000,
  sumabs = 0.2,
  niter = 20,
  trace = FALSE,
  tensor_iter = 20,
  tensor_tol = 10^(-3),
  tensor_seed = NULL
)

Value

a list containing the following:

method

character, recall of the choice of test statistics

stats

number, the calculated test statistics with given network list and choices

decomp_result

list, if method = c("sum", "sum_square", "max"), the matrix decomposition components for all pairwise differential networks are recorded; if method = "tensor", the tensor decomposition components for the differential tensor are recorded

Arguments

diffnet_list

list, a list of p-by-p differential networks

method

character, the choice of test statistics; see "details"

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; sumabs takes value between \(1/sqrt(p)\) and 1, where \(p\) is the dimension; sumabs\(*sqrt(p)\) is the upperbound of the L1 norm of the leading matrix/tensor eigenvector (see symmPMD())

niter

integer, the number of iterations to use in the PMD algorithm (see symmPMD())

trace

logic variable, whether to trace the progress of PMD algorithm (see symmPMD())

tensor_iter

integer, the maximal number of iteration in SSTD algorithm (see max_iter in SSTD())

tensor_tol

number, a small positive constant for error difference to indicate the SSTD convergence (see tol in SSTD())

tensor_seed

number, the seed to generate random initialization for SSTD algorithm

Details

The list diffnet_list records the pairwise differential networks \(D_{AB}, D_{AH}, D_{AB}\). This package provides four options for test statistics:

  1. sum, the sum of sparse leading matrix eigenvalues (sLMEs) of all pairwise differential networks:

    $$Stat_sum = \lambda(D_{AB}) + \lambda(D_{AH}) + \lambda(D_{BH}),$$

    where \(\lambda\) refers to the sLME operation with given sparsity level set up by sumabs.

  2. sum_square, the sum of squared sLMEs:

    $$Stat_sumsquare = \lambda^2(D_{AB}) + \lambda^2(D_{AH}) + \lambda^2(D_{BH}).$$

  3. max, the maximal of sLMEs:

    $$Stat_max = \max(\lambda(D_{AB}), \lambda(D_{AH}), \lambda(D_{BH})).$$

  4. tensor, the sparse leading tensor eigenvalue (sLTE) of the differential tensor:

    $$Stat_tensor = \Lambda(\mathcal{D}),$$

    where \(\Lambda\) refers to the sLTE operation with given sparsity level set up by sumabs, and \(\mathcal{D}\) is the differential tensor composed by stacking three pairwise differential networks.

The sparse symmetric matrix decomposition is implemented by symmPMD() with parameters rho, sumabs, niter, trace. The sparse symmetric tensor decomposition is implemented by SSTD(). Since symmPMD() is used in SSTD(), parameters for symmPMD() are used for SSTD(). While parameters tensor_iter, tensor_tol, tensor_seed should be uniquely defined for tensor method.

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.