sccn / EEG-BIDS

21 stars 17 forks source link

bids_export: preserve specified participant_id with no other pInfo #105

Closed chriscline closed 2 years ago

chriscline commented 2 years ago

When trying to export a dataset with specified participant_ids without any additional column in pInfo and createids='off', bids_export unexpectedly overrides with new anonymized ids in the subject folders and .set filenames but not participants.tsv. For example with pInfo = {'participant_id'; 'control01'; 'control02'}.

Workaround: add an extra column to pInfo.

Cause: The participant_id column is removed from pInfo here: https://github.com/sccn/bids-matlab-tools/blob/c64ed18628f671b6ad2ca91bb290ebe4b9a849f3/bids_export.m#L436 If there are no other columns in pInfo, then this code https://github.com/sccn/bids-matlab-tools/blob/c64ed18628f671b6ad2ca91bb290ebe4b9a849f3/bids_export.m#L601 incorrectly concludes that participant_ids were not specified.

dungscout96 commented 2 years ago

Thanks for reporting. Fixed in 1b99353