Schaefer2018_400Parcels_7Networks <- as_atlas(parcellation)
densities <- seq(0.10, 0.20, 0.10)
# Create simple, undirected graphs for each group g <- lapply(seq_along(densities), function(x) make_brainGraphList(corrs[x], atlas = 'Schaefer2018_400Parcels_7Networks', modality='thickness', .progress=F))
Schaefer2018_400Parcels_7Networks_left <- Schaefer2018_400Parcels_7Networks %>% dplyr::filter(hemi == 'L') %>% mutate(name = paste0('l', name)) Schaefer2018_400Parcels_7Networks_right <- Schaefer2018_400Parcels_7Networks %>% dplyr::filter(hemi == 'R') %>% mutate(name = paste0('r', name)) Schaefer2018_400Parcels_7Networks <- setDT(rbind(Schaefer2018_400Parcels_7Networks_left,Schaefer2018_400Parcels_7Networks_right))
# Create simple, undirected graphs for each group g <- lapply(seq_along(densities), function(x) make_brainGraphList(corrs[x], atlas = 'Schaefer2018_400Parcels_7Networks', modality='thickness', .progress=F))
g <- lapply(seq_along(densities), function(x) make_brainGraphList(corrs[x], modality='thickness', .progress=F))
g.lh <- lapply(seq_along(densities), function(x) make_brainGraphList(corrs[x], atlas = 'Schaefer2018_400Parcels_7Networks', modality='thickness', subnet=lobe.lh))
dt.V.limbic <- rbindlist(lapply(g.limbic, vertex_attr_dt))
dt.G.limbic <- rbindlist(lapply(g.limbic, graph_attr_dt))
#Generate N number of for each group and density kNumRand <- 1e2 clustering <- F outdir <- file.path(getwd(), 'rand') rand_vars <- analysis_random_graphs(g, N=kNumRand, savedir=outdir, clustering=clustering) save(rand_vars, file = "data/rand_vars.RData")
--
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-he...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/brainGraph-help/46CB35CC-36A8-46D4-A50A-536133C0D6BE%40monash.edu.
--
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-he...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/brainGraph-help/67EC8EA8-8D05-4A57-BBF9-1B8EDC67E703%40monash.edu.
--
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-he...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/brainGraph-help/67EC8EA8-8D05-4A57-BBF9-1B8EDC67E703%40monash.edu.
--
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-he...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/brainGraph-help/67EC8EA8-8D05-4A57-BBF9-1B8EDC67E703%40monash.edu.
On 1 Oct 2020, at 1:28 am, Chris Watson <cwa...@alum.mit.edu> wrote:
Hi Gershon, I am glad the new version fixes some bugs.1. RE vertex names: the "l" and "r" prefixes being required suggests to me that the names in your input data table also include those. Is that the case?It is slightly simpler to use "data.table" to update the names; I won't write out your full atlas name but just use "schaefer" below:schaefer[hemi == 'L', name := paste0('l', name)]schaefer[hemi == 'R', name := paste0('r', name)]2. Yes, "atlas" is a required argument for "make_brainGraphList". I will update the User Guide but remember you can always check the function help pages.And you are correct, "subnet" should be in the same function call and not outside the first set of parentheses.3. I am not sure what is causing that error. You would need to send me both "g.limbic" and your atlas data.table so I can look into it4. It would seem to me that "density" is not a graph attribute, but I would need the "g" object and the atlas data.table to look into thisChris
On Wed, Sep 30, 2020 at 6:43 AM 'Gershon Spitz' via brainGraph-help <brainGr...@googlegroups.com> wrote:
Dear Chris,Thank you for your hard work on completing brainGraph v3.0I have transitioned over from v2.7 and have found encountered some new error messages, but also some fixes which is great!To help diagnose the problem, just some quick details:— Looking at created and analysing structural covariance networks between two groups—Using a custom parcellation atlas, the Schaefer 400 parcels,7 network versionMy parcellation data.table looks like this:
<Screen Shot 2020-09-30 at 8.44.08 pm.png>
I use the as_atlas to coerce the custom atlas:Schaefer2018_400Parcels_7Networks <- as_atlas(parcellation)I am testing running the pipeline over two densities:densities <- seq(0.10, 0.20, 0.10)All runs smoothly until I get to creating the undirected graphs for each group using the following:# Create simple, undirected graphs for each group g <- lapply(seq_along(densities), function(x) make_brainGraphList(corrs[x], atlas = 'Schaefer2018_400Parcels_7Networks', modality='thickness', .progress=F))I receive the following error:
<Screen Shot 2020-09-30 at 8.52.28 pm.png>
I can get around this error by changing the ’name’ column in the parcellation by adding ‘l’ or ‘r’ to each region. Ie.,Schaefer2018_400Parcels_7Networks_left <- Schaefer2018_400Parcels_7Networks %>% dplyr::filter(hemi == 'L') %>% mutate(name = paste0('l', name)) Schaefer2018_400Parcels_7Networks_right <- Schaefer2018_400Parcels_7Networks %>% dplyr::filter(hemi == 'R') %>% mutate(name = paste0('r', name)) Schaefer2018_400Parcels_7Networks <- setDT(rbind(Schaefer2018_400Parcels_7Networks_left,Schaefer2018_400Parcels_7Networks_right))Creating the graphs then successfully runs using:# Create simple, undirected graphs for each group g <- lapply(seq_along(densities), function(x) make_brainGraphList(corrs[x], atlas = 'Schaefer2018_400Parcels_7Networks', modality='thickness', .progress=F))I also find the I must specify atlas = ‘Schaefer2018_400Parcels_7Networks’Otherwise, if I use the following code:g <- lapply(seq_along(densities), function(x) make_brainGraphList(corrs[x], modality='thickness', .progress=F))I receive the following error:
<Screen Shot 2020-09-30 at 9.05.39 pm.png>
Similarly, if I want to create a subgraph, I must specify the atlas name, otherwise I receive the same “object ’NA not found” error. Thus, I have to specify like so:g.lh <- lapply(seq_along(densities), function(x) make_brainGraphList(corrs[x], atlas = 'Schaefer2018_400Parcels_7Networks', modality='thickness', subnet=lobe.lh))By the way, I believe the manual specifies to place the ’subnet’ command outside the brackets, which I think is incorrect.Doing so, I am able to extract vertex level measure using,dt.V.limbic <- rbindlist(lapply(g.limbic, vertex_attr_dt))But receive an error if I try to extract graph level measures usingdt.G.limbic <- rbindlist(lapply(g.limbic, graph_attr_dt))Receiving the following error:
<Screen Shot 2020-09-30 at 9.09.43 pm.png>
The good news is that now both individuals contribution functions work, both aop and loo!However, I now receive an error during random graph generation using:#Generate N number of for each group and density kNumRand <- 1e2 clustering <- F outdir <- file.path(getwd(), 'rand') rand_vars <- analysis_random_graphs(g, N=kNumRand, savedir=outdir, clustering=clustering) save(rand_vars, file = "data/rand_vars.RData")I receive the following error:
<Screen Shot 2020-09-30 at 9.21.16 pm.png>
Once again, thank you for developing the package and hopefully we can solve these niggling issues!Best wishes,
--
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-he...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/brainGraph-help/46CB35CC-36A8-46D4-A50A-536133C0D6BE%40monash.edu.
--
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-he...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/brainGraph-help/CAHVz74iZ0nmBaAV66%3DNOOunj-VvCR5zYMPpJJsmSUGTROkvs0A%40mail.gmail.com.
--
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-he...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/brainGraph-help/67EC8EA8-8D05-4A57-BBF9-1B8EDC67E703%40monash.edu.
regions.limbic <- get(atlas)[lobe == 'Limbic', name] g.limbic <- lapply(seq_along(densities), function(x)
make_brainGraphList(corrs[x], atlas = 'Schaefer2018_400Parcels_7Networks', modality='thickness',
subnet=regions.limbic))
To view this discussion on the web visit https://groups.google.com/d/msgid/brainGraph-help/CAHVz74jj5b66eRPd_upeHHuJuw8wQ%2B7y8y%2BE-7KD4YY-1kvFEg%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/brainGraph-help/2F9F44C3-283C-469F-AF11-ED05DCD773CA%40monash.edu.
--
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-he...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/brainGraph-help/425BE415-3FDB-4AF3-8CA2-00DDA6CD2BB7%40monash.edu.
On 1 Oct 2020, at 4:17 pm, Chris Watson <cwa...@alum.mit.edu> wrote:
I will need the "corrs" data, then.If you want to get the normalized measures from random graphs right away, you can edit the function and comment out the line calling "get_rand_attrs", since that is causing the error.Otherwise, it will have to wait until I post a bugfix update.Chris
On Thu, Oct 1, 2020 at 1:13 AM 'Gershon Spitz' via brainGraph-help <brainGr...@googlegroups.com> wrote:
Hi Chris,Sorry to confuse, what I am trying to do is only use the vertices in the ‘limbic’ network to obtain graph vertex-level measures.Ie., using the following code.
regions.limbic <- get(atlas)[lobe == 'Limbic', name] g.limbic <- lapply(seq_along(densities), function(x) make_brainGraphList(corrs[x], atlas = 'Schaefer2018_400Parcels_7Networks', modality='thickness', subnet=regions.limbic))The error is that I cannot create the graphs.I receive the error:
<Screen Shot 2020-10-01 at 4.10.14 pm.png>
To view this discussion on the web visit https://groups.google.com/d/msgid/brainGraph-help/CAHVz74hqMBjO1oNsnFp7Gnqr7tUXg66F7AKw3Kn4Mz%2Bi%3D2-DoA%40mail.gmail.com.
--
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-he...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/brainGraph-help/425BE415-3FDB-4AF3-8CA2-00DDA6CD2BB7%40monash.edu.
To view this discussion on the web visit https://groups.google.com/d/msgid/brainGraph-help/CAHVz74imrP1dubryTO8EoTkrXgB2vjdwAr_mz3jyij0JFGrVUQ%40mail.gmail.com.