CSM Import Raw NMR


CSM Import Raw NMR Class.

Import NMR experiment into csm_nmr_spectra objects. Optionally Run QC checks.

Leave arguments blank for pop-up selection boxes.

experimentInfo is a struct containing paths to the required files; the NMR Experiment Info file, the NMR Calibration Info file, and the Sample Metadata file.

These files are .xls files containing the data for import, ie, the path to the experiment folder, the calibration type, and extra sample metadata.

NMR Experiment Info template:

Sample ID, Experiment Number, Experiment Folder, Rack, Rack Position, Instrument, Acquisition Batch

NMR Calibration Info template:

Sample ID, Sample Type, Calibration Type, Calibration Ref Point, Calibration Search Min, Calibration Search Max

Sample Metadata template example:

Sample ID, Case/control, gender, age, etc

Will only import 1 pdata folder, as for small molecules this is all that is required.

Spectra objects are contained in the relevant map properties and are grouped by sample_type, ie 'plasma'.

eg. cpmg_plasma = imported.cpmg('plasma');

oneDWS_urine = imported.oneDWS('urine');

diffEdited_serum = imported.diffEdited('serum');

jres_plasma = imported.plasma('plasma');

Errors are saved to file, and can be found into the importErrors map using the same syntax as above.

Usage

imported_experiment = csm_import_raw_nmr()

imported_experiment = csm_import_raw_nmr( 'experiment_info', experiment_info, 'line_width_qc',line_width_qc, 'save_dir', save_dir, 'spectra_size', spectra_size, 'spectra_bounds', spectra_bounds, 'spectra_size_2D', spectra_size_2D, 'spectra_bounds_2D', spectra_bounds_2D, 'LW_peak', LW_peak 'LW_threshold', LW_threshold )

Arguments (* = required)

VariableTypeDefault ValueDescription
experiment_infostructNoneStructure for holding experimental information.
experiment_info.experiment_pathstrNoneFull path to experiment folder.
experiment_info.nmr_experiment_info_pathstrNoneFull path to nmr experiment info csv file.
experiment_info.nmr_calibration_info_pathstrNoneFull path to the nmr calibration info path.
experiment_info.sample_metadata_pathstrNoneFull path to sample metadata csv file.
line_width_qcbooltrue. Whether to run the LW QC
save_dirstr'current working directory'+'_import_data'. Full path of output dir
spectra_size1*120000. Number of points of ppm
spectra_bounds1*2[-1 10]. Range of ppm (min and max)
spectra_size_2D1*120000. Number of points of 2D ppm
spectra_bounds_2D1*2[-1 10]. Range of 2D ppm (min and max)
LW_peak str'TSP'. Which peak to use for LW calc, uses 'lactate' for plasma and 'TSP' for urine
LW_threshold1*11.4. Linewidth threshold

Returns

VariableTypeDescription
experiment_pathstrFull path to experiment.
sample_metadata_pathstrFull path to sample metadata file.
nmr_experiment_info_pathstrFull path to NMR experiment file.
nmr_calibration_info_pathstrFull path to NMR calibration file.
save_dirstrFull path to save directory.
log_filestrFull path to log file.
imported_bruker_metadatacsm_import_bruker_acquisition_dataImported bruker acquisition data.
imported_sample_metadatacsm_sample_metadataImported sample metadata.
imported_nmr_calibration_infocsm_import_nmr_experiment_infoImported NMR experiment info.
imported_nmr_experiment_infocsm_import_nmr_calibration_infoImported NMR calibration info.
raw_spectracontainers.MapContainer of raw spectra.
missing_bruker_experimentscellMissing bruker experiment data.
missing_nmr_experiment_infocellMissing NMR experiment data.
missing_nmr_calibration_infocellMissing NMR calibration data.
missing_samples_in_spectracellMissing samples in spectra data.
missing_sample_metadatacellMissing sample metadata.
exceptionscellExceptions from import.
spectrometer_frequency1*1The spectratrometer Frequency.
spectra_size1*1Calculated size of the spectra.
spectra_bounds1*2Upper and lower limits of the spectra.
spectra_resolution1*1Resolution of the spectra.
ppm_common1*nPPM common scale.
spectra_size_2D1*1Calculated size of the JRES 2D spectra.
spectra_bounds_2D1*22D Upper and lower limits of the JRES 2D spectra.
spectra_resolution_2D1*1Resolution of the JRES 2D spectra.
ppm_common_2D1*nPPM common scale of JRES 2D spectra.
LW_peak1*1Linewidth peak.
LW_threshold1*1Linewidth threshold.
pulse_programscellCell array of the imported pulse programs.
import_failedcontainers.MapContainer of failed imports.
import_errorscontainers.MapContainer of import errors.
pulse_program_lookupcontainers.MapPulse program short name lookup.
sample_typescellCell array of imported sample types.
cpmgcontainers.MapContainer of final CPMG spectra.
oneDWScontainers.MapContainer of final 1D Water Suppressed spectra.
diff_editedcontainers.MapContainer of diffusion edited spectra.
jrescontainers.MapContainer of final JRES spectra.
peak_width_output_cpmgcontainers.MapContainer of QC output.
peak_width_output_oneDWScontainers.MapContainer of QC output.
peak_width_output_jrescontainers.MapContainer of QC output.
peak_width_output_diff_editedcontainers.MapContainer of QC output.

Copyright Imperial College London 2019