Error when modelling data

Hello everyone,

I’m currently a master’s student starting MRS analysis for my thesis, and it’s my first time working with Matlab as well. I’ve installed Matlab, SPM12, Osprey, LCModel, and all the necessary add-ons following tutorials step by step. However, despite my efforts, I’ve encountered a persistent error when running a test code provided by a helpful colleague. Strangely, the code runs smoothly on my colleague’s laptop, but on mine, I consistently encounter the same error message during the “Model Data” step in Osprey. Prior steps such as “Load Data” and “Process Data” proceed without any issues.

The error message reads:
Brace indexing is not supported for variables of this type.

Error in osp_fitInitialise (line 329)
basisSetFile{1} = MRSCont.opts.fit.basisSetFile{1};

Error in OspreyFit (line 50)
[MRSCont] = osp_fitInitialise(MRSCont);

Error in osp_onFit (line 36)
MRSCont = OspreyFit(MRSCont);

Error while evaluating UIControl Callback.

Given that the code executes flawlessly on my colleague’s laptop, it suggests that the issue may not lie within the code itself but rather in the LCModel fitting process. I’ve followed all the steps for downloading LCModel, including building the LCModel file and placing it in the Osprey folder as instructed.

Despite troubleshooting for several days, my colleague and I haven’t been able to resolve this issue. If anyone has encountered a similar problem or has any suggestions for troubleshooting, I would be immensely grateful for your assistance.

Thank you in advance for your time and expertise.

Best,
Xiaowen

Hi Xiaowen,

Thank you for reaching out!

From what I can see it is not a LCModel problem but related to Osprey itself. I have a few suggested to figure this out:

  • Could you first download the newest version from the develop branch because we made some changes to the exact function it is crashing in.
  • Could you run a test analysis using the jobSDAT_LCModel.m example in the example data folder (exampledata/sdat/)?
  • Did you create the jobfile through the GUI? Could you post the jobfile here? (You have to change it to .txt format for posting)

Thanks,
Helge

Hi Helge,

Thank you so much for your reply!! Means a lot to me.

First, I tried to download the lastest version of Osprey, set path, good.

Then I tried the test code you mentioned, several error messages popped up, but the first one was telling me to install pigz. I installed, reran the code again. However, upon rerunning the code, I encountered a new set of error messages, the first of which pertained to the gfortran library.

Here is the specific error message I received:

dyld[55270]: Library not loaded: /usr/local/gfortran/lib/libgfortran.5.dylib
Referenced from: <02F45BCC-A4CE-3127-B76E2C10AADE81B7> /Users/otherminds/Desktop/osprey-develop/libraries/LCModel/macos/sonoma/LCModel_macos_sonoma/lcmodel
Reason: tried: ‘/usr/local/gfortran/lib/libgfortran.5.dylib’ (mach-o file, but is an incompatible architecture (have ‘arm64’, need ‘x86_64’)), ‘/System/Volumes/Preboot/Cryptexes/OS/usr/local/gfortran/lib/libgfortran.5.dylib’ (no such file), ‘/usr/local/gfortran/lib/libgfortran.5.dylib’ (mach-o file, but is an incompatible architecture (have ‘arm64’, need ‘x86_64’)), ‘/usr/local/lib/libgfortran.5.dylib’ (no such file), ‘/usr/lib/libgfortran.5.dylib’ (no such file, not in dyld cache)
“/Users/otherminds/Desktop/osprey-develop/libraries/LCModel/macos/sonoma/LCModel_macos_sonoma/lcmodel” < “/Users/otherminds/Desktop/osprey-develop/exampledata/sdat/UnEdited/derivativesLCM/LCModelControlFiles/LCModelFiles_metabs_mrs_sub-01_ses-01_press_sub-01_PRESS_35_act_LCM_A.control”: Aborted
Error using textscan
Invalid file identifier. Use fopen to generate a valid file identifier.

Error in mrs_readLcmodelTABLE (line 33)
header_info=textscan(fid,‘%s’,‘delimiter’,‘\n’);

Error in readLCMFitParams (line 27)
tab = mrs_readLcmodelTABLE([MRSCont.opts.fit.lcmodel.(lcmOutputFile){kk} ‘.table’]);

Error in LCModelWrapper (line 68)
MRSCont.fit.results.metab.fitParams{1,kk,1} = readLCMFitParams(MRSCont, ‘A’, kk);

