Subsections


spectrum.read_spins

Image fid Image document-open

Synopsis

Read peak assignments from a file and create spins.

Defaults

spectrum.read_spins(file=None, dir=None, dim=1, 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)

Keyword arguments

file: The name of the file containing the intensity data.

dir: The directory where the file is located.

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

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.

Description

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.

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.

Prompt examples

To read the spin assignments from the Sparky formatted files `ref.list' and `sat.list', type:

[numbers=none]
relax> spectrum.read_spins(file='ref.list')

[numbers=none]
relax> spectrum.read_spins(file='sat.list')

To read the spin assignments from the XEasy formatted files `ref.text' and `sat.text', type:

[numbers=none]
relax> spectrum.read_spins(file='ref.text')

[numbers=none]
relax> spectrum.read_spins(file='sat.text')


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