I'm trying to build an ICMg model where my network is an igraph object, but the function only takes matrices as network objects.
So I tried using the same code that is used by detect.response to convert one to the other:
datamatrix = netresponse:::check.matrix(my_expression_matrix)
tmp = netresponse:::check.network(network, datamatrix, verbose = TRUE)
network = tmp$formatted
network.orig = tmp$original
delta = tmp$delta
network.nodes = tmp$nodes
rm(tmp)
samples = rownames(datamatrix)
datamatrix = matrix(datamatrix[, network.nodes], nrow(datamatrix))
colnames(datamatrix) = network.nodes
rownames(datamatrix) = samples
rm(samples)
result = ICMg.combined.sampler(t(network), datamatrix, C=20)
However, this fails - and I'm not sure why.
For the conversion, I assumed the following:
my_expression_matrix is [samples x observations]
network can be any igraph object
osmo$ppi is [link x (in,out)] where values are numeric (not name) row index in osmo$exp
osmo$exp is [observations x samples] - the documentation states [nodes x observations], but the way I interpret it nodes and observations are the same thing
Is this correct?
I'm trying to build an
ICMgmodel where my network is anigraphobject, but the function only takes matrices as network objects.So I tried using the same code that is used by
detect.responseto convert one to the other:However, this fails - and I'm not sure why.
For the conversion, I assumed the following:
my_expression_matrixis [samples x observations]networkcan be anyigraphobjectosmo$ppiis [link x (in,out)] where values are numeric (not name) row index inosmo$exposmo$expis [observations x samples] - the documentation states [nodes x observations], but the way I interpret it nodes and observations are the same thingIs this correct?