Anonymize & Upload EDFs to ieeg.org¶
What this page tells you
Anonymize Mxene EDFs on cnt1 with anonymize_edfs.sh (-n, -i, -d, -o required; date-shifts to 1/1/2000), create an ieeg-dataset.ini channel mapping, then upload the deid folder with ieeg upload-directory.
Mxene EEG Processing/Uploading¶
- move EDF file into cnt-fs
- For Mxene EEG:
/eeg_raw/Mxene_project/RIDXXXX/original
- For Mxene EEG:
- de-identify EDF file
- Open Mobaxterm, and in cnt1, navigate to
/project/eeg_process/programs/edf_anonymize - in the command line run
bash anonymize_edfs.sh -n NAME -i ID -d DIRECTORY_INPUT -o DIRECTORY_OUTPUT -a ADD_DATE -s SUBTRACT_DATE- This will create a new EDF file with anonymized headers
- the de-identified file will be named
<original_filename>_deid.edf
- the de-identified file will be named
- Options
-n: Removes the patient name from the header and replaces with a new name specified here. I recommend inputtingdeid-i: Removes the patient ID from the header and replaces with a new ID specified here. I recommend inputtingdeid-d: The path to the source directory where the EDF is stored. E.g./mnt/cnt-fs/eeg_raw/Mxene_project/RIDXXXX/original-o: The path to the output directory where the deid EDF will be stored. E.g./mnt/cnt-fs/eeg_raw/Mxene_project/RIDXXXX/deid-a: The default behavior will date shift the recording date of the EDF to 1/1/2000. Instead, if you would like to date shift by adding days to the original recording date, input the number of days you would like to add-s: The default behavior will date shift the recording date of the EDF to 1/1/2000. Instead, if you would like to date shift by subtracting days from the original recording date, input the number of days you would like to subtract
- The
-n,-i,-dand-oflags are mandatory. It will error if any of these are missing - The
-aand-sflags are optional. By default, without these parameters the code will date shift the EDF to 1/1/2000, and this is generally recommended. If both parameters are included accidentally, then the code will error.
- This will create a new EDF file with anonymized headers
- Open Mobaxterm, and in cnt1, navigate to
- create the
ieeg-dataset.inichannel mapping file- copy the
ieeg-dataset.initemplate file and paste into cnt-fs/eeg_raw/Mxene_project/RIDXXXX/deid - open the
ieeg-dataset.inifile through Notepad, and edit the channel mappings as needed for the EDF recording- Template:
channels=Fp1,Fp2,F7,F8,.... - Notes:
- Each channel is separated by a comma. Be sure that there are no spaces between each channel
- The order of the channels matter! This will determine the order of the channels in ieeg.org
- If you need to rename a channel, it will look like this:
channels=FP1:Fp1,FP2:Fp2,F7,F8,T3:T7,T4:T8,....- The old channel name is specified to the left of the colon, and the new channel name is specified to the right of the colon
- DO NOT rename the
ieeg-dataset.inifile or else the upload process will error
- Template:
- copy the
- upload the deid edf folder to ieeg.org
- make sure the
<original_filename>_deid.edffile and theieeg-dataset.inichannel mapping file are both in the cnt-fs/eeg_raw/Mxene_project/RIDXXXX/deiddirectory, and no other files are in there - In cnt1, navigate to
/project/eeg_process/programs/ieeg-cli-1.14.60 - run
./ieeg upload-directory -n 'Human_Data/Hospital of the University of Pennsylvania/Mxene/RIDXXXX' '/mnt/cnt-fs/eeg_raw/Mxene_project/RIDXXXX/deid' - check ieeg.org and verify the EDF looks good
- make sure the