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 onhbond()
.- 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 ofbase_pairs()
.
- Returns:
- resultsndarray, dtype=uint8, shape=(n,2)
The
ndarray
has the same dimensions asbase_pairs
. Each cell corresponds to the interacting edge of the referenced base inbase_pairs
. The edge type is stored as integer that is interpreted as member of the theEdge
enum.
See also
base_pairs
Get the base pairs required for this function.
base_pairs_glycosidic_bond
Determine the orientation for each base pair.
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 toEdge.INVALID
).The edge returned always corresponds to the edge with the most hydrogen bonding interactions.
References
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(f"{Edge(interaction[0]).name} to {Edge(interaction[1]).name}") WATSON_CRICK to WATSON_CRICK WATSON_CRICK to WATSON_CRICK WATSON_CRICK to WATSON_CRICK WATSON_CRICK to WATSON_CRICK WATSON_CRICK to WATSON_CRICK WATSON_CRICK to WATSON_CRICK WATSON_CRICK to WATSON_CRICK WATSON_CRICK to WATSON_CRICK WATSON_CRICK to WATSON_CRICK WATSON_CRICK to WATSON_CRICK WATSON_CRICK to WATSON_CRICK WATSON_CRICK to WATSON_CRICK