rna_library.structure.hairpin

Module Contents

Classes

Hairpin

Represents a hairpin loop in an RNA structure. Inherits from Motif().

class rna_library.structure.hairpin.Hairpin(**kwargs)

Bases: rna_library.structure.motif.Motif

Inheritance diagram of rna_library.structure.hairpin.Hairpin

Represents a hairpin loop in an RNA structure. Inherits from Motif().

buffer(self)

For the Hairpin() type, this is simply the size of the closing helix meaning the number of closing pairs.

Returns

buffer

Return type

int

is_hairpin(self)

Indicates that the Motif() is of type Hairpin().

Returns

is_hairpin

Return type

bool

recursive_structure(self)

Returns the owned portion of the structure. In this coding of structure it is just the loop portion and does not include the closing pair.

Returns

recursive_structure

Return type

str

recursive_sequence(self)

Returns the owned portion of the sequence. In this coding of sequence it is just the loop portion and does not include the closing pair.

Returns

recursive_sequence

Return type

str

has_non_canonical(self)

Returns whether or not the closing pair is canonical (i.e. is AU/UA, CG/GC, GU/UG).

Returns

has_non_canonical

Return type

bool

generate_sequences(self)

Generates all possible sequences for the Hairpin() that are compatible with the constraints for the motif.