read(self,
file=None,
dir=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)
| source code
|
Read the molecule, residue, and spin sequence from a file.
Keyword Arguments
~~~~~~~~~~~~~~~~~
file: The name of the file containing the sequence data.
dir: The directory where the file is located.
spin_id_col: The spin ID string column (an alternative to the mol, res, and spin name and number
columns).
mol_name_col: The molecule name column (alternative to the spin_id_col).
res_num_col: The residue number column (alternative to the spin_id_col).
res_name_col: The residue name column (alternative to the spin_id_col).
spin_num_col: The spin number column (alternative to the spin_id_col).
spin_name_col: The spin name column (alternative to the spin_id_col).
sep: The column separator (the default is white space).
spin_id: The spin ID string to restrict the loading of data to certain spin subsets.
Description
~~~~~~~~~~~
The spin system can be identified in the file using two different formats. The first is the spin ID
string column which can include the molecule name, the residue name and number, and the spin name
and number. Alternatively the molecule name, residue number, residue name, spin number and/or spin
name columns can be supplied allowing this information to be in separate columns. Note that the
numbering of columns starts at one. The spin ID string can be used to restrict the reading to
certain spin types, for example only 15N spins when only residue information is in the file.
Examples
~~~~~~~~
The following commands will read protein backbone 15N sequence data out of a file called
'seq' where the residue numbers and names are in the first and second columns respectively:
relax> sequence.read('seq')
relax> sequence.read('seq', res_num_col=1, res_name_col=2)
relax> sequence.read(file='seq', res_num_col=1, res_name_col=2, sep=None)
The following commands will read the residue sequence out of the file 'noe.out' which also
contains the NOE values:
relax> sequence.read('noe.out')
relax> sequence.read('noe.out', res_num_col=1, res_name_col=2)
relax> sequence.read(file='noe.out', res_num_col=1, res_name_col=2)
The following commands will read the sequence out of the file 'noe.600.out' where the
residue numbers are in the second column, the names are in the sixth column and the columns
are separated by commas:
relax> sequence.read('noe.600.out', res_num_col=2, res_name_col=6, sep=',')
relax> sequence.read(file='noe.600.out', res_num_col=2, res_name_col=6, sep=',')
The following commands will read the RNA residues and atoms (including C2, C5, C6, C8, N1,
and N3) from the file '500.NOE', where the residue number, residue name, spin number, and
spin name are in the first to fourth columns respectively:
relax> sequence.read('500.NOE', res_num_col=1, res_name_col=2, spin_num_col=3,
spin_name_col=4)
relax> sequence.read(file='500.NOE', res_num_col=1, res_name_col=2, spin_num_col=3,
spin_name_col=4)
|