Skip to content

Commit

Permalink
DOC: Fix text formatting for tables in sequence subpackages (scikit-b…
Browse files Browse the repository at this point in the history
  • Loading branch information
mataton authored Feb 26, 2024
1 parent 48e3a13 commit 7210493
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 54 deletions.
34 changes: 17 additions & 17 deletions skbio/sequence/_dna.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,13 @@ class DNA(GrammaredSequence, NucleotideMixin):
+-----+-----------+
|Code |Nucleobase |
+=====+===========+
|`A` |Adenine |
|``A``|Adenine |
+-----+-----------+
|`C` |Cytosine |
|``C``|Cytosine |
+-----+-----------+
|`G` |Guanine |
|``G``|Guanine |
+-----+-----------+
|`T` |Thymine |
|``T``|Thymine |
+-----+-----------+
And the following 11 degenerate characters, each of which representing 2-4
Expand All @@ -76,33 +76,33 @@ class DNA(GrammaredSequence, NucleotideMixin):
+-----+-------------+-----------+
|Code |Nucleobases |Meaning |
+=====+=============+===========+
|`R` |A or G |Purine |
|``R``|A or G |Purine |
+-----+-------------+-----------+
|`Y` |C or T |Pyrimidine |
|``Y``|C or T |Pyrimidine |
+-----+-------------+-----------+
|`S` |G or C |Strong |
|``S``|G or C |Strong |
+-----+-------------+-----------+
|`W` |A or T |Weak |
|``W``|A or T |Weak |
+-----+-------------+-----------+
|`K` |G or T |Keto |
|``K``|G or T |Keto |
+-----+-------------+-----------+
|`M` |A or C |Amino |
|``M``|A or C |Amino |
+-----+-------------+-----------+
|`B` |C, G or T |Not A |
|``B``|C, G or T |Not A |
+-----+-------------+-----------+
|`D` |A, G or T |Not C |
|``D``|A, G or T |Not C |
+-----+-------------+-----------+
|`H` |A, C or T |Not G |
|``H``|A, C or T |Not G |
+-----+-------------+-----------+
|`V` |A, C or G |Not T |
|``V``|A, C or G |Not T |
+-----+-------------+-----------+
|`N` |A, C, G or T |Any |
|``N``|A, C, G or T |Any |
+-----+-------------+-----------+
Plus two gap characters: `-` and `.`.
Plus two gap characters: ``-`` and ``.``.
Characters other than the above 17 are not allowed. If you intend to use
additional characters to represent non-canonical nucleobases, such as `I`
additional characters to represent non-canonical nucleobases, such as ``I``
(Inosine), you may create a custom alphabet using ``GrammaredSequence``.
Directly modifying the alphabet of ``DNA`` may break methods that rely on
the IUPAC alphabet.
Expand Down
58 changes: 29 additions & 29 deletions skbio/sequence/_protein.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,45 +59,45 @@ class Protein(GrammaredSequence):
+-----+---------+--------------+
|Code |3-letter |Amino acid |
+=====+=========+==============+
|`A` |Ala |Alanine |
|``A``|Ala |Alanine |
+-----+---------+--------------+
|`C` |Cys |Cysteine |
|``C``|Cys |Cysteine |
+-----+---------+--------------+
|`D` |Asp |Aspartic acid |
|``D``|Asp |Aspartic acid |
+-----+---------+--------------+
|`E` |Glu |Glutamic acid |
|``E``|Glu |Glutamic acid |
+-----+---------+--------------+
|`F` |Phe |Phenylalanine |
|``F``|Phe |Phenylalanine |
+-----+---------+--------------+
|`G` |Gly |Glycine |
|``G``|Gly |Glycine |
+-----+---------+--------------+
|`H` |His |Histidine |
|``H``|His |Histidine |
+-----+---------+--------------+
|`I` |Ile |Isoleucine |
|``I``|Ile |Isoleucine |
+-----+---------+--------------+
|`K` |Lys |Lysine |
|``K``|Lys |Lysine |
+-----+---------+--------------+
|`L` |Leu |Leucine |
|``L``|Leu |Leucine |
+-----+---------+--------------+
|`M` |Met |Methionine |
|``M``|Met |Methionine |
+-----+---------+--------------+
|`N` |Asn |Asparagine |
|``N``|Asn |Asparagine |
+-----+---------+--------------+
|`P` |Pro |Proline |
|``P``|Pro |Proline |
+-----+---------+--------------+
|`Q` |Gln |Glutamine |
|``Q``|Gln |Glutamine |
+-----+---------+--------------+
|`R` |Arg |Arginine |
|``R``|Arg |Arginine |
+-----+---------+--------------+
|`S` |Ser |Serine |
|``S``|Ser |Serine |
+-----+---------+--------------+
|`T` |Thr |Threonine |
|``T``|Thr |Threonine |
+-----+---------+--------------+
|`V` |Val |Valine |
|``V``|Val |Valine |
+-----+---------+--------------+
|`W` |Trp |Tryptophan |
|``W``|Trp |Tryptophan |
+-----+---------+--------------+
|`Y` |Tyr |Tyrosine |
|``Y``|Tyr |Tyrosine |
+-----+---------+--------------+
And the following four degenerate characters, each of which representing
Expand All @@ -106,27 +106,27 @@ class Protein(GrammaredSequence):
+-----+---------+------------+
|Code |3-letter |Amino acids |
+=====+=========+============+
|`B` |Asx |D or N |
|``B``|Asx |D or N |
+-----+---------+------------+
|`Z` |Glx |E or Q |
|``Z``|Glx |E or Q |
+-----+---------+------------+
|`J` |Xle |I or L |
|``J``|Xle |I or L |
+-----+---------+------------+
|`X` |Xaa |All 20 |
|``X``|Xaa |All 20 |
+-----+---------+------------+
Plus one stop character: `*` (Ter), and two gap characters: `-` and `.`.
Plus one stop character: ``*`` (Ter), and two gap characters: ``-`` and ``.``.
Characters other than the above 27 are not allowed. If you intend to use
additional characters to represent non-canonical amino acids, such as `U`
(Sec, Selenocysteine) and `O` (Pyl, Pyrrolysine), you may create a custom
additional characters to represent non-canonical amino acids, such as ``U``
(Sec, Selenocysteine) and ``O`` (Pyl, Pyrrolysine), you may create a custom
alphabet using ``GrammaredSequence``. Directly modifying the alphabet of
``Protein`` may break functions that rely on the IUPAC alphabet.
It should be noted that some functions do not support certain characters.
For example, the BLOSUM and PAM substitution matrices do not support `J`
For example, the BLOSUM and PAM substitution matrices do not support ``J``
(Xle). In such circumstances, unsupported characters will be replaced with
`X` to represent any of the canonical amino acids.
``X`` to represent any of the canonical amino acids.
References
----------
Expand Down
16 changes: 8 additions & 8 deletions skbio/sequence/_rna.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,19 +60,19 @@ class RNA(GrammaredSequence, NucleotideMixin):
+-----+-----------+
|Code |Nucleobase |
+=====+===========+
|`A` |Adenine |
|``A``|Adenine |
+-----+-----------+
|`C` |Cytosine |
|``C``|Cytosine |
+-----+-----------+
|`G` |Guanine |
|``G``|Guanine |
+-----+-----------+
|`U` |Uracil |
|``U``|Uracil |
+-----+-----------+
Plus 11 degenerate characters: `R`, `Y`, `S`, `W`, `K`, `M`, `B`, `D`, `H`,
`V` and `N`, and two gap characters: `-` and `.`. The definitions of
degenerate characters are provided in ``DNA``, in which `T` should be
replaced with `U` for RNA sequences.
Plus 11 degenerate characters: ``R``, ``Y``, ``S``, ``W``, ``K``, ``M``, ``B``,
``D``, ``H``, ``V`` and ``N``, and two gap characters: ``-`` and ``.``. The
definitions of degenerate characters are provided in ``DNA``, in which ``T`` should
be replaced with ``U`` for RNA sequences.
Characters other than the above 17 are not allowed. To include additional
characters, you may create a custom alphabet using ``GrammaredSequence``.
Expand Down

0 comments on commit 7210493

Please sign in to comment.