rna_library.core.enums¶
Enumerated types for base pairs, nucleotides and motifs. Assist with ensuring type correctness and lowers overhead vs string-based implementations.
Module Contents¶
Classes¶
Enumerated type for canoncial and wobble basepairs. |
|
Enumerated type for all nucleotide types. |
|
Enumerated type for all motif types |
Attributes¶
A |
|
A |
|
A |
|
A |
|
A |
|
A |
|
A |
|
A |
|
A :class: dict() object that maps a :class: MotifType to its value |
-
rna_library.core.enums.ALLOWED_PAIRS¶ A
set()containing all 6 canonical and wobble basepairings.
-
rna_library.core.enums.BPS= ['GU', 'UG', 'AU', 'UA', 'GC', 'CG']¶ A
tuple()of allowed canonical and wobble basepairings. Ordered for easy conversion by theBasePair()class.
-
rna_library.core.enums.LEGAL_BPS¶ A
set()of all 4 allowed nucleotide types.
-
rna_library.core.enums.NTS= ['A', 'C', 'G', 'U']¶ A
tuple()of all 4 canonical nucleotide types. Ordered for each conversion by theNucleotide()class.
-
class
rna_library.core.enums.BasePair¶ Bases:
enum.IntEnum
Enumerated type for canoncial and wobble basepairs.
-
GU= 0¶
-
UG= 1¶
-
AU= 2¶
-
UA= 3¶
-
GC= 4¶
-
CG= 5¶
-
is_GU(self)¶ - Returns
If the instance is a UG or GU pair.
- Return type
bool()
-
is_AU(self)¶ - Returns
If the instance is a UA or AU pair.
- Return type
bool()
-
is_GC(self)¶ - Returns
If the instance is a CG or GC pair.
- Return type
bool()
-
is_canoncial(self)¶ - Returns
If the instance is a canonical Watson-Crick basepair.
- Return type
bool()
-
to_str(self)¶ - Returns
The
BasePair()instance in text form.- Return type
str()
-
-
rna_library.core.enums.BP_VALS¶ A
list()that contains the integer values for all of theBasePair()enumerations.
-
rna_library.core.enums.BASEPAIR_MAPPER¶ A
dict()object that maps a canonical basepair to itsBasePair()value.
-
class
rna_library.core.enums.Nucleotide¶ Bases:
enum.IntEnum
Enumerated type for all nucleotide types.
-
A= [0]¶
-
C= [1]¶
-
G= [2]¶
-
U= 3¶
-
to_str(self)¶ - Returns
The
Nucleotide()instance in text form.- Return type
str()
-
-
rna_library.core.enums.NT_VALS¶ A
list()that contains the integer values for all of theNucleotide()enumerations.
-
rna_library.core.enums.NUCLEOTIDE_MAPPER¶ A
dict()object that maps a canoncial nucleotide to itsNucleotide()value.
-
class
rna_library.core.enums.MotifType¶ Bases:
enum.IntEnum
Enumerated type for all motif types
-
UNASSIGNED= 0¶
-
SINGLESTRAND= 1¶
-
HELIX= 2¶
-
HAIRPIN= 3¶
-
JUNCTION= 4¶
-
-
rna_library.core.enums.TYPE_MAPPER¶ A :class: dict() object that maps a :class: MotifType to its value as a str().