Package pipe_control :: Module spectrum
[hide private]
[frames] | no frames]

Module spectrum

source code

Module containing functions for the handling of peak intensities.

Functions [hide private]
 
__errors_height_no_repl()
Calculate the errors for peak heights when no spectra are replicated.
source code
 
__errors_repl(subset=None, verbosity=0)
Calculate the errors for peak intensities from replicated spectra.
source code
 
__errors_volume_no_repl(subset=None)
Calculate the errors for peak volumes when no spectra are replicated.
source code
 
add_spectrum_id(spectrum_id=None)
Add the spectrum ID to the data store.
source code
 
baseplane_rmsd(error=0.0, spectrum_id=None, spin_id=None)
Set the peak intensity errors, as defined as the baseplane RMSD.
source code
 
check_spectrum_id(id)
Check that the give spectrum ID exists.
source code
 
delete(spectrum_id=None)
Delete spectral data corresponding to the spectrum ID.
source code
 
error_analysis(subset=None)
Determine the peak intensity standard deviation.
source code
list of str
get_ids()
Return a list of all spectrum IDs.
source code
 
integration_points(N=0, spectrum_id=None, spin_id=None)
Set the number of integration points for the given spectrum.
source code
 
read(file=None, dir=None, spectrum_id=None, dim=1, int_col=None, int_method=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, verbose=True)
Read the peak intensity data.
source code
 
replicated(spectrum_ids=None)
Set which spectra are replicates.
source code
dict of bool
replicated_flags()
Create and return a dictionary of flags of whether the spectrum is replicated or not.
source code
list of str
replicated_ids(spectrum_id)
Create and return a list of spectra ID which are replicates of the given ID.
source code
Variables [hide private]
  __package__ = 'pipe_control'

Imports: sqrt, sys, warn, RelaxError, RelaxImplementError, RelaxNoSpectraError, write_data, read_peak_list, std, RelaxWarning, RelaxNoSpinWarning, pipes, check_mol_res_spin_data, generate_spin_id_unique, return_spin, spin_loop


Function Details [hide private]

__errors_repl(subset=None, verbosity=0)

source code 

Calculate the errors for peak intensities from replicated spectra.

Parameters:
  • subset (list of str) - The list of spectrum ID strings to restrict the analysis to.
  • verbosity (int) - The amount of information to print. The higher the value, the greater the verbosity.

add_spectrum_id(spectrum_id=None)

source code 

Add the spectrum ID to the data store.

Parameters:
  • spectrum_id (str) - The spectrum ID string.

baseplane_rmsd(error=0.0, spectrum_id=None, spin_id=None)

source code 

Set the peak intensity errors, as defined as the baseplane RMSD.

Parameters:
  • error (float) - The peak intensity error value defined as the RMSD of the base plane noise.
  • spectrum_id (str) - The spectrum id.
  • spin_id (str) - The spin identification string.

check_spectrum_id(id)

source code 

Check that the give spectrum ID exists.

Parameters:
  • id (str) - The spectrum ID to check for.
Raises:

delete(spectrum_id=None)

source code 

Delete spectral data corresponding to the spectrum ID.

Parameters:
  • spectrum_id (str) - The spectrum ID string.

error_analysis(subset=None)

source code 

Determine the peak intensity standard deviation.

Parameters:
  • subset (list of str) - The list of spectrum ID strings to restrict the analysis to.

get_ids()

source code 

Return a list of all spectrum IDs.

Returns: list of str
The list of spectrum IDs.

integration_points(N=0, spectrum_id=None, spin_id=None)

source code 

Set the number of integration points for the given spectrum.

Parameters:
  • N (int) - The number of integration points.
  • spectrum_id (str) - The spectrum ID string.
  • spin_id (None or str) - The spin ID string used to restrict the value to.

read(file=None, dir=None, spectrum_id=None, dim=1, int_col=None, int_method=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, verbose=True)

source code 

Read the peak intensity data.

Parameters:
  • file (str) - The name of the file containing the peak intensities.
  • dir (str) - The directory where the file is located.
  • spectrum_id (str or list of str) - The spectrum identification string.
  • dim (int) - The dimension of the peak list to associate the data with.
  • int_col (int or list of int) - The column containing the peak intensity data (used by the generic intensity file format).
  • int_method (str) - The integration method, one of 'height', 'point sum' or 'other'.
  • spin_id_col (int or None) - The column containing the spin ID strings (used by the generic intensity file format). If supplied, the mol_name_col, res_name_col, res_num_col, spin_name_col, and spin_num_col arguments must be none.
  • mol_name_col (int or None) - The column containing the molecule name information (used by the generic intensity file format). If supplied, spin_id_col must be None.
  • res_name_col (int or None) - The column containing the residue name information (used by the generic intensity file format). If supplied, spin_id_col must be None.
  • res_num_col (int or None) - The column containing the residue number information (used by the generic intensity file format). If supplied, spin_id_col must be None.
  • spin_name_col (int or None) - The column containing the spin name information (used by the generic intensity file format). If supplied, spin_id_col must be None.
  • spin_num_col (int or None) - The column containing the spin number information (used by the generic intensity file format). If supplied, spin_id_col must be None.
  • sep (str or None) - The column separator which, if None, defaults to whitespace.
  • spin_id (None or str) - The spin ID string used to restrict data loading to a subset of all spins. If 'auto' is provided for a NMRPipe seriesTab formatted file, the ID's are auto generated in form of Z_Ai.
  • ncproc (int or None) - The Bruker ncproc binary intensity scaling factor.
  • verbose (bool) - A flag which if True will cause all relaxation data loaded to be printed out.

replicated(spectrum_ids=None)

source code 

Set which spectra are replicates.

Parameters:
  • spectrum_ids (list of str) - A list of spectrum ids corresponding to replicated spectra.

replicated_flags()

source code 

Create and return a dictionary of flags of whether the spectrum is replicated or not.

Returns: dict of bool
The dictionary of flags of whether the spectrum is replicated or not.

replicated_ids(spectrum_id)

source code 

Create and return a list of spectra ID which are replicates of the given ID.

Parameters:
  • spectrum_id (str) - The spectrum ID to find all the replicates of.
Returns: list of str
The list of spectrum IDs which are replicates of spectrum_id.