-
Notifications
You must be signed in to change notification settings - Fork 32
Description
**Dear Stefanie,
I am trying to construct Pearson correlation based networks using your helpful tool. I was wondering, how significance is tested in the network based on pearson correlations, since I am getting a matrix with significance values, but I cannot select an alpha when using the pearson correlation as method.
Is there an alternative way to specify a significance cut-off?
net_comp <- netConstruct(data =physeq_FF_TSS,
taxRank = "SPECIES",
measure = "pearson",
normMethod = "clr",
zeroMethod = "multRepl",
sparsMethod = "threshold",
thresh = 0.7,
verbose = 3)
#186 taxa and 5 samples remaining
props_comp <- netAnalyze(net_comp,
centrLCC = FALSE, # Centralities for all nodes
avDissIgnoreInf = TRUE, # Ignore infinite dissimilarities
clustMethod = "cluster_fast_greedy", # Clustering method
hubPar = c("eigenvector", "degree"), # Identify hubs using eigenvector centrality & degree
weightDeg = TRUE, # Weight degrees
normDeg = FALSE, # No degree normalization
verbose = TRUE)
I tried using the SPARcc method instead but whenever I repeated the code, the networks were not reproducible and looked a bit different every time.
net_comp <- netConstruct(data =physeq_FF_filtered,
taxRank = "SPECIES",
measure = "sparcc",
zeroMethod = "none",
sparsMethod = "t-test",
alpha = 0.05,
verbose = 3)
#122 taxa and 5 samples remaining
props_comp <- netAnalyze(net_comp,
centrLCC = FALSE,
avDissIgnoreInf = TRUE,
clustMethod = "cluster_fast_greedy",
hubPar = c("eigenvector", "degree"),
weightDeg = TRUE,
normDeg = FALSE,
verbose = TRUE)
plot(props_comp,
layout = "spring",
repulsion = 0.85,
shortenLabels = "none",
edgeInvisFilter = "threshold",
edgeInvisPar = 0.4,
labelScale = FALSE,
rmSingles = TRUE,
nodeSize = "clr",
nodeSizeSpread = 3,
nodeColor = "feature", # Color nodes by feature
featVecCol = phyla, # Phylum vector for nodes
colorVec = phylcol_adjusted, # Phylum color mapping
posCol = "green4",
negCol = "red4",
edgeTranspLow = 20,
edgeTranspHigh = 20,
cexNodes = 2.5,
cexLabels = 0.3,
cexHubLabels = 0.35,
hubBorderCol = "gray40",
title1 = "Fiber-free (122 taxa; SPARcc thresh RA 0.05, p-value 0.05) ",
showTitle = TRUE,
cexTitle = 1)
**Second, is there a way to get a table with the edge weights per node etc.? That would be very helpul.
Thank you very much in advance and best,
Elena**