ectra < csm_spectra
NMR spectral Object. Contains X, PPM scale and various metadata.
Extends csm_spectra; see csm_spectra for more information.
csm_nmr_spectra.getSubSpectra( conditions ) will return a spectra based on the fields in sampleInfo.
conditions is the format {{ field, condition }}, and multiple conditions can be specified
ie:
conditions = {{ 'HistoScore', 'HS2' } ,{ 'RatNumber', '34' }}
csm_nmr_spectra.removeWater() will cur 4.7-4.9 ppm if sample_type = urine, 4.55-4.9
if serum/plasma or 4.699 to 4.9 by default.
spectra = csm_nmr_spectra( X, ppm );
spectra = csm_nmr_spectra( X, ppm, 'sample_type',sample_type,'pulse_program', pulse_program, 'name', name, 'is_continous', is_continuous, 'sample_ids', sample_ids, 'sample_metadata', sample_metadata, 'nmr_experiment_info', nmr_experiment_info, 'nmr_calibration_info', nmr_calibration_info );
Variable | Type | Default Value | Description |
---|---|---|---|
*X | m*n | None | spectral matrix. |
*ppm | 1*n | None | PPM Scale. |
name | str | None | Name of the data structure. |
is_continuous | bool | true | Whether the x scale is continuous |
sample_ids | cell | {} | Sample IDs. Use the numeric index to match to the row |
sample_metadata | csm_sample_metadata | None | Metadata from import. |
nmr_experiment_info | csm_nmr_experiment_info | None | NMR experiment info from import. |
nmr_calibration_info | csm_nmr_calibration_info | None | NMR calibration info from import. |
pulse_program | str | None | Shortened version of the pulseprogram |
sample_type | str | None | Sample Type |
Variable | Type | Description |
---|---|---|
csm_nmr_spectra | csm_nmr_spectra | Csm NMR spectra object. |
csm_nmr_spectra.X | m*n | spectral Matrix. |
csm_nmr_spectra.ppm | 1*n | PPM Scale. |
csm_nmr_spectra.name | str | Name of the data structure. |
csm_nmr_spectra.sample_ids | cell | Sample IDs, using a numeric index. |
csm_nmr_spectra.sample_metadata | csm_import_sample_metadata | Sample Metadata from import. |
csm_nmr_spectra.nmr_experiment_info | csm_import_nmr_experiment_info | NMR Experiment Info from import. |
csm_nmr_spectra.nmr_calibration_info | csm_import_nmr_calibration_info | NMR Calibration Info from import. |
csm_nmr_spectra.audit_info | csm_audit_info | Audit Info object. |
Method | Description |
---|---|
csm_nmr_spectra.setX( X ) | Assign a new X matrix to the object. |
csm_nmr_spectra.setxScale( name, scale ) | Assign a new PPM to the object. |
csm_nmr_spectra.importSampleInfo( sample_metadata_path ) | Import sample metadata. |
csm_nmr_spectra.getSubSpectra( conditions ) | Return sub spec based on sampleInfo conditions. See description. |
csm_nmr_spectra.addSpectra( spectra ) | Add a spectra object to this one. |
csm_nmr_spectra.cutRegion( start , stop ) | Remove a section from start to stop. |
csm_nmr_spectra.removeTSP() | Removes the section -0.2 to 0.2. |
csm_nmr_spectra.removeWater() | Removes the section 4.669 to 4.9 by default. See description for more information. |
csm_nmr_spectra.removeUrea() | Removes the section 5.48 to 6.23. |
Copyright Imperial College London 2019