biotite.structure.base_pairs_edge

biotite.structure.base_pairs_edge(atom_array, base_pairs)[source]

Get the interacting edges for given base pairs in an AtomArray according to the Leontis-Westhof nomenclature. 1

The AtomArray must contain hydrogens as it relies on hbond().

Parameters
atom_arrayAtomArray

The AtomArray containing the bases.

base_pairsndarray, dtype=int, shape=(n,2)

Each row is equivalent to one base pair and contains the first indices of the residues corresponding to each base. The structure of the ndarray is the same as the output of base_pairs().

Returns
resultsndarray, dtype=uint8, shape=(n,2)

The ndarray has the same dimensions as base_pairs. Each cell corresponds to the interacting edge of the referenced base in base_pairs. The edge type is stored as integer that is interpreted as member of the the Edge enum.

Notes

If a base is not a canonical base (A, C, G, T, U) or no hydrogen bonds are found between the bases that conform to the interacting edges described by Leontis and Westhof, 0 is returned (corresponding to Edge.INVALID).

The edge returned always corresponds to the edge with the most hydrogen bonding interactions.

References

1

N. B. Leontis, E. Westhof, “Geometric nomenclature and classification of RNA base pairs.,” RNA, vol. 7, pp. 499–512, April 2001. doi: 10.1017/s1355838201002515

Examples

Compute the interacting base edges for the dna helix with the PDB id 1QXB:

>>> from os.path import join
>>> dna_helix = load_structure(
...     join(path_to_structures, "base_pairs", "1qxb.cif")
... )
>>> basepairs = base_pairs(dna_helix)
>>> interacting_edges = base_pairs_edge(dna_helix, basepairs)
>>> print(interacting_edges)
[[1 1]
 [1 1]
 [1 1]
 [1 1]
 [1 1]
 [1 1]
 [1 1]
 [1 1]
 [1 1]
 [1 1]
 [1 1]
 [1 1]]

The resulting integers can be interpreted as Edge Enum:

>>> for interaction in interacting_edges:
...     print(Edge(interaction[0]), Edge(interaction[1]))
Edge.WATSON_CRICK Edge.WATSON_CRICK
Edge.WATSON_CRICK Edge.WATSON_CRICK
Edge.WATSON_CRICK Edge.WATSON_CRICK
Edge.WATSON_CRICK Edge.WATSON_CRICK
Edge.WATSON_CRICK Edge.WATSON_CRICK
Edge.WATSON_CRICK Edge.WATSON_CRICK
Edge.WATSON_CRICK Edge.WATSON_CRICK
Edge.WATSON_CRICK Edge.WATSON_CRICK
Edge.WATSON_CRICK Edge.WATSON_CRICK
Edge.WATSON_CRICK Edge.WATSON_CRICK
Edge.WATSON_CRICK Edge.WATSON_CRICK
Edge.WATSON_CRICK Edge.WATSON_CRICK