Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to run ICMgs with a graph object as input? #3

Open
mschubert opened this issue Jan 27, 2016 · 1 comment
Open

How to run ICMgs with a graph object as input? #3

mschubert opened this issue Jan 27, 2016 · 1 comment

Comments

@mschubert
Copy link

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?

@ouzor
Copy link
Collaborator

ouzor commented Jan 28, 2016

Hi Michael,

I created the ICMg model more than five year ago, so can not recall the details and can not suggest anything else than following the examples as closely as possible.

If you could give a reproducible example with your own data, I might be able to help more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants