Trying to exclude a file from MRS Container

Hello!
I have processed a batch of SVS PRESS 30 data and am trying to exclude a few bad files from the container. Someone showed me on an older version of Osprey to select the file in the MRS Container you want to exclude and then press the left arrow key, however it isn’t working in the 2.4.0 version. The pop up window in Osprey with ‘Exclude Specta’ as the title and an incomplete progress bar for ‘Call OspreyQuantify’ shows up and Matlab produces this error. (I apologize if this has already been addressed elsewhere an I missed it.)

Timestamp August 19, 2022 13:19:29 Osprey 2.4.0 OspreyQuantify

Quantifying dataset 1 out of 50 total datasets…
Error using matlab.ui.control.UIControl/set
Invalid or deleted object.

Error in printLog (line 209)
set(progressText,‘String’ ,sprintf(‘Quantifying dataset %3i out of %3i total datasets…\n’, kk, nDatasets));

Error in OspreyQuantify (line 179)
[~] = printLog(‘OspreyQuant’,kk,1,MRSCont.nDatasets,progressText,MRSCont.flags.isGUI ,MRSCont.flags.isMRSI);

Error in osp_WindowKeyDown (line 73)
MRSCont = OspreyQuantify(MRSCont);

Error while evaluating UIControl KeyPressFcn.

Thank you!
Bethany

Hi @bstennett,

Did you finish the full analysis pipeline first so that you are able to see the overview plots?

Afterward, you should be able to click into the listbox in the GUI and remove subjects by pressing left arrow. I’ve just tested it, and it worked fine for me. Let me know if it is still not working on your machine.

Best,
Helge

Hi @Helge,

I am still having the same problem. I reran some data all the way through the entire pipeline and then tried to exclude from the listbox. A line will appear through the file name in the box (as if it were excluded), the small external window with the progress bar stays up, the data is not actually excluded from the overview plots, and Matlab displays an error. I am using a Mac, not sure if that would be the issue. This isn’t a huge issue, it would just be nice to be able to exclude there in the container to save out the plots.

Thanks!
Bethany

Hi @bstennett,

Mac shouldn’t be the issue here as we are developing mainly on mac. However, it is hard to debug this problem if I’m not able to reproduce it. You could try loading the MRSContainer from the output folder manually and then add the subjects to exclude like this (to remove sub 2,5, and 8):

MRSCont.exclude = [2, 5, 8];

Afterward rerun Quantfiy and Overview and open the GUI:

MRSCont = OspreyQuantify(MRSCont);
MRSCont = OspreyOverview(MRSCont);
gui = OspreyGUI(MRSCont);

Helge

Hello,

I’m having the same issue (osprey 2.5). Unfortunately, when I try to follow these last instructions I cannot move on. When I run MRSCont = OspreyQuantify(MRSCont); I get an error:

Unrecognized field name “outputFolder”.

Error in OspreyQuantify (line 37)
outputFolder = MRSCont.outputFolder;

How can I delete bad datasets from the MRSCont?

Best,
Andreia

Hi @AndreiaPereira,

This is a slightly surprising error message because the output folder is one of the first variables to be defined when running Osprey, and without it, nothing works.

When are you running this? It should be done after you have completed the whole analysis (OspreyLoad to OspreyOverview).

I tested it on my machine and found an unrelated bug that I just fixed on GitHub. However, this was related to incorrect behavior in the GUI and not related to your error.

Best,
Helge

Sounds odd indeed then… I’m doing it after running the whole analysis and saving the MRSContainer.

Andreia

I have figured out what I was doing wrong when trying to manually remove one dataset. I can now manually remove it (MRSCont.exclude) , and run quantify and overview, but when I try to open the GUI I get the following error:

Unable to perform assignment because the size of the left side is 16-by-29 and the size of the right side is 15-by-29.

Error in osp_iniOverviewWindow (line 268)
QuantTextOv(2:end,:slight_smile: = table2cell(MRSCont.quantify.tables.(gui.quant.Names.Model{gui.quant.Selected.Model}).(gui.quant.Names.Quants{gui.quant.Selected.Quant}).Voxel_1{1,1}(:,:));

Error in OspreyGUI (line 519)
osp_iniOverviewWindow(gui);

I have two questions now:

  • how can I fix this error
  • is it possible to add the dataset back again without having to run the whole pipeline from scratch? It has been removed from all quantify outputs, but I assume the option of removing datasets in the GUI using the arrow key allows us to remove and put them back again. If so, I wonder how to do this manually.

Best,
Andreia

Hi @AndreiaPereira,

This is the incorrect behavior in the GUI I was talking about in the last post. Did you download it from the recent develop branch? There is no need to reprocess your data if you haven’t downloaded the most recent version; you can simply download and reopen the GUI.

If you want to add the dataset again, you remove it from the exclude struct:

%% Exclude subjects 2, 5, and 8
MRSCont.exclude = [2, 5, 8];

MRSCont = OspreyQuantify(MRSCont);
MRSCont = OspreyOverview(MRSCont);
gui = OspreyGUI(MRSCont);

%% You have decided to keep subject 2 
MRSCont.exclude = [5, 8];

MRSCont = OspreyQuantify(MRSCont);
MRSCont = OspreyOverview(MRSCont);
gui = OspreyGUI(MRSCont);

Helge

Thanks!

No, it was a previous download. Downloading the most recent version now. Glad to know that I don’t need to reprocess everything.

But I wonder whether using the new version on previously processed data (or even in new data that I want to compare with previously processed data) will cause any inconsistencies? For example, I have 4 different jobfiles within the same project. I combine those datasets for statistics. If, for some reason, I need to rerun one of the datasets, do I have to rerun all of them through the new Osprey version?

BW,
Andreia