Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

multi-session recording anatomy (make_meg_bids.py) #35

Open
LinaTeichmann1 opened this issue Mar 21, 2023 · 1 comment
Open

multi-session recording anatomy (make_meg_bids.py) #35

LinaTeichmann1 opened this issue Mar 21, 2023 · 1 comment
Labels
enhancement New feature or request question Further information is requested

Comments

@LinaTeichmann1
Copy link
Collaborator

LinaTeichmann1 commented Mar 21, 2023

Hi @jstout211,

I was trying to run make_meg_bids.py for data acquired in multiple sessions. Everything works fine for the MEG data, however, it is also trying to make an "anat" folder in every session folder. This part fails as soon as you get to session 2 because the files for that same participant exist already in the bids_prep_temp folder.
I wonder whether it would make sense to either copy over the "anat" folder to all sessions or have anat outside of each session folder? Or is there a way to add a flag so it ignores that there is a duplicate file?

ERROR: You are trying to re-run an existing subject with (possibly)
 new input data (-i). If this is truly new input data, you should delete
 the subject folder and re-run, or specify a different subject name.
 If you are just continuing an analysis of an existing subject, then 
 omit all -i flags.
Traceback (most recent call last):
  File "/Users/teichmanna2/anaconda3/envs/mne13/bin/make_meg_bids.py", line 441, in <module>
    trans_fname = make_trans_mat(mri=nii_mri, subjid=subjid, 
  File "/Users/teichmanna2/anaconda3/envs/mne13/bin/make_meg_bids.py", line 193, in make_trans_mat
    trans_dir.mkdir()
  File "/Users/teichmanna2/anaconda3/envs/mne13/lib/python3.10/pathlib.py", line 1175, in mkdir
    self._accessor.mkdir(self, mode)
FileExistsError: [Errno 17] File exists: '~data/bids_prep_temp/trans_mats/S02'

Thanks,
Lina :)

EDIT: actually now that I'm thinking about it, copying wouldn't make sense because the electrode files are different right? So maybe we'll just need to delete the bids_prep_temp folder after every session?

@LinaTeichmann1 LinaTeichmann1 added enhancement New feature or request question Further information is requested labels Mar 21, 2023
@jstout211
Copy link
Contributor

Yeah - I have run into this already. Like you mentioned the trans_mats folder can be deleted to have the process continue on. Alternatively - I can build out that folder to be more "bids" like and have a subj/session folder structure.

I can look into it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants