kinactive.features module
Variables’ definitions and calculation.
- class kinactive.features.DefaultFeatures(profile_pos: tuple[int, ...] = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 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, 87, 88, 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, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264), xdfgx: tuple[int, ...] = (140, 141, 142, 143), hrd: tuple[int, int, int] = (121, 122, 123), al: tuple[int, ...] = (135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149), b3_sheet: tuple[int, ...] = (24, 25, 26, 27, 28, 29, 30), ac_helix: tuple[int, ...] = (37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56), pocket: tuple[int, ...] = (7, 8, 9, 10, 14, 15, 28, 30, 48, 61, 77, 78, 79, 80, 81, 83, 84, 87, 123, 125, 127, 128, 130, 140, 141, 142))[source]
Bases:
objectA default feature set based on the PF00069 PK profile positions.
- __init__(profile_pos: tuple[int, ...] = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 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, 87, 88, 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, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264), xdfgx: tuple[int, ...] = (140, 141, 142, 143), hrd: tuple[int, int, int] = (121, 122, 123), al: tuple[int, ...] = (135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149), b3_sheet: tuple[int, ...] = (24, 25, 26, 27, 28, 29, 30), ac_helix: tuple[int, ...] = (37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56), pocket: tuple[int, ...] = (7, 8, 9, 10, 14, 15, 28, 30, 48, 61, 77, 78, 79, 80, 81, 83, 84, 87, 123, 125, 127, 128, 130, 140, 141, 142)) None
- calculate_all_vs(chains: Sequence[Chain], map_name: str = 'PK', num_proc: int = 1, verbose: bool = True, base: Path | None = None, overwrite: bool = False) Results[source]
Calculate default variables. These include four sets:
#. A default set of sequence variables for canonical sequences. #. A default set of sequence variables for structure sequences. #. A default set of structure variables. #. A default set of ligand variables.
- Parameters:
chains – A sequence of chains.
map_name – A reference name.
num_proc – The number of CPUs to use.
verbose – Display progress bar.
base – Base path to save the results to. If not provided, the results are returned but not saved.
overwrite – Overwrite existing files. If False, will skip the calculation of existing variables.
- Returns:
A named tuple with calculated variables’ tables.
- calculate_lig_vs(chains: Sequence[ChainStructure], map_name: str = 'PK', num_proc: int = 1, verbose: bool = True) DataFrame[source]
Calculate default ligand variables.
- Parameters:
chains – A sequence of chain structures.
map_name – A reference name.
num_proc – The number of CPUs to use.
verbose – Display progress bar.
- Returns:
A table with calculated variables.
- calculate_seq_vs(chains: Sequence[ChainSequence], map_name: str = 'PK', num_proc: int = 1, verbose: bool = True) DataFrame[source]
Calculate default sequence variables.
- Parameters:
chains – A sequence of chain sequences.
map_name – A reference name.
num_proc – The number of CPUs to use.
verbose – Display progress bar.
- Returns:
A table with calculated variables.
- calculate_str_vs(chains: Sequence[ChainStructure], map_name: str = 'PK', num_proc: int = 1, verbose: bool = True) DataFrame[source]
Calculate default structure variables.
- Parameters:
chains – A sequence of chain structures.
map_name – A reference name.
num_proc – The number of CPUs to use.
verbose – Display progress bar.
- Returns:
A table with calculated variables.
- make_lig_vs() tuple[StructureVariable, ...][source]
Make a default list of ligand variables including:
#. A count of ligand contacts per position. #. A minimum position-wise distance to the closest ligand. #. The closest contacting ligand's name per position.
- Returns:
A default set of ligand variables.
- make_seq_vs() tuple[SequenceVariable, ...][source]
Make a default list of sequence variables including:
#. Sequence elements at positions 30, 48 and 140-144 #. ProtFP variables with three components for each profile position.
- Returns:
A default set of sequence variables.
- make_str_vs() tuple[StructureVariable, ...][source]
Make a list of structural variables including:
#. SASA for each position. #. Pseudo dihedral angles for each consecutive quadruplet. #. Phi angles for each position except the very first one. #. Psi angles for each position except the very last one. #. Chi1 angles for each position. #. Pairwise CB-CB distances between the pocket residues. #. Distances from the pocket residues CB to the DFG-Asp CG atom. #. Distances from the pocket residues CB to the DFG-Phe CZ atom. #. A distance between the DFG-Asp CG and the DFG-Phe CZ #. A distance between the B3-Lys NZ and aC-Glu CD
- Returns:
A default set of structural variables.
- ac_helix: tuple[int, ...] = (37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56)
aC helix profile positions.
- al: tuple[int, ...] = (135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149)
Activation loop profile positions.
- b3_sheet: tuple[int, ...] = (24, 25, 26, 27, 28, 29, 30)
B3 sheet profile positions.
- hrd: tuple[int, int, int] = (121, 122, 123)
HRD motif’s profile positions.
- pocket: tuple[int, ...] = (7, 8, 9, 10, 14, 15, 28, 30, 48, 61, 77, 78, 79, 80, 81, 83, 84, 87, 123, 125, 127, 128, 130, 140, 141, 142)
Pocket residues profile positions.
- profile_pos: tuple[int, ...] = (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 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, 87, 88, 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, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264)
PK HMM profile positions
- xdfgx: tuple[int, ...] = (140, 141, 142, 143)
xDFGx profile positions (DFG motif plus the two residues around).
- class kinactive.features.Results(seq_vs, str_seq_vs, lig_vs, str_vs)
Bases:
tuple- lig_vs: DataFrame
Alias for field number 2
- seq_vs: DataFrame
Alias for field number 0
- str_seq_vs: DataFrame
Alias for field number 1
- str_vs: DataFrame
Alias for field number 3
- kinactive.features.calculate(chains: Sequence[ChainSequence | ChainStructure], vs: Sequence[SequenceVariable | StructureVariable], num_proc: int = 1, verbose: bool = True, **kwargs) DataFrame[source]
Calculate variables and aggregate the results.
- Parameters:
chains – A sequence of Chain*-type objects.
vs – A sequence of variables to calculate.
num_proc – A number of processors to use for the calculation.
verbose – Display progress bar.
kwargs – Passed to the
Manager.calculate()(seelXtractordocs).
- Returns:
- kinactive.features.init_vs(var_names: Iterable[str]) list[SequenceVariable | StructureVariable][source]
Initialize variables from their string representations.
- Parameters:
var_names – Variable names.
- Returns:
A sorted list of unique initialized variables.