amalacrino / olive_16S_microbiota

1 stars 0 forks source link

Which measure you finally used for network analysis. #1

Open Rohit-Satyam opened 2 years ago

Rohit-Satyam commented 2 years ago

Hi. I am new to network analysis using NetComi. At the very onset, I want to thank you that you made the code available publicly. I saw your functions for network analysis and I was wondering which method you ended up using finally from the available options like Pearson, spearman, bicor etc. Also, can you give an example usage of function netFun that you wrote? I mean which matrix was supplied to y argument of netFun function.

amalacrino commented 2 years ago

Hi, thanks for your message. Indeed, there is extra code I shared and was not used in my paper. In the end I did not use the netFun function. I now removed those chunks of code.

Anyway, I normally I use the sparcc metric when calling netConstruct.

Here the netFun function I use.

netFun <- function(x, y, method){
  net_seas_p <- netConstruct(x, y,
                           filtTax = "highestVar",
                           filtTaxPar = list(highestVar = 500),
                           zeroMethod = "pseudo",
                           normMethod = "clr",
                           measure = method,
                           cores = ncores,
                           verbose = 0)
network <- netAnalyze(net_seas_p, clustMethod = "cluster_fast_greedy", weightDeg = TRUE, normDeg = FALSE)
return(network)      
}

and here how normally I call the function:

netFun(phyloseqobject1, phyloseqobject2, "sparcc")

So x and y are just the two phyloseq object I want to compare.

Please, let me know if you have further questions.

Cheers, Antonino