Isobar
Provides a transformer class for processing isobarically labeled proteomics data.
This module defines the IsotopeImpurityCorrecter
class for processing of isobaric
(e.g., TMT, iTRAQ) reporter intensities. This transformer must be fitted with an isotope
impurity matrix to correct interference in reporter intensities. Once fitted, the
transformer can then be applied to a table containing reporter ion intensities to adjust
its intensity values. The transformation returns a new copy of the table with the
processed values, leaving the original table unchanged.
Classes:
Name | Description |
---|---|
IsotopeImpurityCorrecter |
Corrects isotope impurity interference in isobaric reporter expression values. |
Functions:
Name | Description |
---|---|
correct_isobaric_reporter_impurities |
Performs isotope impurity correction on isobaric reporter expression values. |
IsotopeImpurityCorrecter
IsotopeImpurityCorrecter()
Corrects isotope impurity interference in isobaric reporter expression values.
Methods:
Name | Description |
---|---|
fit |
Fits the isotope impurity correcter to a given impurity matrix. |
is_fitted |
Returns True if the IsotopeImpurityCorrecter has been fitted. |
get_fits |
Returns a copy of the fitted impurity matrix. |
transform |
Applies isotope impurity correction to the values of the table. |
Source code in msreport\isobar.py
25 26 |
|
fit
fit(impurity_matrix: ndarray) -> Self
Fits the isotope impurity correcter to a given impurity matrix.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
impurity_matrix
|
ndarray
|
A reporter isotope impurity matrix in a diagonal format, where columns describe the isotope impurity of a specific channel, and the values in each row indicate the percentage of signal from the reporter that is present in each channel. Both dimensions of the impurity matrix must have the same length. |
required |
Returns:
Type | Description |
---|---|
Self
|
Returns the fitted class IsotopeImpurityCorrecter instance. |
Source code in msreport\isobar.py
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 |
|
is_fitted
is_fitted() -> bool
Returns True if the IsotopeImpurityCorrecter has been fitted.
Source code in msreport\isobar.py
48 49 50 |
|
get_fits
get_fits() -> ndarray
Returns a copy of the fitted impurity matrix.
Returns:
Type | Description |
---|---|
ndarray
|
A numpy array representing a diagonal impurity matrix. |
Source code in msreport\isobar.py
52 53 54 55 56 57 58 59 60 |
|
transform
transform(table: DataFrame) -> DataFrame
Applies isotope impurity correction to the values of the table.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
table
|
DataFrame
|
The data to normalize. The columns of the table must correspond to the channels of the impurity matrix used for fitting. |
required |
Returns:
Type | Description |
---|---|
DataFrame
|
A copy of the table with isotope impurity corrected values. |
Source code in msreport\isobar.py
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
|
correct_isobaric_reporter_impurities
correct_isobaric_reporter_impurities(
intensity_table: ndarray,
diagonal_impurity_matrix: ndarray,
) -> ndarray
Performs isotope impurity correction on isobaric reporter expression values.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
intensity_table
|
ndarray
|
A two-dimenstional array with columns corresponding to isobaric reporter channels and rows to measured units such as PSMs, peptides or proteins. |
required |
diagonal_impurity_matrix
|
ndarray
|
A reporter isotope impurity matrix in a diagonal format, where columns describe the isotope impurity of a specific channel, and the values in each row indicate the percentage of signal from the reporter that is present in each channel. |
required |
Source code in msreport\isobar.py
89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 |
|