I am trying to perform deconvolution on some spatial data. I have had success running Giotto::runDWLSDeconv()
previosuly but now I am using a larger signature matrix and it appears that quadprog::solve.QP()
is complaining about a matrix not being positive definite, which is something I don't have much experience nor understand what it means exactly.
Error in quadprog::solve.QP(D, d, A, bzero) : matrix D in quadratic function is not positive definite!
6.
stop("matrix D in quadratic function is not positive definite!")
5.
quadprog::solve.QP(D, d, A, bzero)
4.
solve_OLS_internal(S, B)
3.
optimize_solveDampenedWLS(S_k, B[uniq_ct_k_gene, ], constant_J)
2.
spot_deconvolution(expr = filter_expr, cluster_info = cluster, ct_exp = filter_Sig, binary_matrix = binarize_proportion)
1.
Giotto::runDWLSDeconv(gobject = giottoobj_mpoa100um, expression_values = c("normalized"), logbase = 2, cluster_column = "cluster_9", sign_matrix = t(neuronalCellTypes_100um$gtCtGenes), n_cell = 50, cutoff = 2, name = NULL, return_gobject = TRUE)
giottoobj <- Giotto::runDWLSDeconv(gobject = giottoobj,
expression_values = c('normalized'), # selects @norm_expr
logbase = 2,
cluster_column = 'cluster_9', # 'leiden_clus'
sign_matrix = enrich_matrix,
n_cell = 50,
cutoff = 2,
name = NULL,
return_gobject = TRUE)
Do you know what might be going on? I've gone through the Giotto source code but it's pretty dense to keep track of the variables as they are passed to internal functions, and I cannot execute the internal functions themselves to investigate as many are not exported and thus not callable independently.