Error in osp_fitUnEdited (line 170)
[MRSCont] = LCModelWrapper(MRSCont,kk,progressText);

Error in OspreyFit (line 56)
[MRSCont] = osp_fitUnEdited(MRSCont);

Error in osp_onFit (line 36)
MRSCont = OspreyFit(MRSCont);

Error while evaluating UIControl Callback.

For context, I am using an M1 MacBook Air running macOS Sonoma 14.2.1, and I have installed gfortran 13.2 for Sonoma from the following source: Releases · fxcoudert/gfortran-for-macOS · GitHub

Sincerely appreciate your guidance and assistance, thank you so much again!

Best,
Xiaowen

Hi Helge,

Me again. I have a tiny update for the errors I mentioned above. I thought the problem would probably related to the version of gfortran, and may be I need one which is compatible with both arm64 and x86_64. So I found this Releases · R-macos/gcc-12-branch · GitHub

It seems it’s designed for R, but after changing into this version, the error message “‘/usr/local/gfortran/lib/libgfortran.5.dylib’ (mach-o file, but is an incompatible architecture (have ‘arm64’, need ‘x86_64’))” was gone, but other error messages are still there:

dyld[56050]: Library not loaded: /usr/local/gfortran/lib/libgfortran.5.dylib
Referenced from: <02F45BCC-A4CE-3127-B76E-2C10AADE81B7> /Users/otherminds/Desktop/osprey-develop/libraries/LCModel/macos/sonoma/LCModel_macos_sonoma/lcmodel
Reason: tried: ‘/usr/local/gfortran/lib/libgfortran.5.dylib’ (no such file), ‘/System/Volumes/Preboot/Cryptexes/OS/usr/local/gfortran/lib/libgfortran.5.dylib’ (no such file), ‘/usr/local/gfortran/lib/libgfortran.5.dylib’ (no such file), ‘/usr/local/lib/libgfortran.5.dylib’ (no such file), ‘/usr/lib/libgfortran.5.dylib’ (no such file, not in dyld cache)
“/Users/otherminds/Desktop/osprey-develop/libraries/LCModel/macos/sonoma/LCModel_macos_sonoma/lcmodel” < “/Users/otherminds/Desktop/osprey-develop/exampledata/sdat/UnEdited/derivativesLCM/LCModelControlFiles/LCModelFiles_metabs_mrs_sub-01_ses-01_press_sub-01_PRESS_35_act_LCM_A.control”: Aborted
Error using textscan
Invalid file identifier. Use fopen to generate a valid file identifier.

Error in mrs_readLcmodelTABLE (line 33)
header_info=textscan(fid,‘%s’,‘delimiter’,‘\n’);

Error in readLCMFitParams (line 27)
tab = mrs_readLcmodelTABLE([MRSCont.opts.fit.lcmodel.(lcmOutputFile){kk} ‘.table’]);

Error in LCModelWrapper (line 68)
MRSCont.fit.results.metab.fitParams{1,kk,1} = readLCMFitParams(MRSCont, ‘A’, kk);

Error in osp_fitUnEdited (line 170)
[MRSCont] = LCModelWrapper(MRSCont,kk,progressText);

Error in OspreyFit (line 56)
[MRSCont] = osp_fitUnEdited(MRSCont);

Error in osp_onFit (line 36)
MRSCont = OspreyFit(MRSCont);

Error while evaluating UIControl Callback.

I’m not sure if I’m doing silly things or what should I do next, your professional suggestion would be precious!!

How exactly did you build LCModel?

I have some instructions and test data here - does the binary run on its own when you do it like this?

Also, I’m confused - you say you have an M1 MacBook, but it seems to want an x86 GFortran version.
You could try installing gcc properly again through Homebrew. I believe this needs XCode Command Line Tools installed.

Hi Georg,

Thank you so much for your suggestions!! Now all the previous errors are fixed, and I’m able to finish the Model Data and Coregister step. But again, when I came to Segment, I got stuck again, it says it can’t find a specific file:

Error using movefile
No matching files named ‘/Users/otherminds/Desktop/osprey-develop/exampledata/sdat/UnEdited/sub-01/ses-01/anat/sub-01/c1sub-01_ses-01_T1w.nii.gz’ were
found.

Error in OspreySeg (line 182)
movefile(fullfile(T1dir, [‘c1’ T1name ‘.nii.gz’]),fullfile(saveDestinationFilesSPM,[‘c1_’ PreFix T1name ‘_space-scanner_spm12_pseg.nii.gz’]));

Error in osp_onSeg (line 47)
MRSCont = OspreySeg(MRSCont);

Error while evaluating UIControl Callback.

I check the folder, and find there’s file called “sub-01_ses-01_T1w.nii.gz” in it, without the “c1” prefix. Does it mean that there’s something wrong and the code didn’t create the correct file successfully?

Thank you so much for your time and expertise in advance.

Can you search your computer whether the file was created with the c1 prefix anywhere else on your computer?

Also, I would greatly appreciate if you shared the Sonoma LCModel binary through a pull request into my LCModel binary collection! Thanks!

Hi Georg,

Sorry for my late reply. I’m willing to share the binary file of course! But I’m not that familiar with Github, and been searching for how to make a pull request for 2 days but still can’t figure it out how to make it. Could you kindly give me some instrutions?

Besides, followed all the suggestions I got from you, now my Osprey can process the example data and got some results. My colleague also ran the analysis with the example data as well, but she got totally different results from me. So I want to ask is there any “official results” for exampledata/sdat/UnEdited/jobSDAT_LCModel.m by any chance? Then I can have a look at it and see if Osprey actually still doesn’t work well for me.

And also, even though the Osprey now can be ran successfully for the exampledata, it still doesn’t work for the codes and data I got from my colleague, which I mentioned from the very beginning, while the codes always work well on her laptop. So I will post the jobfile and the erros I got in the next reply, could you kindly check it out for me?

Thank you so much for your time and patience in advance!

%% jobSDAT.m
% This function describes an Osprey job defined in a MATLAB script.
%
% A valid Osprey job contains four distinct classes of items:
% 1. basic information on the MRS sequence used
% 2. several settings for data handling and modeling
% 3. a list of MRS (and, optionally, structural imaging) data files
% to be loaded
% 4. an output folder to store the results and exported files
%
% The list of MRS and structural imaging files is provided in the form of
% cell arrays. They can simply be provided explicitly, or from a more
% complex script that automatically determines file names from a given
% folder structure.
%
% Osprey distinguishes between four sets of data:
% - metabolite (water-suppressed) data
% (MANDATORY)
% Defined in cell array “files”
% - water reference data acquired with the SAME sequence as the
% metabolite data, just without water suppression RF pulses. This
% data is used to determine complex coil combination
% coefficients, and perform eddy current correction.
% (OPTIONAL)
% Defined in cell array “files_ref”
% - additional water data used for water-scaled quantification,
% usually from short-TE acquisitions due to reduced T2-weighting
% (OPTIONAL)
% Defined in cell array “files_w”
% - Structural image data used for co-registration and tissue class
% segmentation (usually a T1 MPRAGE). These files need to be
% provided in the NIfTI format (.nii) or, for GE data, as a
% folder containing DICOM Files (
.dcm).
% (OPTIONAL)
% Defined in cell array “files_nii”
% - External segmentation results. These files need to be
% provided in the NIfTI format (*.nii or *.nii.gz).
% (OPTIONAL)
% Defined in cell array “files_seg” with 1 x 3 cell for each
% subject or 1 x 1 cell if a single 4D NIfTI is supplied.
%
% Files in the formats
% - .7 (GE)
% - .SDAT, .DATA/.LIST, .RAW/.SIN/.LAB (Philips)
% - .DAT (Siemens)
% - .nii, .nii.gz (NIfTI-MRS)
% usually contain all of the acquired data in a single file per scan. GE
% systems store water reference data in the same .7 file, so there is no
% need to specify it separately under files_ref.
%
% Files in the formats
% - .DCM (any)
% - .IMA, .RDA (Siemens)
% may contain separate files for each average. Instead of providing
% individual file names, please specify folders. Metabolite data, water
% reference data, and water data need to be located in separate folders.
%
% In the example script at hand the MATLAB functions strrep and which are
% used to generate a relative path, which allows you to run the examples
% on your machine directly. To set up your own Osprey job supply the
% specific locations as described above.
%
% AUTHOR:
% Dr. Georg Oeltzschner (Johns Hopkins University, 2019-07-15)
% goeltzs1@jhmi.edu
%
% HISTORY:
% 2019-07-15: First version of the code.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% 1. SPECIFY SEQUENCE INFORMATION %%%

% Specify sequence type
seqType = ‘unedited’; % OPTIONS: - ‘unedited’ (default)
% - ‘MEGA’
% - ‘HERMES’
% - ‘HERCULES’

% Specify editing targets
editTarget = {‘none’}; % OPTIONS: - {‘none’} (default if ‘unedited’)
% - {‘GABA’}, {‘GSH’}, {‘Lac’}, {‘PE322’}, {‘PE398’} (for ‘MEGA’)
% - {‘GABA’, ‘GSH’}, {‘GABA’, ‘Lac’}, {‘NAA’, ‘NAAG’} (for 'HERMES’and ‘HERCULES’)

                            % Specify data scenario

dataScenario = ‘invivo’; % OPTIONS: - ‘invivo’ (default)
% - ‘phantom’
% - ‘PRIAM’
% - ‘MRSI’

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% 2. SPECIFY DATA HANDLING AND MODELING OPTIONS %%%
% Which spectral registration method should be used? Robust spectral
% registration is default, a frequency restricted spectral registration
% method is also availaible and is linked to the fit range.
opts.SpecReg = ‘RobSpecReg’; % OPTIONS: - ‘RobSpecReg’ (default) Spectral aligment with Water/Lipid removal, using simialrity meric, and weighted averaging
% - ‘ProbSpecReg’ Probabilistic spectral aligment to median target and weighted averaging
% - ‘RestrSpecReg’ Frequency restricted (fit range) spectral aligment, using simialrity meric, and weighted averaging
% - ‘none’

% Which algorithm do you want to align the sub spectra? L2 norm
% optimization is the default. This is only used for edited MRS!
% Which algorithm do you want to align the sub spectra? L2 norm
% optimization is the default. This is only used for edited MRS!
%Perform correction on the metabolite data (raw) or metabolite
%-nulled data (mm).
opts.SubSpecAlignment.mets = ‘L2Norm’; % OPTIONS: - ‘L2Norm’ (default)
% - ‘L1Norm’
% - ‘none’

%Perform eddy-current correction on the metabolite data (raw) or metabolite
%-nulled data (mm). This can either be done similar for all data sets by
%supplying a single value or specified for each dataset individually by supplying
% multiple entries (number has to match the number of datasets) e.g. to perform ECC
% for the second dataset only:
% opts.ECC.raw = [0 1];
% opts.ECC.mm = [0 1];

opts.ECC.raw = 0; % OPTIONS: - ‘1’ (default)
opts.ECC.mm = 0; % - ‘0’ (no)
% - array

% Save LCModel-exportable files for each spectrum?
opts.saveLCM = 1; % OPTIONS: - 0 (no, default)
% - 1 (yes)
% Save jMRUI-exportable files for each spectrum?
opts.savejMRUI = 0; % OPTIONS: - 0 (no, default)
% - 1 (yes)

% Save processed spectra in vendor-specific format (SDAT/SPAR, RDA, P)?
opts.saveVendor = 0; % OPTIONS: - 0 (no, default)
% - 1 (yes)

% Save processed spectra in NIfTI-MRS format?
opts.saveNII = 0; % OPTIONS: - 0 (no, default)
% - 1 (yes)

% Save PDF output for all Osprey modules and subjects?
opts.savePDF = 1; % OPTIONS: - 0 (no, default)
% - 1 (yes)

% Select the metabolites to be included in the basis set as a cell array,
% with entries separates by commas.
% With default Osprey basis sets, you can select the following metabolites:
% Ala, Asc, Asp, bHB, bHG, Cit, Cr, Cystat, CrCH2, EtOH, GABA, GPC, GSH, Glc, Gln,
% Glu, Gly, H2O, mI, Lac, NAA, NAAG, PCh, PCr, PE, Phenyl, sI, Ser,
% Tau, Tyros, MM09, MM12, MM14, MM17, MM20, Lip09, Lip13, Lip20.
% If you enter ‘default’, the basis set will include all of the above
% except for Ala, bHB, bHG, Cit, Cystat, EtOH, Glc, Gly, Phenyl, Ser, and Tyros.
opts.fit.includeMetabs = {‘Ala’, ‘Asp’, ‘Cr’, ‘GABA’, ‘Glc’, ‘Gln’, ‘Glu’, ‘GPC’, ‘GSH’, ‘Lac’, ‘mI’, ‘NAA’, ‘NAAG’, ‘PCh’, ‘PCr’, ‘sI’, ‘Tau’};
% OPTIONS: - {‘default’}
% - {custom}

% Choose the fitting algorithm
opts.fit.method = ‘LCModel’; % OPTIONS: - ‘Osprey’ (default)
% - ‘LCModel’

% Determine fitting range (in ppm) for the metabolite spectra
opts.fit.range = [0.5 4]; % [ppm] Default: [0.5 4]

%%% ----- OSPREY FITTING OPTIONS -----
% Choose the fitting style for difference-edited datasets (MEGA, HERMES, HERCULES)
% (only available for the Osprey fitting method)
opts.fit.style = ‘Separate’; % OPTIONS: - ‘Separate’ (default) - will fit DIFF and OFF separately
% - ‘Concatenated’ - will fit DIFF and SUM simultaneously)

