Hi, Chris,
I have 2 questions about the function of set_brainGraph_attr:
1. What are the possible values for the weighting argument? "sld"(for probabilistic DTT),"FA"(for deterministic DTT) and "pearson"(for fmri)?
2. I have fused all graphs (116*116 matrices derived from probabilistic DTT) at different thresholds into a final graph(W: a 116*116 matrix )for every subject using similarity network fusion algorithm . Then I need to calculate all topological features for the final graph (W) with no thresholds.
if I use following code, I will recieve an error message:
g.tmp <- graph_from_adjacency_matrix(W,mode='undirected', diag=F, weighted=T)
g.tmp <- set_brainGraph_attr(g.tmp,
atlas,
modality=modality,
weighting='sld',
threshold=0,
subject=table_covars[groups[i], Study.ID[k]],
group=groups[i],
use.parallel=F,
A=W)
Error in if (nrow(adjmatrix) != ncol(adjmatrix)) { :
argument is of length zero
if I change the code into following , no error appears:
g.tmp <- graph_from_adjacency_matrix(W,mode='undirected', diag=F, weighted=T)
g.tmp <- set_brainGraph_attr(g.tmp,
atlas,
modality=modality,
weighting='sld',
threshold=0,
subject=table_covars[groups[i], Study.ID[k]],
group=groups[i],
use.parallel=F,
A=A.norm.sub[[j]][, ,inds[[i]][k]])
I don't know the appropriate value for the A argument. Could you help me correct my code?