Skip to content

emzed.quantification

integrate(peak_table, peak_shape_model, ms_level=None, show_progress=True, n_cores=1, min_size_for_parallel_execution=MIN_SIZE_DEFAULT, post_fixes=None, max_cores=8, in_place=False, path=None, overwrite=False, **model_extra_args)

integrates peaks of peak_table.

Parameters:

Name Type Description Default
peak_table

emzed.Table with required columns id, mzmin, mzmax, rtmin, rtmax, peakmap.

required
peak_shape_model

String of model name applied to determine peak area. Available models are: asym_gauss, linear, no_integration, sgolay, emg.

required
ms_level

MS level of peak integration. Must only be specified if peakmap has more than one MS levels. Default = None.

None
show_progress

Boolean value to activate progress bar. Default = True.

True
n_cores

Defines the number of cores used for multicore processing. If n_cores exceeds the number of available cores a warning is displayed and. Default = 1.

1
min_size_for_parallel_execution

Defines the number of table rows required to execute multicore processing. Default = 100.

MIN_SIZE_DEFAULT
post_fixes

Defines a subset of peaks via postfixes i. e. ['__0', '__1']. By default, all peak_tables of a table get integrated. Default = None.

None
max_cores

The maximal number of cores used for multicore processing. If max_cores exceeds the number of available cores a warning is displayed and the n_cores is set to max_cores. Default is 8.

8
in_place

Allows operation in place if True. Note: if in_place is True multicore processing is not possible and n_cores is set to 1. Default = False. Using in-place integration has performance benefits.

False
path

If specified the result will be a Table with a db file backend, else the result will be managed in memory.

None
overwrite

Indicate if an already existing database file should be overwritten.

False

Returns:

Type Description

emzed.Table by default. Returns None if in_place is True

Example:

For given peak_table t:

.. parsed-literal::

id   mzmin       mzmax       rtmin     rtmax
int  float       float       RtType    RtType
---  ----------  ----------  --------  --------
0  791.488450  791.498450    0.46 m    1.01 m
1  741.464140  741.474140    0.50 m    0.76 m
2  895.064630  895.074630    3.70 m    4.07 m

.. code-block:: python

t1=emzed.quantification.integrate(t, 'linear')

.. parsed-literal::

id   mzmin       mzmax       rtmin     rtmax     peak_shape_model  area      rmse      valid_model
int  float       float       RtType    RtType    str               float     float     bool
---  ----------  ----------  --------  --------  ----------------  --------  --------  -----------
0  791.488450  791.498450    0.46 m    1.01 m    linear            1.34e+07  0.00e+00         True
1  741.464140  741.474140    0.50 m    0.76 m    linear            3.03e+06  0.00e+00         True
2  895.064630  895.074630    3.70 m    4.07 m    linear            1.68e+06  0.00e+00         True

integrate_chromatograms(chromatogram_table, peak_shape_model, ms_level=None, show_progress=True, n_cores=1, min_size_for_parallel_execution=MIN_SIZE_DEFAULT, post_fixes=None, max_cores=8, in_place=False, path=None, overwrite=False, **model_extra_args)

integrates peaks of chromatogram_table.

Parameters:

Name Type Description Default
chromatogram_table

emzed.Table with required columns id, mzmin, mzmax, rtmin, rtmax, peakmap.

required
peak_shape_model

String of model name applied to determine peak area. Available models are: asym_gauss, linear, no_integration, sgolay, emg.

required
ms_level

MS level of peak integration. Must only be specified if peakmap has more than one MS levels. Default = None.

None
show_progress

Boolean value to activate progress bar. Default = True.

True
n_cores

Defines the number of cores used for multicore processing. If n_cores exceeds the number of available cores a warning is displayed and. Default = 1.

1
min_size_for_parallel_execution

Defines the number of table rows required to execute multicore processing. Default = 100.

MIN_SIZE_DEFAULT
post_fixes

Defines a subset of peaks via postfixes i. e. ['__0', '__1']. By default, all peak_tables of a table get integrated. Default = None.

None
max_cores

The maximal number of cores used for multicore processing. If max_cores exceeds the number of available cores a warning is displayed and the n_cores is set to max_cores. Default is 8.

8
in_place

Allows operation in place if True. Note: if in_place is True multicore processing is not possible and n_cores is set to 1. Default = False. Using in-place integration has performance benefits.

False
path

If specified the result will be a Table with a db file backend, else the result will be managed in memory.

None
overwrite

Indicate if an already existing database file should be overwritten.

False

Returns:

Type Description

emzed.Table by default. Returns None if in_place is True