MNE BIDS MEG Anonymization: Difference between revisions

From MEG Core
Jump to navigation Jump to search
Content added Content deleted
 
(4 intermediate revisions by the same user not shown)
Line 3: Line 3:
= Introduction to Import/Upload Process =
= Introduction to Import/Upload Process =
Datasets must be organized prior to anonymization. <br>
Datasets must be organized prior to anonymization. <br>
Several organizational options will be provided to assist in recognizing the datasets. <br>
Several organizational options will be provided to assist in recognizing and linking the datasets. <br>
There are a variety of options ranging from extensive renaming of files to manipulating search expressions (choose the option most appropriate for your lab)
There are a variety of options ranging from extensive renaming of files to manipulating search expressions (choose the option most appropriate for your lab)
Prior to anonymization - a "master_list" will be created linking the appropriate input information.
Prior to anonymization - a "master_list" will be created linking the appropriate input information.
Line 23: Line 23:


= Data Curating before anonymization =
= Data Curating before anonymization =
This data curation will be important to generate a Master_List.csv file that will be used to perform the anonymization. <br>
The Master_List.csv will link the subject MRI, subject MEG Rest Dataset, MEG EmptyRoom Dataset, coreg transform. <br>
The <b> Master_List.csv IS NOT ANONYMIZED</b>, so do not share with the NIH or other outside groups. <br>
After the Master_List.csv is generated, Step 2 will validate the Master_List and return errors/warnings when data cannot be found. <br>
If a few errors are generated, these can be fixed directly on the Master_List.csv. If most/all of the datasets throw errors, the data curation may need to be changed.


== OPTION 1 ==
== OPTION 1 ==
This option requires the most space/manual labor, but is easy to troubleshoot <br>
Organize all data into the same folder.

All MRIs must be of .nii or .mgz
Copy all data into a single folder using the following format:<br>
All MRIs must be of .nii or .mgz <br>
All MEG datasets must be single files or directories: .ds, .fif, .sqd, 4D-dataset (?)
All MEG datasets must be single files or directories: .ds, .fif, .sqd, 4D-dataset (?)


MRIs and MEG datasets must have the same prefix.
MRIs and MEG datasets must have the same prefix.
EG - Subj1.ds Subj1.nii OR LastName_FirstName.fif LastName_FirstName.nii OR
EG - Subj1.ds Subj1.nii OR LastName_FirstName.fif LastName_FirstName.nii



== OPTION 2 ==
Create a link file (csv format) that links the MEG subjectID to the MRI subjectID <br>
Provide the top level MEG path <br>
Provide the top level MRI path <br>


== OPTION 3 ==
Manually generate the Master_List.csv by hand using the template csv. <br>
Troubleshooting can be tedious due to typing errors in the path.




== OPTION # ==
This option requires the most knowledge to troubleshoot string parsing, but is the most flexible <br>


Using a dictionary enter the search strings to extract the meg_path, mri_path, subjid etc: <br>
====For admin setup====
# From the mne docker website -- https://github.com/mne-tools/mne-docker
singularity pull docker://ghcr.io/mne-tools/mne-python-jupyter:main

Latest revision as of 10:35, 31 August 2021

UNDER CONSTRUCTION

Introduction to Import/Upload Process

Datasets must be organized prior to anonymization.
Several organizational options will be provided to assist in recognizing and linking the datasets.
There are a variety of options ranging from extensive renaming of files to manipulating search expressions (choose the option most appropriate for your lab) Prior to anonymization - a "master_list" will be created linking the appropriate input information.

Setup Container

 #This installs mne_docker / mne-bids / mne-bids-pipeline
 git clone git@tako:mne_singularity
 cd mne_singularity 
 sudo singularity build singularity_build.sif singularity_build.def 

Link freesurfer or build from singularity:

 ln -s PATH_TO_FREESURFER ./freesurfer


Create Head Surface to view anonymization

 #Create 
 enigma/import/import_mri.sh


Data Curating before anonymization

This data curation will be important to generate a Master_List.csv file that will be used to perform the anonymization.
The Master_List.csv will link the subject MRI, subject MEG Rest Dataset, MEG EmptyRoom Dataset, coreg transform.
The Master_List.csv IS NOT ANONYMIZED, so do not share with the NIH or other outside groups.
After the Master_List.csv is generated, Step 2 will validate the Master_List and return errors/warnings when data cannot be found.
If a few errors are generated, these can be fixed directly on the Master_List.csv. If most/all of the datasets throw errors, the data curation may need to be changed.


OPTION 1

This option requires the most space/manual labor, but is easy to troubleshoot

Copy all data into a single folder using the following format:
All MRIs must be of .nii or .mgz
All MEG datasets must be single files or directories: .ds, .fif, .sqd, 4D-dataset (?)

 MRIs and MEG datasets must have the same prefix.   
 EG - Subj1.ds  Subj1.nii   OR  LastName_FirstName.fif  LastName_FirstName.nii  

OPTION 2

Create a link file (csv format) that links the MEG subjectID to the MRI subjectID
Provide the top level MEG path
Provide the top level MRI path

OPTION 3

Manually generate the Master_List.csv by hand using the template csv.
Troubleshooting can be tedious due to typing errors in the path.


OPTION #

This option requires the most knowledge to troubleshoot string parsing, but is the most flexible

Using a dictionary enter the search strings to extract the meg_path, mri_path, subjid etc: