Simulating Basis set with FID-A

Hi,

I am working on simulating a basis set with FID-A (run_simSLaserShaped_fast.m). The output is a simulated spectrum, in FID-A structure format. I am wondering if I can get some guidance on how to convert this to a .BASIS file for LCModel fitting. I have skimmed through the FID-A manual and I haven’t come across an obvious way to do this.
Thanks for your help in advance!
Jessica

Hi Jessica,

The function you’re looking for is io_writelcmraw in the inputOutput folder. It’s useful to add a 0 ppm reference singlet before, as shown in the sim_lcmrawbasis function.

Once you have a folder full of .RAW files (one for each metabolite), you need to move them all to the machine that has LCModel on it, because you’re going to need the MakeBasis function coming with LCModel.

The command will look something like

$HOME/.lcmodel/bin/makebasis < makebasis.in

(see Section 8.6 of the LCModel manual for details)

Here, you need to provide the makebasis.in file, which is described in detail in the LCModel manual as well - it contains the paths to the .RAW files, as well as basic information about the sequence (sequence name, metabolite names, echo time, dwell time, field strength, number of points etc.). I have attached an example makebasis.in file that I’ve used a while ago to create a 35-ms PRESS basis set:

makebasis.txt (2.1 KB)
(download and rename to makebasis.in - the forum software doesn’t let me upload .in files)

Note that every single line of the makebasis.in file has a leading space character (this has thrown me off greatly before, so make sure you have them in there).

Hope this helps! Let me know if you get stuck.

Best,
Georg

Hi Georg,

Thank you for your response having an overview of the flow I need to follow is so helpful!

I had had a look at the io_writelcmraw function, and I hope this is not a foolish question, but one of the input parameters is:
% data_struct = simulated metabolite basis spectrum in matlab structure
%format
whereas the output of run_simSLaserShaped_fast.m is simulated spectrum, in FID-A structure format (i.e., individual structs for each metabolite). The io_writelcmraw function calls to fields like data_struct.fid which are not created in the run_simSLaserShaped_fast.m
Am I missing something obvious here?

Thanks again,
Jess

Hi Jessica,

That’s the same thing - I think Jamie just hasn’t updated the language in some of the older functions. You can just feed a FID-A struct into the io_writelcmraw function. See line 112 in sim_lcmrawbasis (it also wants a filename to write to and a string for the metabolite name, use the ones in run_simExampleBasisSet in the exampleRunScripts folder).

Cheers,
Georg