I see a couple of people have previously posted about the CENA plug-in not working and were offered the 'fix' by the CENA lab. (I believe this has been incorporated into Brainstorm now anyway.) I've been in touch with CENA again and they think that the problem is due to to changes to MATLAB since the plug-in was first devised. I'm wondering whether anyone has been able to get the plug-in to run in Brainstorm, maybe by modifying the script or something. If so, would you be prepared to share your solution? I would be really grateful if someone can help!
Hello, Val and Francois. We apologize for the ongoing installation bugs in CENA. We have gone through a few different iterations of our development team since the initial release, and we're planning to bring in a dedicated developer on the project soon who is best suited to properly fixing issues in the code, tracking changes, versioning, and providing consistent updates. As I am not a software developer myself, I'm afraid I'm limited in my own expertise on all of this, but I'll try to help as best as I can in the meantime.
As far as these failed installs, I have been addressing this by sharing the source tarfile that was failing to download properly from the buggy CENA install function.
Please contact me directly to request the tarfile, as CENA is distributed by request.
georgem@uchicago.edu
Here are the instructions that should work for manual install:
Unpack the tarfile that contains the processes for CENA. You should be able to use a utility like WinZip on Windows; the Mac finder should unpack it directly, or you can use tar -xf [tarfile] from the command line.
The contents of the tarfile should be placed in the brainstorm process directory appropriate to your OS:
(on Mac) /Users/[your username]/.brainstorm/process
(on Windows) C:\Users[your username].brainstorm\process
(on Linux) /home/[your username]/.brainstorm/process
nb: .brainstorm is likely to be a hidden directory on your system, so you may have to "show hidden" or navigate through a utility where you can enter the path directly.
Restart Matlab and Brainstorm, and the CENA processes should appear in the process selection menu of the pipeline editor.
Please note that I personally have not debugged this process on Windows, but I have implemented it on Linux and Mac platforms. I cannot guarantee it will work with the Matlab Runtime Compiler in lieu of a full version of Matlab.
I cannot guarantee it will work with the Matlab Runtime Compiler in lieu of a full version of Matlab
This I can guarantee it won't work.
To have something running in the compiled version of Brainstorm, it has to be compiled at the same time. The compiled programs cannot execute additional .m scripts.
Thanks for the detailed instructions and the new tarfile.
However, I don't have a 'process' directory in my .brainstorm folder. I do have the pathway brainstorm3 > toolbox > process > functions; should the CENA files go somewhere in there? Most of the existing brainstorm process files are in the 'functions' folder and a few are in the 'process' folder.
Does the process_cena_pub_src folder go in the same place? And as a complete folder, or should the contents be extracted first?
I haven't experimented, in case I make a hash of it So your help or Francois's would be most welcome!
This one should be created automatically when starting Brainstorm...
What do you see in this .brainstorm folder?
What you get if you execute "bst_get('UserProcessDir')" from the Matlab command window (while Brainstorm is open)?
I do have the pathway brainstorm3 > toolbox > process > functions; should the CENA files go somewhere in there? Most of the existing brainstorm process files are in the 'functions' folder and a few are in the 'process' folder.
Don't add anything to this folder, or it would go away at the next Brainstorm update.
Does the process_cena_pub_src folder go in the same place? And as a complete folder, or should the contents be extracted first?
Hi, Val. You can try creating the process directory in your [home]/.brainstorm path. This should be created when you try to run CENA installer initially, but it seems it's failing to do so.
Then try placing the unpacked contents of the tarfile there (including process_cena_pub_src as an intact directory with the scripts it contains.) Then restart Matlab and Brainstorm and see if the CENA tools appear in your pipeline editor in Brainstorm.
I've attached a screenshot of an example install path for reference. Let me know if this works.
Ah! Thanks, Francois. Executing "bst_get('UserProcessDir')" indicated a .brainstorm folder on my C-drive that holds all the relevant folders. Whereas all other Brainstorm folders, including the false .brainstorm, are on the D-drive.
I wonder if this situation arose because I started out using a Matlab runtime compiler and then changed to the full Matlab platform? I have no idea. But I assume it's safe to delete the false folder now.
And thank you, George, for the very helpful screenshot. Once I've set up everything and tried CENA, I'll let you know how it goes.
I appreciate the time and attention you both have given to this.
I placed the CENA files as shown by George & restarted Matlab & Brainstorm. Unfortunately, I now get the following messages on start-up:
BST> Starting Brainstorm:
BST> =================================
BST> Version: 26-Aug-2019
BST> Compiling main interface files...
BST> Emptying temporary directory...
BST> Deleting old process reports...
BST> Loading configuration file...
BST> Checking internet connectivity... ok
BST> Update available online: 12-Sep-2019
BST> Initializing user interface...
BST> Starting OpenGL engine... hardware
BST> Reading plugins folder...
*** WARNING: In function: process_cena_pub_src_bootstrap.m at line 9
*** The process API changed, due to modifications in Matlab 2016b.
*** Replace "macro_methodcall;" with "eval(macro_method);"
*** at the beginning of all your Brainstorm functions.
*** WARNING: In function: process_cena_pub_src_makediff.m at line 9
*** The process API changed, due to modifications in Matlab 2016b.
*** Replace "macro_methodcall;" with "eval(macro_method);"
*** at the beginning of all your Brainstorm functions.
*** WARNING: In function: process_cena_pub_src_multiple.m at line 9
*** The process API changed, due to modifications in Matlab 2016b.
*** Replace "macro_methodcall;" with "eval(macro_method);"
*** at the beginning of all your Brainstorm functions.
*** WARNING: In function: process_cena_pub_src_single.m at line 9
*** The process API changed, due to modifications in Matlab 2016b.
*** Replace "macro_methodcall;" with "eval(macro_method);"
*** at the beginning of all your Brainstorm functions.
The 'process_cena_pub_src' folder and its contents appeared greyed out in the Current Folder panel of Matlab, and CENA does not appear as an option in the pipeline editor.
Matlab changed abruptly some specifications in 2016b without any anticipation, and it caused all our process functions to stop working. We had to modify our plug-in API because of this.
The CENA processes haven't been updated to adapt to these changes apparently. It probably means that no one tried to use them with any recent version of Matlab.
@ValR
You could try editing all the process functions according to what the error message suggests.
@georgemonteleone
If this is really not working, you should probably add a warning at the top of your tutorial page (https://neuroimage.usc.edu/brainstorm/Tutorials/MicrostatesCena), saying that the software is currently not available.
I will remove the CENA processes temporarily from the Brainstorm distribution, please let me know when this is back to a working state.
Is it possible to say when - or even if - the plug-in will be updated? Just a ball-park figure would be really helpful! I was intending to conduct an ERP microstates analysis for my PhD, but I'll need to do a different study if CENA is not likely to be updated in the near future.
@ValR we are planning to get a developer on the project as soon as possible, but until we have that underway we won't be able to provide a definitive timeline. My goal is to have CENA's automated update / install functionality back to normal before the end of October -- hopefully we can get there.
Maybe your issue has to do with Runtime, or maybe it's Windows specific. I just made some minor updates to our functions and did the manual process folder install from scratch on my end and it works (however, I'm on Linux, not Windows.)
Let's try something more to see if we can fix your issues:
See attached zip file. I simply updated these scripts to remove the "macro_methodcall" error. This should not have been breaking the functions, but at the very least it should remove that warning.
Clear the old contents of your [home]/.brainstorm/process folder.
Unzip this file. Put the contents of CENA-pub-latest_19-09-18 into the above listed process folder.
Start Matlab and brainstorm. Check for warnings and errors on startup. If you get any errors, take a screenshot and post it here.
In the event that everything functions, in order to run CENA, you need to have a file in the "files to process" window in Brainstorm -- otherwise the Microstates menu will be grayed out. See attached screenshot for an example of proper functionality.
If you run into more problems, post a screenshot of your folder structure and contents of the [home]/.brainstorm/process folder here so I can help troubleshoot, along with any relevant screenshots from the Brainstorm interface, process menu, etc.
Hi @georgemonteleone, I just wanted to get an update and see where I can download the latest version of CENA for microstate analysis. Is the zip file you posted above ready to use? And are there any tutorials or README files to help understand what functions I would need to call?
Thanks!
Amna
Hello, Amna. It looks like we have solved the problem on the back end and we're almost ready to host the CENA updater via Brainstorm again. Hoping to have it ready by the end of the month.
You can refer to the zip file and instructions in my earlier post if you want to try a manual install.