pyaragorn 0.3.0__cp38-cp38-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ cython_extension(lib LINKS aragorn)
pyaragorn/__init__.py ADDED
@@ -0,0 +1,36 @@
1
+ from . import lib
2
+ from .lib import (
3
+ __version__,
4
+ Gene,
5
+ TRNAGene,
6
+ TMRNAGene,
7
+ RNAFinder,
8
+ ARAGORN_VERSION,
9
+ TRANSLATION_TABLES,
10
+ )
11
+
12
+ __doc__ = lib.__doc__
13
+ __all__ = [
14
+ "Gene",
15
+ "TRNAGene",
16
+ "TMRNAGene",
17
+ "RNAFinder",
18
+ "ARAGORN_VERSION",
19
+ "TRANSLATION_TABLES",
20
+ ]
21
+
22
+ __author__ = "Martin Larralde <martin.larralde@embl.de>"
23
+ __license__ = "GPL-3.0-or-later"
24
+
25
+ # Small addition to the docstring: we want to show a link redirecting to the
26
+ # rendered version of the documentation, but this can only work when Python
27
+ # is running with docstrings enabled
28
+ if __doc__ is not None:
29
+ __doc__ += """See Also:
30
+ An online rendered version of the documentation for this version
31
+ of the library on
32
+ `Read The Docs <https://pyaragorn.readthedocs.io/en/v{}/>`_.
33
+
34
+ """.format(
35
+ __version__
36
+ )
pyaragorn/lib.pyi ADDED
@@ -0,0 +1,107 @@
1
+ import typing
2
+ from typing import Literal, Union, Generic
3
+ from typing_extensions import Buffer
4
+
5
+ __version__: str
6
+
7
+ ARAGORN_VERSION: str
8
+ TRANSLATION_TABLES: typing.Set[int]
9
+
10
+ class Gene:
11
+ @property
12
+ def type(self) -> str: ...
13
+ @property
14
+ def begin(self) -> int: ...
15
+ @property
16
+ def end(self) -> int: ...
17
+ @property
18
+ def length(self) -> int: ...
19
+ @property
20
+ def strand(self) -> Literal[1, -1]: ...
21
+ @property
22
+ def energy(self) -> float: ...
23
+ @property
24
+ def raw_energy(self) -> float: ...
25
+ def sequence(self) -> str: ...
26
+
27
+ class TRNAGene(Gene):
28
+ @property
29
+ def type(self) -> Literal["tRNA"]: ...
30
+ @property
31
+ def amino_acid(self) -> str: ...
32
+ @property
33
+ def amino_acids(self) -> Union[Tuple[str], Tuple[str, str]]: ...
34
+ @property
35
+ def anticodon(self) -> str: ...
36
+ @property
37
+ def anticodon_offset(self) -> int: ...
38
+ @property
39
+ def anticodon_length(self) -> Literal[2, 3, 4]: ...
40
+
41
+ class TMRNAGene(Gene):
42
+ @property
43
+ def type(self) -> Literal["tmRNA"]: ...
44
+ @property
45
+ def permuted(self) -> bool: ...
46
+ @property
47
+ def orf_offset(self) -> int: ...
48
+ @property
49
+ def orf_length(self) -> int: ...
50
+ def orf(self, include_stop: bool = True) -> str: ...
51
+ def peptide(self, include_stop: bool = True) -> str: ...
52
+
53
+
54
+ class Cursor:
55
+ def __init__(self, obj: Union[str, bytes, bytearray, Buffer]) -> None: ...
56
+
57
+
58
+ G = typing.TypeVar("G", bound=Gene)
59
+
60
+ class RNAFinder(Generic[G]):
61
+ @typing.overload
62
+ def __init__(
63
+ self: RNAFinder[TRNAGene],
64
+ translation_table: int = 1,
65
+ *,
66
+ tmrna: Literal[False],
67
+ trna: Literal[True] = True,
68
+ linear: bool = False,
69
+ threshold_scale: float = 1.0,
70
+ ) -> None: ...
71
+ @typing.overload
72
+ def __init__(
73
+ self: RNAFinder[TMRNAGene],
74
+ translation_table: int = 1,
75
+ *,
76
+ trna: Literal[False],
77
+ tmrna: Literal[True] = True,
78
+ linear: bool = False,
79
+ threshold_scale: float = 1.0,
80
+ ) -> None: ...
81
+ @typing.overload
82
+ def __init__(
83
+ self: RNAFinder[Union[TRNAGene, TMRNAGene]],
84
+ translation_table: int = 1,
85
+ *,
86
+ trna: bool = True,
87
+ tmrna: bool = True,
88
+ linear: bool = False,
89
+ threshold_scale: float = 1.0,
90
+ ) -> None: ...
91
+ def __repr__(self) -> str: ...
92
+ @property
93
+ def translation_table(self) -> int: ...
94
+ @property
95
+ def trna(self) -> bool: ...
96
+ @property
97
+ def tmrna(self) -> bool: ...
98
+ @property
99
+ def linear(self) -> bool: ...
100
+ @property
101
+ def threshold_scale(self) -> float: ...
102
+ @threshold_scale.setter
103
+ def threshold_scale(self, threshold_scale: float) -> None: ...
104
+ def find_rna(
105
+ self,
106
+ sequence: Union[str, bytes, bytearray, Buffer],
107
+ ) -> List[G]: ...