Python API usage

class isopeptor.isopeptide.Isopeptide(struct_dir, distance=1.5, fixed_r_asa=None)[source]

Handles isopeptide bond prediction running pyjess via the jess_wrapper module and solvent accessible area via the asa module. Stores isopeptide bond predictions as a list of BondElement. Prediction is run for all structures from struct_dir. Structures in .pdb format are directly analysed. If structures are in .cif format, they are first converted into .pdb. If multiple matches with an isopeptide bond signature are detected, only the one with the lowest RMSD is retained.

struct_dir

where pdb/cif files are located

Type:

str

distance

that specifies permissivity of jess search

Type:

float

jess_output

that stores jess raw output for debug purposes

Type:

None | str

isopeptide_bonds

stores isopeptide bonds as BondElement elements

Type:

list

fixed_r_asa

which ranges between 0 and 1 that fixes r_asa allowing to skip its calculation

Type:

float | None

Example

>>> # Use a fixed solvent accessible area for a quick prediction:
>>> from isopeptor.isopeptide import Isopeptide
>>> i = Isopeptide("tests/data/test_structures", distance=1.5, fixed_r_asa=0.1)
>>> i.predict()
>>> i.isopeptide_bonds[0]
BondElement(struct_file=tests/data/test_structures/8beg.pdb, protein_name=8beg, rmsd=0.0, template=8beg_A_590_636_729, chain=A, r1_bond=590, r_cat=636, r2_bond=729, r1_bond_name=LYS, r_cat_name=ASP, r2_bond_name=ASN, bond_type=CnaA-like, r_asa=0.1, probability=0.986)
>>> # Calculate solvent accessible area for a more accurate (and slow) prediction:
>>> i = Isopeptide("tests/data/test_structures", distance=1.5)
>>> i.predict()
get_geometry()[source]

Get geometry measures (bond length and dihedral angles and map to existing distribution of measures from the database of PDB derived structures).

Example

>>> from isopeptor.isopeptide import Isopeptide
>>> i = Isopeptide("tests/data/test_structures", distance=1.5, fixed_r_asa=0.1)
>>> i.predict()
>>> i.get_geometry()
>>> i.print_tabular()
protein_name        probability     chain   r1_bond r_cat   r2_bond r1_bond_name    r_cat_name      r2_bond_name    bond_type       rmsd    r_asa      template                bond_length     bond_length_zscore      bond_length_allowed     pseudo_phi      pseudo_psi      pseudo_omega    phi_psi_likelihood phi_psi_allowed omega_psi_likelihood    omega_psi_allowed       omega_phi_likelihood    omega_phi_allowed
8beg                0.986           A       590     636     729     LYS             ASP             ASN             CnaA-like       0.0     0.1        8beg_A_590_636_729      1.33            0.024                   True                    92.305          -123.286        -0.032          -8.706             True            -7.801                  True                    -8.797                  True
8beg                0.986           A       756     806     894     LYS             ASP             ASN             CnaA-like       0.0     0.1        8beg_A_756_806_894      1.328           -0.0                    True                    -114.423        -130.136        44.142          -10.503            False           -10.472                 True                    -10.503                 False
8beg                0.986           A       922     973     1049    LYS             ASP             ASN             CnaA-like       0.0     0.1        8beg_A_922_973_1049     1.333           0.061                   True                    70.944          -131.258        17.005          -9.737             True            -8.997                  True                    -9.882                  True
8beg                0.986           A       1076    1123    1211    LYS             ASP             ASN             CnaA-like       0.0     0.1        8beg_A_1076_1123_1211   1.341           0.159                   True                    102.317         -124.836        2.258           -8.286             True            -7.882                  True                    -8.233                  True
5dz9                0.986           A       556     606     703     LYS             ASP             ASN             CnaA-like       0.0     0.1        4z1p_A_3_53_150         1.291           -0.451                  True                    109.407         -112.845        -8.356          -7.72              True            -7.722                  True                    -7.884                  True
5dz9                0.986           A       730     776     861     LYS             ASP             ASN             CnaA-like       0.0     0.1        4z1p_A_177_223_308      1.332           0.049                   True                    97.334          -122.501        6.356           -8.391             True            -7.892                  True                    -8.633                  True
4z1p                0.986           A       3       53      150     LYS             ASP             ASN             CnaA-like       0.0     0.1        4z1p_A_3_53_150         1.291           -0.451                  True                    109.407         -112.845        -8.356          -7.72              True            -7.722                  True                    -7.884                  True
4z1p                0.986           A       177     223     308     LYS             ASP             ASN             CnaA-like       0.0     0.1        4z1p_A_177_223_308      1.332           0.049                   True                    97.334          -122.501        6.356           -8.391             True            -7.892                  True                    -8.633                  True
7woi                0.935           B       57      158     195     LYS             GLU             ASN             CnaB-like       0.226   0.1        5j4m_A_47_139_172       1.312           -0.195                  True                    -148.85         71.47           179.899         -9.376             True            -9.126                  True                    -9.675                  True
7woi                0.89            A       203     246     318     LYS             ASP             ASN             CnaA-like       0.306   0.1        2woy_A_1259_1307_1393   1.336           0.098                   True                    136.992         -158.356        4.495           -14.872            False           -12.529                 False                   -9.337                  True
7woi                0.807           A       355     435     466     LYS             GLU             ASN             CnaB-like       0.398   0.1        6n0a_A_15_102_153       1.328           -0.0                    True                    106.44          118.566         168.851         -11.023            False           -10.77                  False                   -10.955                 False
1amx                0.793           A       176     209     293     LYS             ASP             ASN             CnaA-like       0.411   0.1        2f68_X_176_209_293      3.345           24.598                  False                   96.887          -147.455        66.383          -10.918            False           -14.477                 False                   -25.835                 False
6to1_af             0.495           A       13      334     420     LYS             ASP             ASN             CnaA-like       0.601   0.1        6to1_A_111_432_518      2.928           19.512                  False                   83.132          -155.408        131.186         -13.496            False           -51.581                 False                   -15.775                 False
8beg                0.016           B       662     591     589     LYS             GLU             ASN             CnaB-like       1.176   0.1        3pg2_A_387_471_515      4.806           42.415                  False                   -175.107        131.767         146.384         -11.214            False           -13.479                 False                   -11.449                 False
predict()[source]

Predict isopeptide bonds by 1. running jess template-based search, 2. calculating asa, 3. predicting isopeptide bond probability with logistic regression.

print_tabular()[source]

Print isopeptide bonds in a tabular format

Example

>>> from isopeptor.isopeptide import Isopeptide
>>> i = Isopeptide("tests/data/test_structures", distance=1.5, fixed_r_asa=0.1)
>>> i.predict()
>>> i.print_tabular()
protein_name        probability     chain   r1_bond r_cat   r2_bond r1_bond_name    r_cat_name      r2_bond_name    bond_type       rmsd    r_asa   template
8beg                0.986           A       590     636     729     LYS             ASP             ASN             CnaA-like       0.0     0.1     8beg_A_590_636_729
8beg                0.986           A       756     806     894     LYS             ASP             ASN             CnaA-like       0.0     0.1     8beg_A_756_806_894
8beg                0.986           A       922     973     1049    LYS             ASP             ASN             CnaA-like       0.0     0.1     8beg_A_922_973_1049
8beg                0.986           A       1076    1123    1211    LYS             ASP             ASN             CnaA-like       0.0     0.1     8beg_A_1076_1123_1211
5dz9                0.986           A       556     606     703     LYS             ASP             ASN             CnaA-like       0.0     0.1     4z1p_A_3_53_150
5dz9                0.986           A       730     776     861     LYS             ASP             ASN             CnaA-like       0.0     0.1     4z1p_A_177_223_308
4z1p                0.986           A       3       53      150     LYS             ASP             ASN             CnaA-like       0.0     0.1     4z1p_A_3_53_150
4z1p                0.986           A       177     223     308     LYS             ASP             ASN             CnaA-like       0.0     0.1     4z1p_A_177_223_308
7woi                0.935           B       57      158     195     LYS             GLU             ASN             CnaB-like       0.226   0.1     5j4m_A_47_139_172
7woi                0.89            A       203     246     318     LYS             ASP             ASN             CnaA-like       0.306   0.1     2woy_A_1259_1307_1393
7woi                0.807           A       355     435     466     LYS             GLU             ASN             CnaB-like       0.398   0.1     6n0a_A_15_102_153
1amx                0.793           A       176     209     293     LYS             ASP             ASN             CnaA-like       0.411   0.1     2f68_X_176_209_293
6to1_af             0.495           A       13      334     420     LYS             ASP             ASN             CnaA-like       0.601   0.1     6to1_A_111_432_518
8beg                0.016           B       662     591     589     LYS             GLU             ASN             CnaB-like       1.176   0.1     3pg2_A_387_471_515
save_csv(output_table='results.csv')[source]

Save isopeptide bond results in .csv format.

Parameters:

output_table (str) – path to output table

Return type:

None

Example

>>> from isopeptor.isopeptide import Isopeptide
>>> i = Isopeptide("tests/data/test_structures", distance=1.5, fixed_r_asa=0.1)
>>> i.predict()
>>> i.save_csv()