pyms.BillerBiemann
¶
Functions to perform Biller and Biemann deconvolution.
Functions:
|
Deconvolution based on the algorithm of Biller and Biemann (1974). |
|
Returns the scan indices for the apexes of the ion. |
|
List of retention time and intensity of local maxima for ion. |
|
List of retention time and intensity of local maxima for ion. |
|
Constructs a matrix containing only data for scans in which particular ions apexed. |
|
Remove Peaks where there are fewer than |
|
Remove ions with relative intensities less than the given relative percentage of the maximum intensity. |
|
Reconstruct the TIC as sum of maxima. |
-
BillerBiemann
(im, points=3, scans=1)[source]¶ Deconvolution based on the algorithm of Biller and Biemann (1974).
- Parameters:
im (
BaseIntensityMatrix
)points (
int
) – Number of scans over which to consider a maxima to be a peak. Default3
.scans (
int
) – Number of scans to combine peaks from to compensate for spectra skewing. Default1
.
- Return type:
- Returns:
List of detected peaks
- Authors:
Andrew Isaac, Dominic Davis-Foster (type assertions)
-
get_maxima_indices
(ion_intensities, points=3)[source]¶ Returns the scan indices for the apexes of the ion.
- Parameters:
- Author:
Andrew Isaac, Dominic Davis-Foster (type assertions)
Example:
>>> # A trivial set of data with two clear peaks >>> data = [1, 2, 3, 4, 5, 4, 3, 2, 1, 2, 3, 4, 5, 6, 5, 4, 3, 2, 1] >>> get_maxima_indices(data) [4, 13] >>> # Wider window (more points) >>> get_maxima_indices(data, points=10) [13]
-
get_maxima_list
(ic, points=3)[source]¶ List of retention time and intensity of local maxima for ion.
- Parameters:
ic (
IonChromatogram
)points (
int
) – Number of scans over which to consider a maxima to be a peak. Default3
.
- Return type:
- Returns:
A list of retention time and intensity of local maxima for ion.
- Author:
Andrew Isaac, Dominic Davis-Foster (type assertions)
-
get_maxima_list_reduced
(ic, mp_rt, points=13, window=3)[source]¶ List of retention time and intensity of local maxima for ion.
Only peaks around a specific retention time are recorded.Created for use with gap filling algorithm.- Parameters:
ic (
IonChromatogram
)mp_rt (
float
) – The retention time of the missing peakpoints (
int
) – Number of scans over which to consider a maxima to be a peak. Default13
.window (
int
) – The window aroundmp_rt
where peaks should be recorded. Default3
.
- Return type:
- Returns:
A list of 2-element tuple containing the retention time and intensity of local maxima for each ion.
- Author:
Andrew Isaac, Dominic Davis-Foster (type assertions)
-
get_maxima_matrix
(im, points=3, scans=1)[source]¶ Constructs a matrix containing only data for scans in which particular ions apexed.
The data can be optionally consolidated into the scan within a range with the highest total intensity by adjusting the
scans
parameter. By default this is1
, which does not consolidate the data.The columns are ion masses and the rows are scans. Get matrix of local maxima for each ion.
- Parameters:
im (
BaseIntensityMatrix
)points (
int
) – Number of scans over which to consider a maxima to be a peak. Default3
.scans (
int
) – Number of scans to combine peaks from to compensate for spectra skewing. Default1
.
- Return type:
- Returns:
A matrix of giving the intensities of ion masses (columns) and for each scan (rows).
- Author:
Andrew Isaac, Dominic Davis-Foster (type assertions)
-
num_ions_threshold
(pl, n, cutoff, copy_peaks=True)[source]¶ Remove Peaks where there are fewer than
n
ions with intensities above the given threshold.- Parameters:
- Return type:
- Returns:
A new list of Peak objects.
- Author:
Andrew Isaac, Dominic Davis-Foster (type assertions)
-
rel_threshold
(pl, percent=2, copy_peaks=True)[source]¶ Remove ions with relative intensities less than the given relative percentage of the maximum intensity.
- Parameters:
- Return type:
- Returns:
A new list of Peak objects with threshold ions.
- Author:
Andrew Isaac, Dominic Davis-Foster (type assertions)
-
sum_maxima
(im, points=3, scans=1)[source]¶ Reconstruct the TIC as sum of maxima.
- Parameters:
im (
BaseIntensityMatrix
)points (
int
) – Peak if maxima over ‘points’ number of scans. Default3
.scans (
int
) – Number of scans to combine peaks from to compensate for spectra skewing. Default1
.
- Return type:
- Returns:
The reconstructed TIC.
- Author:
Andrew Isaac, Dominic Davis-Foster (type assertions)