% Determine fitting range (in ppm) for water spectra
opts.fit.rangeWater = [2.0 7.4]; % [ppm] Default: [2.0 7.4]

% Determine the baseline knot spacing (in ppm) for the metabolite spectra
opts.fit.bLineKnotSpace = 0.4; % [ppm] Default: 0.4.

% Add macromolecule and lipid basis functions to the fit?
opts.fit.fitMM = 1; % OPTIONS: - 0 (no)
% - 1 (yes, default)

% Optional: Deface the strucutral images in the Coreg/Seg figures for HIPAA
% compliance
opts.img.deface = 1;

%%% ----- LCMODEL FITTING OPTIONS -----

% Specify LCModel-format basis set (.BASIS)
% If no basis set file is provided Osprey will generate the .BASIS file
% from Osprey’s database

opts.fit.basisSetFile = ‘/Users/otherminds/Desktop/test_MRS/LCM_basis_39.BASIS’;

% The following lines perform an automated set-up of the jobFile which
% takes advatage of the BIDS foramt. If you are not using BIDS (highly
% recommended) you can look at the definitions below the loop to see how to
% set up direct path links to your data.

% Specify LCModel-type control file (.CONTROL)
% This is optional: If you leave this field blank, Osprey will create a
% minimum control file for you.
% opts.fit.controlFile = ‘’;

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% 3. SPECIFY MRS DATA AND STRUCTURAL IMAGING FILES %%
% When using single-average Siemens RDA or DICOM files, specify their
% folders instead of single files!

% Clear existing files
clear files files_ref files_w files_nii files_mm

% Data folder in BIDS format
% The filparts(which()) comment is needed to find the data on your machine. If you set
% up the jobFile for your own data you can set a direct path to your data
% folder e.g., data_folder = /Volumes/MyProject/data/’

data_folder = ‘/Users/otherminds/Desktop/test_MRS/TE39’;

% The following lines perform an automated set-up of the jobFile which
% takes advatage of the BIDS foramt. If you are not using BIDS (highly
% recommended) you can look at the definitions below the loop to see how to
% set up direct path links to your data.

subs = dir(data_folder);
subs(1:2) = ;
subs = subs([subs.isdir]);
subs = subs(contains({subs.name},‘sub’));
counter = 1;

for kk = 1:length(subs)

    % Specify metabolite data
    % (MANDATORY)
    dir_metabolite    = dir([subs(kk).folder filesep subs(kk).name filesep 'mrs' filesep subs(kk).name '_press_act' filesep '*.SDAT']);
    files(counter)      = {[dir_metabolite(end).folder filesep dir_metabolite(end).name]};

    % Specify water reference data for eddy-current correction (same sequence as metabolite data!)
    % (OPTIONAL)
    % Leave empty for GE P-files (.7) - these include water reference data by
    % default.
    dir_ref    = dir([subs(kk).folder filesep subs(kk).name filesep 'mrs' filesep subs(kk).name '_press_ref' filesep '*.SDAT']);
    files_ref(counter)  = {[dir_ref(end).folder filesep dir_ref(end).name]};

    % Specify water data for quantification (e.g. short-TE water scan)
    % (OPTIONAL)
    files_w     = {};

    % Specify metabolite-nulled data for quantification
    % (OPTIONAL)
    files_mm     = {};

   % Specify T1-weighted structural imaging data
    % (OPTIONAL)
    % Link to single NIfTI (*.nii) files for Siemens and Philips data
    % Link to DICOM (*.dcm) folders for GE data
    files_nii(counter)  = {[subs(kk).folder filesep subs(kk).name filesep 'anat' filesep subs(kk).name '_run-01_T1_MPRAGE.nii.gz']};

    
    % External segmentation results
    % (OPTIONAL)
    % Link to NIfTI (*.nii or *.nii.gz) files with segmentation results
    % Add supply gray matter, white matter, and CSF as 1 x 3 cell within a
    % cell array  or a single 4D file in the same order supplied as 1 x 1 cell;

