Package Bio :: Package NMR :: Module xpktools
[hide private]
[frames] | no frames]

Module xpktools

source code

Tools to manipulate data from nmrview .xpk peaklist files.
Classes [hide private]
  XpkEntry
Provide dictonary access to single entry from nmrview .xpk file.
  Peaklist
Provide access to header lines and data from a nmrview xpk file.
Functions [hide private]
 
replace_entry(line, fieldn, newentry)
Helper function replace an entry in a string by the field number.
source code
 
_find_start_entry(line, n)
Find the starting character for entry n in a space delimited line (PRIVATE).
source code
 
data_table(fn_list, datalabel, keyatom)
Generate a data table from a list of input xpk files.
source code
 
_read_dicts(fn_list, keyatom)
Read multiple files into a list of residue dictionaries (PRIVATE).
source code
Variables [hide private]
  HEADERLEN = 6
  __package__ = 'Bio.NMR'
Function Details [hide private]

replace_entry(line, fieldn, newentry)

source code 

Helper function replace an entry in a string by the field number.

No padding is implemented currently. Spacing will change if the original field entry and the new field entry are of different lengths.

_find_start_entry(line, n)

source code 

Find the starting character for entry n in a space delimited line (PRIVATE).

n is counted starting with 1. The n=1 field by definition begins at the first character.

Returns

starting character : str
The starting character for entry n.

data_table(fn_list, datalabel, keyatom)

source code 

Generate a data table from a list of input xpk files.

Parameters

fn_list : list
List of .xpk file names.
datalabel : str
The data element reported.
keyatom : str
The name of the nucleus used as an index for the data table.

Returns

outlist : list
List of table rows indexed by keyatom.