Analysis ignoring subgroup Tags

Hi Francois

I did my main analysis on 3 groups (HLG_MLD, HLG_MOD, CG). When running a Perm test for this analysis I would get a results file labelled in this format;

Perm t-test equal [0ms,1000ms EEG]: Avg: 11_right | bl | _HLG_MLD (20) vs. Avg: 11_right | bl | _CG (15)

I wanted to do some analyses on subgroups so I split these three groups according to median accuracy of overall sample (HGH vs LOW) creating 6 groups by adding tags HGH and LOW. I am now trying to amend my main analysis (i.e. Perm tests ignoring HGH v LOW subgroups), but when I run a Perm test I get labels in this format on my results file;

Perm t-test equal [0ms,1000ms EEG]: 20 files (20) vs. 15 files (15)

To correct for the new tags I tried running a script, where after calling the sFiles, I then delete the subgroup tags in the files retrieved from the Comment field. The relevant section is below.

% Process: Select files using search query
sFiles = bst_process('CallProcess', 'process_select_search', [], [], ...
'search', '(([name CONTAINS "Avg"] AND [path CONTAINS "Subject"]))');

for t1 = 1:length(sFiles)

sFiles(t1).Comment = strrep(sFiles(t1).Comment,' | _HGH', '')
sFiles(t1).Comment = strrep(sFiles(t1).Comment,' | _LOW', '')

end

I then called the relevant files from this pool 'sFiles' using;

% Process: Select file names with tag:
sFiles1 = bst_process('CallProcess', 'process_select_tag', sFiles, [], ...
'tag', HL_Group{k});
sFiles1 = bst_process('CallProcess', 'process_select_tag', sFiles1, [], ...
'tag', Outcome{j});

% Process: Select file names with tag:
sFiles2 = bst_process('CallProcess', 'process_select_tag', sFiles, [], ...
'tag', 'CG');
sFiles2 = bst_process('CallProcess', 'process_select_tag', sFiles2, [], ...
'tag', Outcome{j});

But sFiles1 and sFiles 2 have the tags HGH and LOW included in the Comment field and the resulting Perm test file comes out without the group details, the same as the second format above. Could you advise how I can correct for this? Is there another field I need to delete the subgroup tags from?

These variables sFiles are not objects that detect and propagate the changes you make on them to the hard drive or the database. These are simple metadata structures that exist only within the scope of your personal Matlab script. Modifying the Comment field in your script has no impact on the files in your database.

You could rename (= modify the the Comment field in the .mat files + reloading the database) your initial files (inputs to the perm test process) in order to get something more meaningful in output of the test process. Or rename the output of the perm test.

To rename a file, you can:

That makes sense, thank you. I had though once I changed the names in the sFiles variables and ran the perm test on sFiles, within the same script, that the output would generate the name for the Perm test file from this metadata. Probably the easiest way to do it is to use the add tag function after running the perm test so that the output includes the titles I want rather than changing the input files in the database?

Also, regards the meta-data, I can see under one of the fields (sFiles.FileName.F) a spreadsheet for the voltage values stored across the time window for each channel. When the data is filtered for certain frequencies the voltage changes. How are the different voltage values for different frequencies stored within this data?

No. The process execution reads again the file. Only the FileName field from the sFiles variable is used.

Probably the easiest way to do it is to use the add tag function after running the perm test so that the output includes the titles I want rather than changing the input files in the database?

Probably. Or the process "Set name".

How are the different voltage values for different frequencies stored within this data?

Within one file of the type "data", you have only one value stored for each sensor and each time point. It's up to you to keep track whether what is in there are broadband or filtered signals.