Description Usage Arguments Details Value Examples
Function to estimate the true signals for each tissue type with quadratic programming.
1 | GSM_QP(ob, weight, l = 0, u = 2^34, meq =0)
|
ob |
data matrix of the mixture signals (in anti-log scale), with genes in row, cell type in column. |
weight |
weight matrix, with cell type in column, tissue types in row. |
l,u |
values for the lower- (l) and upper- (u) bound used in setting the vector for values of b0 (bvec for solve.QP) in solving for quadratic programming. Defaults to 0 and 2^34 respectively. |
meq |
default to zero (used to set meq for solve.QP) |
This functions depends on the solve.QP function from quadprog package. Its major job is to set up values for the needed parameters call solve.QP to obtain the solution.
sol |
estimated true signals for each gene (in row) in each cell type (in column). |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | ## load package DSA
library(DSA)
## load sample data
data('mix.signals')
data('cell.gene')
data('weight')
# In this data, thr first three samples contain signal from only one cell
pure <- mix[, 1:3]
mix <- mix[, 4:14]
weight <- weight[4:14, ]
data <- as.matrix(2^mix)
estimate_weight <- as.matrix(weight)
estimate_weight <- estimate_weight/rowSums(estimate_weight)
# Obtain deconvolution
paraM <- GSM_QP(data, estimate_weight, l = min(data), u = max(data) , meq =0)
# check the estimated cell-type specific signals
for(i in 1:3){
print(cor(2^(pure[,i]),paraM[,i]))
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.