Repository navigation
Expand file tree
/
Copy pathpersonalDataPath_bidsconvert_example.m
More file actions
73 lines (57 loc) · 3.03 KB
/
Copy pathpersonalDataPath_bidsconvert_example.m
File metadata and controls
73 lines (57 loc) · 3.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
function cfg = personalDataPath_bidsconvert_example(varargin)
% function that contains local data path, is ignored in .gitignore
% This function is an example!! You should make your own
% personalDataPath_bidsconvert.m where you fill in the correct
% repositories.
% This personalDataPath_bidsconvert.m is ignored in .gitignore and will
% never be visible online!
if ~isempty(varargin{1})
if isstruct(varargin{1})
if sum(contains(fieldnames(varargin{1}),'sub_labels'))
if contains(varargin{1}.sub_labels,'RESP')
% SPES
foldername = input('Choose SystemPlus-folder: testomgeving, RESPect_spes_scratch, RESPect_chronic_ECoG_trc: ','s');
if strcmp(foldername,'testomgeving')
cfg(1).proj_dirinput = '\folder\to\ieeg-files\testomgeving\patients\';
elseif strcmp(foldername,'RESPect_spes_scratch')
cfg(1).proj_dirinput = '\folder\to\ieeg-files\RESPect_spes_scratch\patients\';
elseif strcmp(foldername,'RESPect_chronic_ECoG_trc')
cfg(1).proj_dirinput = '\folder\to\ieeg-files\RESPect_chronic_ECoG_trc\patients\';
else
error('Foldername is not recognized')
end
end
cfg(2).proj_dirinput = '\folder\to\ieeg-files\chronic_ECoG\';
cfg(1).proj_diroutput = '\folder\to\BIDS-files\chronic_ECoG\';
cfg(2).proj_diroutput = '\folder\to\BIDS-files\CCEP\'; % optional: this could remain empty
elseif contains(varargin{1}.sub_labels,'REC2Stim') % REC2Stim
cfg(1).proj_dirinput = '\folder\to\ieeg-files\REC2Stim\patients\';
cfg(2).proj_dirinput = '\folder\to\BIDS-files\REC2Stimstudy\';
cfg(1).proj_diroutput = '\folder\to\BIDS-files\REC2Stimstudy\';
elseif contains(varargin{1}.sub_labels,'PRIOS') % prios study
cfg(1).proj_dirinput = '\folder\to\ieeg-files\PRIOS_study\patients';
cfg(2).proj_dirinput = '\folder\to\BIDS-files\PRIOS_study\';
cfg(1).proj_diroutput = '\folder\to\BIDS-files\PRIOS_study\';
end
pat = [input('What is the PAT-folder in micromed database? [PAT_XXX] ','s'),'\'];
cfg(1).pathname = fullfile(cfg(1).proj_dirinput,pat);
end
end
if contains(fieldnames(cfg),'no_fieldtrip')
cfg.fieldtrip_folder = '\folder\to\fieldtrip\';
% copy the private folder in fieldtrip to somewhere else
cfg.fieldtrip_private = '\folder\to\fieldtrip_private\';
%%add those later to path to avoid errors with function 'dist'
rmpath(cfg.fieldtrip_folder)
rmpath(cfg.fieldtrip_private)
else
fieldtrip_folder = '\folder\to\fieldtrip\';
% copy the private folder in fieldtrip to somewhere else
fieldtrip_private = '\folder\to\fieldtrip_private\';
end
jsonlab_folder = '\folder\to\jsonlab\';
addpath(fieldtrip_folder)
addpath(fieldtrip_private)
addpath(jsonlab_folder)
ft_defaults
end