Given observations from two populations X and Y, compute the differential matrix $$D = N(Y) - N(X)$$ 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.
get_diffnet_from_exp(X, Y, adj.beta = -1, trans = FALSE, location = NULL)
The p-by-p differential matrix \(D = N(Y) - N(X)\).
n1-by-p matrix for samples from the first population. Rows are samples/observations, while columns are the features.
n2-by-p matrix for samples from the second population. Rows are samples/observations, while columns are the features.
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
.
logic variable, whether to only consider the trans-correlation (between genes from two different chromosomes or regions); see "details"
vector, the (chromosome) locations for items