Subsections


spectrum.read_intensities

Image fid Image document-open

Synopsis

Read peak intensities from a file.

Defaults

spectrum.read_intensities(file=None, dir=None, spectrum_id=None, dim=1, int_method=`height', int_col=None, spin_id_col=None, mol_name_col=None, res_num_col=None, res_name_col=None, spin_num_col=None, spin_name_col=None, sep=None, spin_id=None, ncproc=None)

Keyword arguments

file: The name of the file or the list of files containing the intensity data.

dir: The directory where the file is located.

spectrum_id: The unique spectrum ID string or list of strings to associate with the peak intensity values. If multiple files are given, then each file should have a corresponding spectrum ID string. If `auto' is provided for a NMRPipe seriesTab formatted file, the IDs are auto generated in form of Z_A{i}.

dim: Associate the data with the spins of any dimension in the peak list. This defaults to w1, the heteronucleus in HSQC type experiments.

int_method: The method by which peaks were integrated.

int_col: The optional column containing the peak intensity data (used by the generic intensity file format, or if the intensities are in a non-standard column).

spin_id_col: The spin ID string column used by the generic intensity file format (an alternative to the mol, res, and spin name and number columns).

mol_name_col: The molecule name column used by the generic intensity file format (alternative to the spin ID column).

res_num_col: The residue number column used by the generic intensity file format (alternative to the spin ID column).

res_name_col: The residue name column used by the generic intensity file format (alternative to the spin ID column).

spin_num_col: The spin number column used by the generic intensity file format (alternative to the spin ID column).

spin_name_col: The spin name column used by the generic intensity file format (alternative to the spin ID column).

sep: The column separator used by the generic intensity format (the default is white space).

spin_id: The spin ID string used to restrict the loading of data to certain spin subsets.

ncproc: The Bruker specific FID intensity scaling factor.

Description

The peak intensity can either be from peak heights or peak volumes.

The spectrum ID is a label which is subsequently utilised by other user functions. If this identifier matches that of a previously loaded set of intensities, then this indicates a replicated spectrum.

The spectral dimension is used to specify if the intensity data should be loaded into the spins identified by the first dimension w1, second dimension w2, etc.

The integration method is required for the subsequent error analysis. When peak heights are measured, this should be set to `height'. Volume integration methods are a bit varied and hence two values are accepted. If the volume integration involves pure point summation, with no deconvolution algorithms or other methods affecting peak heights, then the value should be set to `point sum'. All other volume integration methods, e.g. line shape fitting, the value should be set to `other'.

If a series of intensities extracted from Bruker FID files processed in Topspin or XWinNMR are to be compared, the ncproc parameter may need to be supplied. This is because this FID is stored using integer representation and is scaled using ncproc to avoid numerical truncation artifacts. If two spectra have significantly different maximal intensities, then ncproc will be different for both. The intensity scaling is binary, i.e. 2**ncproc. Therefore if spectrum A has an ncproc of 6 and and spectrum B a value of 7, then a reference intensity in B will be double that of A. Internally, relax stores the intensities scaled by 2**ncproc.

File formats

The peak list or intensity file will be automatically determined.

Sparky peak list: The file should be a Sparky peak list saved after typing the command `lt'. The default is to assume that columns 0, 1, 2, and 3 (1 st, 2 nd, 3 rd, and 4 th) contain the Sparky assignment, w1, w2, and peak intensity data respectively. The frequency data w1 and w2 are ignored while the peak intensity data can either be the peak height or volume displayed by changing the window options. If the peak intensity data is not within column 3, set the integration column to the appropriate number (column numbering starts from 0 rather than 1).

XEasy peak list: The file should be the saved XEasy text window output of the list peak entries command, `tw' followed by `le'. As the columns are fixed, the peak intensity column is hardwired to number 10 (the 11 th column) which contains either the peak height or peak volume data. Because the columns are fixed, the integration column number will be ignored.

NMRView: The file should be a NMRView peak list. The default is to use column 16 (which contains peak heights) for peak intensities. To use use peak volumes (or evolumes), int_col must be set to 15.

NMRPipe seriesTab: The file should be a NMRPipe-format Spectral Series list. If the spectrum_id=`auto', the IDs are auto generated in form of Z_A{i}.

Generic intensity file: This is a generic format which can be created by scripting to support non-supported peak lists. It should contain in the first few columns enough information to identify the spin. This can include columns for the molecule name, residue number, residue name, spin number, and spin name. Alternatively a spin ID string column can be used. The peak intensities can be placed in another column specified by the integration column number. Intensities from multiple spectra can be placed into different columns, and these can then be specified simultaneously by setting the integration column value to a list of columns. This list must be matched by setting the spectrum ID to a list of the same length. If columns are delimited by a character other than whitespace, this can be specified with the column separator. The spin ID can be used to restrict the loading to specific spin subsets.

Multiple files

The data from multiple files can be loaded simultaneously if a list of files is supplied. In this case, a list of spectrum ID strings of equal length must be supplied.

Prompt examples

To read the reference and saturated spectra peak heights from the Sparky formatted files `ref.list' and `sat.list', type:

[numbers=none]
relax> spectrum.read_intensities(file='ref.list', spectrum_id='ref')

[numbers=none]
relax> spectrum.read_intensities(file='sat.list', spectrum_id='sat')

To read the reference and saturated spectra peak heights from the XEasy formatted files `ref.text' and `sat.text', type:

[numbers=none]
relax> spectrum.read_intensities(file='ref.text', spectrum_id='ref')

[numbers=none]
relax> spectrum.read_intensities(file='sat.text', spectrum_id='sat')


The relax user manual (PDF), created 2020-08-26.