Error loading brainstorm protocol between local machine and network VM

Hi brainstorm experts,

I have protocols that was created in our Windows virtual machine and half way through analyses I switched to use my local Mac for group analyses because it was easier to create figures on my local Mac. However, the database/protocols all live in our network drive which was mounted differently in my local Mac and the Windows virtual machine.

So I realized that I can no longer load the protocols in my Windows virtual machine. I switch to use my local Mac to analyze the data for a while because none of the subjects can be loaded and viewed in Windows VM. Recently there might be some paths changed for our network database (IT controlled it so I have no way to control that), I can no longer add or analyze new subjects into my protcocol in my local Mac brainstorm. I would like to know how this problem can be solved. Please let me know what information you will need. Thank you! I can shared the protocol data using a dropbox link.

Yuhan

By the way, here is the error message when I tried to load a new dataset in my local Mac.

Changing paths and mounting the same protocols from multiple points and multiple operating system is indeed not recommended... All these operations might have broken some links. Brainstorm is not multiuser, you should never try to work on the same files from different computers or even different user accounts.

If no files were deleted or damaged, you should be able to find a way to restore your database.

  • Detach the protocols from all the Brainstorm installations (menu File > Delete protocol > Only detach from database).
  • Delete the file protocol.mat from the data subfolder of the protocol you want to reload (some sort of cache of the hard drive contents).
  • Load again the protocol again with the menu File > Load protocol > Load from folder (it should rebuild the database structure from the files, instead of using the possibly corrupted protocol.mat).
  • You could also try resetting all the Brainstorm preferences (File > Edit preferences > Reset).

If this doesn't work, you might have had more damage to the files in the database. Hopefully you have a full backup of your database so you will be able to recover your files (if you don't, it's time to set something up urgently).

Hi Francois,

I tried your method before (resetting brainstorm preferences did not work). However, after loading the protocol, even though the list of subjects showed up for both anatomy and functional data, only the anatomy has data existed in each subject folder, but not the functional data. The functional data exists in the brainstorm_db/protocol/data/ID/ folders, but it doesn't show up in brainstorm GUI. So I was wondering if the mat file in each folder has broken links.

Please let me know what I can do next. I believe all the data are still there in the database because I can load all the data in the brainstorm from my local Matlab in Mac.

Thanks!
Yuhan

Hi Francois,

Additional information - some problems come from the file path of the MEG raw data. In each subject's data folder, the filename in the data_*.mat file has the path from Mac instead of Windows. I believe that probably causes some but might not be the only reason that causes the problems. The raw data lives in the same network drive but they will have different paths when mapping them from a Windows virtual machine or mapping them from a Mac.

I can probably write something to change the path in each subject's data folder, but before I do that I want to know if there is anything else I should also check. Please let me know what's the best way for me to have you help me check the structures of the protocols.

Thanks!
Yuhan

I'm sorry, I won't be able to help you much with this issue, as I have no idea what you did to your files with all these cross-mounting operations...
You might have to move some files around in order to get back to a correct Brainstorm file structure, and then load the protocol again after deleting the protocol.mat file. The typical file structure is described in the introduction tutorials:
https://neuroimage.usc.edu/brainstorm/Tutorials/ExploreAnatomy?highlight=(%40intra)#Interaction_with_the_file_system

Or start over from your last backup, this is probably the easiest solution...

OK thank you. Let me see if I can just fix certain paths in each mat file first and move around the folder. It seems like the folders were not correctly created.

For future reference, do you recommend not to use brainstorm in a VM on network shared drive? In this case multiple users can also access the same protocol but I don't know if this is also not recommended. Please let me know. Our VM and network cluster are more powerful so usually we don't analyze data on local PC.

Thanks!
Yuhan

There is no problem with having Brainstorm set up on a VM with the database mounted on a network drive, I've set this up multiple times.
I think the problem in your case is to have mounted the same shared database simultaneously on multiple OS with different paths...

The current implementation of the Brainstorm database is not robust for multiple users to work on the same files at the same time. There are no mechanisms to protect files between users, or to reload the changes when there is a modification somewhere else. It is not recommended to have multiple users working on the same protocol at the same time. If some collaborative work is done sequentially, each user has to reload the entire protocol regularly to ensure all the changes from the others are taken into account.