Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
Code should function as-is but needs more comments and docstrings
  • Loading branch information
Joseph-Ellaway committed Jan 5, 2024
1 parent 3cb37ba commit fe2df2b
Show file tree
Hide file tree
Showing 5 changed files with 446 additions and 2 deletions.
32 changes: 30 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,30 @@
# per-residue-distance
Calculates the per-residue atomic distance between two chains

# Plotting code for per-residue atomic distances



Obtain rotation-translation matrices from the PDBe FTP server:

```https://ftp.ebi.ac.uk/pub/databases/pdbe-kb/superposition/<uniprot>[0]/<uniprot>/<uniprot>.json```

E.g.

```wget https://ftp.ebi.ac.uk/pub/databases/pdbe-kb/superposition/A/A0QTT2/A0QTT2.json```


Obtain updated mmCIF files (the normal, non-SIFTS mmCIF file type will not work) using:


```https://www.ebi.ac.uk/pdbe/entry-files/download/<pdbid>_updated.cif```

E.g.

```wget https://www.ebi.ac.uk/pdbe/entry-files/download/7cyr_updated.cif```

## Example

``` python
python3 per_residue_distance.py --mmcif1 example_data/7cyr_updated.cif.gz --mmcif2 example_data/7cy2_updated.cif.gz --rt_matrices example_data/A0QTT2.json --pdb_id1 7cyr --pdb_id2 7cy2 --chain1 A --chain2 A
```

Chain IDs should be parsed as `label_asym_id` from the updated mmcif `atom_site` loop.
Binary file added example_data/7cy2_updated.cif.gz
Binary file not shown.
Binary file added example_data/7cyr_updated.cif.gz
Binary file not shown.
95 changes: 95 additions & 0 deletions example_data/A0QTT2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
{
"7cy2_A": {
"pdb_id": "7cy2",
"auth_asym_id": "A",
"struct_asym_id": "A",
"matrix": [
[
1.0,
0.0,
0.0,
0.0
],
[
0.0,
1.0,
-0.0,
0.0
],
[
-0.0,
-0.0,
1.0,
0.0
],
[
0,
0,
0,
1
]
]
},
"7cyr_A": {
"pdb_id": "7cyr",
"auth_asym_id": "A",
"struct_asym_id": "A",
"matrix": [
[
0.938,
-0.289,
0.19,
-12.116
],
[
-0.038,
0.46,
0.887,
4.053
],
[
-0.344,
-0.84,
0.42,
4.58
],
[
0,
0,
0,
1
]
]
},
"7cz2_A": {
"pdb_id": "7cz2",
"auth_asym_id": "A",
"struct_asym_id": "A",
"matrix": [
[
-0.085,
0.465,
0.881,
-24.287
],
[
0.348,
0.843,
-0.412,
17.893
],
[
-0.934,
0.271,
-0.233,
28.361
],
[
0,
0,
0,
1
]
]
}
}
Loading

0 comments on commit fe2df2b

Please sign in to comment.