Commit 35d81f2b authored by James Desjardins's avatar James Desjardins
Browse files

Updates the parsing of files with -'s in their name.

parent 0575e08e
......@@ -94,6 +94,10 @@ if ~strcmp(job_struct.batch_config.software, 'none') ...
'mount_archive', job_struct.context_config.mount_archive, ...
'mount_work', job_struct.context_config.mount_work, ...
'scheduler', job_struct.batch_config.exec_func(4:end));
%BIDS standard file names have "-" characters... these need to be
%changed to "_" in order for the m file to be executable.
job_struct.batch_config.mfile_name(strfind(job_struct.batch_config.mfile_name,'-'))='_';
if strcmp(job_struct.batch_config.software, 'none');
batchStr = ['system(''', strtrim(batchStr), ''')'];
......@@ -127,6 +131,12 @@ if ~strcmp(job_struct.batch_config.software, 'none') ...
if length(c_mfn) >= 64
error('Script name too long! Please change your job name config.')
end
%BIDS standard file names have "-" characters... these need to be
%changed to "_" in order for the m file to be executable.
c_mfn(strfind(c_mfn,'-'))='_';
%job_struct.m_fname{bfni}=c_mfn;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%WRITE M FILE TO LOG PATH...
fidM = fopen(fullfile(job_struct.context_config.log, ...
......
......@@ -37,6 +37,10 @@ function dimensions = ef_get_eegdims(dfpath, dfname)
allDims = struct();
end
[~,name,~] = fileparts(dfname); % remove extension so filename can be used as a field (no '.' allowed)
%BIDS standard file names have "-" characters... these need to be
%changed to "_" in order for the m file to be executable.
name(strfind(name,'-'))='_';
if ~isfield(allDims, name)
EEG_temp = pop_loadset('filename', dfname,'filepath', dfpath, 'loadmode', 'info');
allDims.(name) = struct('channels', EEG_temp.nbchan, 'samples', EEG_temp.pnts);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment