netZoo / netZooR

netZooR is a network biology package implemented in R.
https://netzoo.github.io/
GNU General Public License v3.0
100 stars 39 forks source link

Lioness sample code in R #274

Closed sandraleebatista closed 1 year ago

sandraleebatista commented 1 year ago

Hello, do you have any lioness sample code in R? I tried the tutorial here: https://github.com/kuijjerlab/lionessR

Specifically I cannot get the lioness function itself work. (Specifically this line: cormat <- lioness(dat,netFun) (had used correlation for the network) Error in if (class(expr) == "ExpressionSet") expr <- assayData(expr)[["exprs"]] : )

However it did not work and I am not sure if it is because I am using lioness in R from netZooR. I had installed netZooR using BiocManager. I am not sure if the API should be different or if there is any other documentation.

Thank you, Sandra

marouenbg commented 1 year ago

Hi @sandraleebatista ,

I don't think that the code snippet corresponds to what we have, here is what lioness in netZooR looks like: https://github.com/netZoo/netZooR/blob/master/R/LIONESS.R#L183 You can call it with network.inference.method == "pearson" for a correlation network.

Best, Marouen

sandraleebatista commented 1 year ago

Thank you. That helped fix the tutorial, this line specifically: cormat <- lioness(dat, network.inference.method ="pearson")

marouenbg commented 1 year ago

Hi @sandraleebatista , I think lioness returns a list of objects each containing single-sample networks (coexpression in your case) https://github.com/netZoo/netZooR/blob/master/R/LIONESS.R#L172