Learn R Programming

snQTL (version 0.2)

get_diffnet_list_from_exp: Get the list of differential matrix from a list of expression data

Description

Given a list of expression data, \(X_1, ..., X_K\), compute the list of differential matrix $$D^{(k,l)} = N(X_l) - N(X_k), k < l, $$ where N() is the covariance matrix, or the weighted adjacency matrices defined as $$N_{ij} = |corr(i, j)|^beta$$ for some constant beta > 0, 1 <= i, j <= p. Let N represent the regular correlation matrix when beta=0, and covariance matrix when beta<0. In total, we will have K*(K-1)/2 pairwise differential networks in the list.

If trans = TRUE, we let \(N_{ij} = 0\) if \(i, j\) are from the same region based on location. Under gene co-expression context, trans-correlation usually refer to the correlation between two genes \(i, j\) from two chromosomes.

Usage

get_diffnet_list_from_exp(
  exp_list,
  adj.beta = -1,
  trans = FALSE,
  location = NULL
)

Value

A list of p-by-p differential matrix \(D^{(k,l)}, k < l\).

Arguments

exp_list

a list of nk-by-p matrices from the K populations. Rows are samples/observations, while columns are the features.

adj.beta

Power to transform correlation matrices to weighted adjacency matrices by \(N_{ij} = |r_ij|^adj.beta\) where \(r_ij\) represents the Pearson's correlation. When adj.beta=0, the correlation marix is used. When adj.beta<0, the covariance matrix is used. The default value is adj.beta=-1.

trans

logic variable, whether to only consider the trans-correlation (between genes from two different chromosomes or regions)

location

vector, the (chromosome) locations for items