% files_seg(counter) = {{[sess(ll).folder filesep sess(ll).name filesep ‘anat’ filesep subs(kk).name filesep ‘c1’ sess(ll).name ‘_T1w.nii.gz’],…
% [sess(ll).folder filesep sess(ll).name filesep ‘anat’ filesep subs(kk).name filesep ‘c2’ sess(ll).name ‘_T1w.nii.gz’],…
% [sess(ll).folder filesep sess(ll).name filesep ‘anat’ filesep subs(kk).name filesep ‘c3’ sess(ll).name ‘_T1w.nii.gz’]}};

% files_seg(counter) = {{[sess(ll).folder filesep sess(ll).name filesep ‘anat’ filesep subs(kk).name filesep ‘4D’ sess(ll).name ‘_T1w.nii.gz’]}};

    counter             = counter + 1;

end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% 4. SPECIFY STAT FILE %%%
% Supply location of a csv file, which contains possible correlation
% measures and group variables. Each column must start with the name of the
% measure. For the grouping variable use ‘group’ and numbers between 1 and
% the number of included groups. If no group is supplied the data will be
% treated as one group. (You can always use the direct path)

file_stat = ‘’;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% 5. SPECIFY OUTPUT FOLDER %%
% The Osprey data container will be saved as a *.mat file in the output
% folder that you specify below. In addition, any exported files (for use
% with jMRUI, TARQUIN, or LCModel) will be saved in sub-folders.

% Specify output folder (you can always use the direct path)
% (MANDATORY)
outputFolder = fullfile(data_folder, ‘derivatives’);

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

and the errors are:
Brace indexing is not supported for variables of this type.

Error in osp_fitInitialise (line 56)
if ~(isfield(MRSCont.opts.fit,‘basisSetFile’) && ~isempty(MRSCont.opts.fit.basisSetFile) && ~isfolder(MRSCont.opts.fit.basisSetFile{1}))

Error in OspreyFit (line 50)
[MRSCont] = osp_fitInitialise(MRSCont);

Error in osp_onFit (line 36)
MRSCont = OspreyFit(MRSCont);

Error while evaluating UIControl Callback.

Hi @LLLLX,

Could you share the complete results folder from you and your colleague?

The basis set file you are supplying in the jobfile has to be inside a cell array (see screenshot) and example file on develop branch (osprey/exampledata/sdat/UnEdited/jobSDAT_LCModel.m at develop · schorschinho/osprey · GitHub).

Helge

Hi Helge,

Sorry for my late reply, I managed to fix other problems in the codes and tried other data these days so didn’t update with you in time. I shared the result folders (mine and my colleague’s) in these two google drive links.

https://drive.google.com/drive/folders/13dkvYKHN2jSID6yGBbHKryCa2q9TMJag?usp=drive_link

https://drive.google.com/drive/folders/1tA8dy8Ck5_YYdTgimI_Grn9wLrq1v-bq?usp=drive_link

I checked them (especially the quantify results), and found that none of the metabolite value we got is similar, which is really weird. We also tried her data, and still found that our results are not really similar. But one thing is she got her results almost a year ago, I’m not so sure if the version of the Osprey is exactly where the problem comes from. I will also ask her if she can run the codes again with the lastest version tomorrow.

Thank you so much for your patience and your time again.

Best,
Xiaowen

Is it possible that your colleague didn’t run the analysis with the LCModel fitting algorithm, but with the Osprey fitting algorithm?

Hi @LLLLX,

I had a quick look at the data, and as @admin pointed out, you have used LCModel for modeling while your colleague used the native Osprey linear-combination algorithm for modeling. It is quite well-known that different algorithms yield different results.

For example, here are some studies looking at the agreement between model results for shortTE MRS data (https://analyticalsciencejournals.onlinelibrary.wiley.com/doi/full/10.1002/nbm.4482) or GABA-edited MRS (https://analyticalsciencejournals.onlinelibrary.wiley.com/doi/full/10.1002/nbm.4702) for different algorithms.

Best,
Helge