dot_bracket#

biotite.structure.dot_bracket(basepairs, length, scores=None, max_pseudoknot_order=None)[source]#

Represent a nucleic acid strand in dot-bracket-letter-notation (DBL-notation). [1]

The nucleic acid strand is represented as nucleotide sequence, where the nucleotides are counted continiously from zero.

Parameters:
basepairsndarray, shape=(n,2)

Each row corresponds to the positions of the bases in the strand.

lengthint

The number of bases in the strand.

scoresndarray, dtype=int, shape=(n,) (default: None)

The score for each base pair, which is passed on to pseudoknots()

max_pseudoknot_orderint (default: None)

The maximum pseudoknot order to be found. If a base pair would be of a higher order, it is represented as unpaired. If None is given, all pseudoknot orders are evaluated.

Returns:
notationslist [str, …]

The DBL-notation for each solution from pseudoknots().

References

Examples

The sequence ACGTC has a length of 5. If there was to be a pairing interaction between the A and T, basepairs would have the form:

>>> import numpy as np
>>> basepairs = np.array([[0, 3]])

The DBL Notation can then be found with dot_bracket():

>>> dot_bracket(basepairs, 5)[0]
'(..).'