Hi Chris,
I am trying to investigate group difference in graph level as in the 'brainGraph_UserGuide'. I can calculate the ‘Lp’, ‘Cp’, E.global’, ‘modality’, ‘assortativity’ and ‘assortativity.lobe’. However, I got following errors for some parameters (max.comp, clique.num, num.tri, diameter, transitivity, asymm, num.hubs, E.local, vulnerability). I am using the following procedure:
____________________________________ exclude.subs <- NULLuse.mean <- FALSE init.vars <- brainGraph_init(atlas='destrieux', densities=seq(0.05, 0.5, 0.01), datadir=datadir, modality='thickness', exclude.subs=exclude.subs, use.mean=use.mean) lapply(seq_along(init.vars), function(x) assign(names(init.vars)[x], eval(init.vars[[x]]), envir=.GlobalEnv)) N <- which(abs(densities - 0.3) < 0.001) all.dat.resids <- get.resid(all.dat.tidy, covars, exclude='Group')resids.all <- all.dat.resids$resids.allformulas <- all.dat.resids$formulasresids.all <- all.dat.resids$resids.all corrs <- lapply(groups, function(x) lapply(densities, function(y) corr.matrix(resids.all[x], density=y))) g <- lapply(corrs, lapply, function(x) graph_from_adjacency_matrix(x$r.thresh, mode='undirected', diag=F)) g <- Map(function(x, y) llply(x, set.brainGraph.attributes, atlas=atlas, modality=modality, group=y, .progress='text'), g, as.list(groups))kNumPerms <- 1e4 myPerms <- permute::shuffleSet(n=nrow(resids.all), nset=kNumPerms) perms.all <- plyr::adply(densities, .margins=1, function(x) permute.group(myPerms, x, resids.all, 'graph', atlas), .progress='text',.id=NULL) setDT(perms.all)dim(perms.all) permPlot <- plot_perm_diffs(g[[1]], g[[2]], perms.all, 'num.hubs', level='graph', groups=groups, alternative='less', ylabel='Number of Hubs') >>Error in plot_perm_diffs(g[[1]], g[[2]], perms.all, "num.hubs", level = "graph", : Measure "num.hubs" is not valid!
________________________________
Is there a problem about the procedure? Thanks in advance.Onur--
You received this message because you are subscribed to the Google Groups "brainGraph-help" group.
To unsubscribe from this group and stop receiving emails from it, send an email to brainGraph-help+unsubscribe@googlegroups.com.
To post to this group, send email to brainGraph-help@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/brainGraph-help/ca76b4e8-437d-410e-990e-833d690c1b3e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "brainGraph-help" group.
To unsubscribe from this group and stop receiving emails from it, send an email to brainGraph-help+unsubscribe@googlegroups.com.
To post to this group, send email to brainGraph-help@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/brainGraph-help/b3ebf46d-f9d1-4e43-ae0b-6c9379f37a76%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to brainGraph-he...@googlegroups.com.
To post to this group, send email to brainGr...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to brainGraph-help+unsubscribe@googlegroups.com.
To post to this group, send email to brainGraph-help@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/brainGraph-help/d34b2ed8-77e3-4366-82da-3996f9fcb510%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to brainGraph-help+unsubscribe@googlegroups.com.
To post to this group, send email to brainGraph-help@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/brainGraph-help/f46ae429-1d07-436c-995a-33517b6cc8ed%40googlegroups.com.
Error in { : task 1 failed - "Not a graph object"kNumPerms <- 1e3
myPerms <- permute::shuffleSet(n=nrow(resids.all), nset=kNumPerms)
perms.btwn <- adply(densities[N:(N+1)], .margins=1, function(x)
permute.group(myPerms[1:1e3, ], x, resids.all, 'vertex'),
.progress='text',.id=NULL)
setDT(perms.btwn)
setnames(perms.btwn, 2:(kNumVertices+1), V(g[[1]][[N]])$name)evcent.diffs.perm <- function(g1, g2, density) {
ev.diff <- centr_eigen(g1)$vector - centr_eigen(g2)$vector
tmp <- data.table(cbind(density, t(ev.diff)))
}
ev.diffs <- plyr::adply(densities[N], .margins=1, function(x)
permute.group(myPerms[1:1e3, ], x,
resids.all, 'other',
.function=evcent.diffs.perm),
.progress='text', .id=NULL)
setDT(ev.diffs)
p.perm.btwn <- plot_perm_diffs(g[[1]], g[[2]], ev.diffs, 'ev.cent',To unsubscribe from this group and stop receiving emails from it, send an email to brainGraph-help+unsubscribe@googlegroups.com.
To post to this group, send email to brainGraph-help@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/brainGraph-help/199b9502-5539-4a8b-8337-72af31925d5e%40googlegroups.com.
You received this message because you are subscribed to a topic in the Google Groups "brainGraph-help" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/brainGraph-help/pF2-4BIQeug/unsubscribe.
To unsubscribe from this group and all its topics, send an email to brainGraph-help+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/brainGraph-help/CAHVz74h-6ZpYaqb968ta%3DvRPC%3D%3DssAsjfM1LaQXwjU_3Oyv0Og%40mail.gmail.com.