cwatson / brainGraph

Graph theory analysis of brain MRI data
166 stars 48 forks source link

brainGraph_permute issue with custom Atlas #10

Closed giova1588 closed 5 years ago

giova1588 commented 5 years ago

Hi, thanks for developing this great R package! I have an issue running the script "brainGraph_permute", in particular when running the script the output is: error in { task 3 "atlas name "Gordon333dil" not found I followed all the previous steps in the guide to build a custom atlas, successfully because all previous analysis and graph building were fine and correct. Also the bootstrapping was ok, but wen i run this command: brainGraph_permute(densities, all.dat.resids, perms = myPerms, level = "graph", atlas=atlas) the output is the error i mentioned above. In my Global Env Var there are either ATLAS variable (character one "gordon333dil") and the gordon333dil (that is the data.table of my custom atlas). Do you have any suggestion?

Thanks

cwatson commented 5 years ago

Hi, in the error, the atlas name is capitalized (as Gordon333dil) but you say that in the global environment it is lowercase gordon333dil. My first attempt would be to change that and see if it works.

giova1588 commented 5 years ago

This is the error: Error in { : task 3 failed - "object "gordon333dil" not found" without capital letter, i apologize for the inaccuracy.

cwatson commented 5 years ago

Ok. And if you type get(atlas) in the interpreter, before/after the function call/error, does it print a portion of the object?

giova1588 commented 5 years ago

Yes, it print my custom atlas correctly

cwatson commented 5 years ago

If you send me the requisite data to run the function, I can debug it on my end. It is possible that, since get(atlas) is called within the foreach loop, the full environment isn't being passed, and so it can't find your atlas.

giova1588 commented 5 years ago

Wow the problem seems to be WINDOWS! I am not a pro user of snow/doSNOW, maybe i did't set them in the right way....by the way i shift to another PC with Ubuntu and the permute function run correctly, without any issue of atlas missing. Thanks for your help!

cwatson commented 5 years ago

Oh, that's good to know. I am working on a major update to the package (for the near future) which should alleviate this kind of issue, but I will make a note of it in the User Guide. I will close the issue, but please re-open if you continue to experience issues.