Standardized nucleobase data type
Nucleobase represents a digital version of a physical nucleotide base in a
ribonucleic acid structure (DNA, RNA, mRNA, etc.).
Nucleobase enum has 5 variants just as nucleobases that exist in nature. There's:
Astute eyes will notice the fact that
Uracil have separate enumerations from one another
despite being nearly identical in every practical scenario. This is a conscious choice intended
to stand in-line with the Rust philosophy of having the least amount of compromises in code.
The goal is to allow users to determine how they handle
Uracil without making asumptions about implementation
inside of the library itself.
For that reason, helper methods that determine whether or not a nucleobase is a deoxyribonucleotide base or a ribonucleotide base have been included for those who desire that functionality without limiting those who do not care.
In addition to the methods indicating whether or not a base is a ribonucleotide base or a deoxyribonucleotide base, there are helper methods for determining whether or not the base is a:
With the three sets of binary property methods provided the exact identity of a nucleobase can be determined and serialized following the chart below.
|Pyrimidine||Thymine / Uracil||Cytosine|
Whether a base is Thymine or Uracil comes down to whether it is a deoxyribonucleotide base or a ribonucleotide base.
The error type for conversions between