pyaragorn 0.3.0__cp38-cp38-win_amd64.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.
- pyaragorn/CMakeLists.txt +1 -0
- pyaragorn/__init__.py +36 -0
- pyaragorn/lib.cp38-win_amd64.pyd +0 -0
- pyaragorn/lib.pyi +107 -0
- pyaragorn/lib.pyx +834 -0
- pyaragorn/py.typed +0 -0
- pyaragorn/tests/__init__.py +10 -0
- pyaragorn/tests/data/CP001621.default.txt +95 -0
- pyaragorn/tests/data/CP001621.fna.gz +0 -0
- pyaragorn/tests/data/CP001621.ps95.txt +101 -0
- pyaragorn/tests/data/__init__.py +30 -0
- pyaragorn/tests/fasta.py +86 -0
- pyaragorn/tests/requirements.txt +1 -0
- pyaragorn/tests/test_doctest.py +93 -0
- pyaragorn/tests/test_rna_finder.py +104 -0
- pyaragorn-0.3.0.dist-info/METADATA +212 -0
- pyaragorn-0.3.0.dist-info/RECORD +19 -0
- pyaragorn-0.3.0.dist-info/WHEEL +5 -0
- pyaragorn-0.3.0.dist-info/licenses/COPYING +674 -0
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: pyaragorn
|
|
3
|
+
Version: 0.3.0
|
|
4
|
+
Summary: Cython bindings and Python interface to ARAGORN, a tRNA and mtRNA detection software.
|
|
5
|
+
Keywords: bioinformatics,gene,transfer,messenger,RNA
|
|
6
|
+
Author-Email: Martin Larralde <martin.larralde@embl.de>
|
|
7
|
+
License-Expression: GPL-3.0-or-later
|
|
8
|
+
Classifier: Development Status :: 3 - Alpha
|
|
9
|
+
Classifier: Intended Audience :: Developers
|
|
10
|
+
Classifier: Intended Audience :: Science/Research
|
|
11
|
+
Classifier: Operating System :: OS Independent
|
|
12
|
+
Classifier: Programming Language :: C
|
|
13
|
+
Classifier: Programming Language :: Cython
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.7
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
22
|
+
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
23
|
+
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
|
24
|
+
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
|
|
25
|
+
Classifier: Topic :: Scientific/Engineering :: Medical Science Apps.
|
|
26
|
+
Classifier: Typing :: Typed
|
|
27
|
+
Project-URL: Documentation, https://pyaragorn.readthedocs.io/en/stable/
|
|
28
|
+
Project-URL: Bug Tracker, https://github.com/althonos/pyaragorn/issues
|
|
29
|
+
Project-URL: Changelog, https://github.com/althonos/pyaragorn/blob/master/CHANGELOG.md
|
|
30
|
+
Project-URL: Coverage, https://codecov.io/gh/althonos/pyaragorn/
|
|
31
|
+
Project-URL: Builds, https://github.com/althonos/pyaragorn/actions
|
|
32
|
+
Project-URL: PyPI, https://pypi.org/project/pyaragorn
|
|
33
|
+
Project-URL: PiWheels, https://piwheels.org/project/pyaragorn/
|
|
34
|
+
Requires-Python: >=3.7
|
|
35
|
+
Provides-Extra: test
|
|
36
|
+
Requires-Dist: importlib-resources; python_version < "3.9" and extra == "test"
|
|
37
|
+
Description-Content-Type: text/markdown
|
|
38
|
+
|
|
39
|
+
# 👑 PyARAGORN [](https://github.com/althonos/pyaragorn/stargazers)
|
|
40
|
+
|
|
41
|
+
*Cython bindings and Python interface to [ARAGORN](https://www.trna.se/), a (t|mt|tm)RNA gene finder*.
|
|
42
|
+
|
|
43
|
+
[](https://github.com/althonos/pyaragorn/actions)
|
|
44
|
+
[](https://codecov.io/gh/althonos/pyaragorn/)
|
|
45
|
+
[](https://choosealicense.com/licenses/gpl-3.0/)
|
|
46
|
+
[](https://pypi.org/project/pyaragorn)
|
|
47
|
+
[](https://anaconda.org/bioconda/pyaragorn)
|
|
48
|
+
[](https://aur.archlinux.org/packages/python-pyaragorn)
|
|
49
|
+
[](https://pypi.org/project/pyaragorn/#files)
|
|
50
|
+
[](https://pypi.org/project/pyaragorn/#files)
|
|
51
|
+
[](https://pypi.org/project/pyaragorn/#files)
|
|
52
|
+
[](https://github.com/althonos/pyaragorn/)
|
|
53
|
+
[](https://git.lumc.nl/mflarralde/pyaragorn/)
|
|
54
|
+
[](https://github.com/althonos/pyaragorn/issues)
|
|
55
|
+
[](https://pyaragorn.readthedocs.io)
|
|
56
|
+
[](https://github.com/althonos/pyaragorn/blob/main/CHANGELOG.md)
|
|
57
|
+
[](https://pepy.tech/project/pyaragorn)
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
## 🗺️ Overview
|
|
61
|
+
|
|
62
|
+
[ARAGORN](https://trna.se) is a fast method developed
|
|
63
|
+
by Dean Laslett & Björn Canback[\[1\]](#ref1) to identify tRNA and tmRNA
|
|
64
|
+
genes in genomic sequences using heuristics to detect potential high-scoring
|
|
65
|
+
stem-loop structures. The complementary method ARWEN, developed by the same
|
|
66
|
+
authors[\[2\]](#ref2) to support the detection of metazoan mitochondrial
|
|
67
|
+
RNA (mtRNA) genes, was later integrated into ARAGORN.
|
|
68
|
+
|
|
69
|
+
`pyaragorn` is a Python module that provides bindings to ARAGORN and ARWEN
|
|
70
|
+
using [Cython](https://cython.org/). It directly interacts with the
|
|
71
|
+
ARAGORN internals, which has the following advantages:
|
|
72
|
+
|
|
73
|
+
- **single dependency**: PyARAGORN is distributed as a Python package, so you
|
|
74
|
+
can add it as a dependency to your project, and stop worrying about the
|
|
75
|
+
ARAGORN binary being present on the end-user machine.
|
|
76
|
+
- **no intermediate files**: Everything happens in memory, in a Python object
|
|
77
|
+
you fully control, so you don't have to invoke the ARAGORN CLI using a
|
|
78
|
+
sub-process and temporary files. Sequences can be passed directly as
|
|
79
|
+
strings, bytes, or any buffer objects, which avoids the overhead of
|
|
80
|
+
formatting your input to FASTA for ARAGORN.
|
|
81
|
+
- **no output parsing**: The detected RNA genes are returned as Python
|
|
82
|
+
objects with transparent attributes, which facilitate handling the output
|
|
83
|
+
of ARAGORN compared to parsing the output tables.
|
|
84
|
+
- **same results**: PyARAGORN is tested to ensure it produces the same results
|
|
85
|
+
as ARAGORN `v1.2.41`, the latest release.
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
### 📋 Features
|
|
89
|
+
|
|
90
|
+
PyARAGORN currently supports the following features from the ARAGORN
|
|
91
|
+
command line:
|
|
92
|
+
|
|
93
|
+
- [x] tRNA gene detection (`aragorn -t`).
|
|
94
|
+
- [x] tmRNA gene detection (`aragorn -m`).
|
|
95
|
+
- [ ] mtRNA gene detection (`aragorn -mt`).
|
|
96
|
+
- [x] Reporting of batch mode metadata (`aragorn -w`).
|
|
97
|
+
- [x] Alternative genetic code (`aragorn -gc`).
|
|
98
|
+
- [ ] Custom genetic code (`aragorn -gc<n>,BBB=<aa>`).
|
|
99
|
+
- [x] Circular and linear topologies (`aragorn -c` | `aragorn -l`).
|
|
100
|
+
- [ ] Intron length configuration (`aragorn -i`).
|
|
101
|
+
- [x] Scoring threshold configuration (`aragorn -ps`).
|
|
102
|
+
- [x] Sequence extraction from RNA gene (`aragorn -seq`).
|
|
103
|
+
- [ ] Secondary structure extraction from each gene (`aragorn -br`).
|
|
104
|
+
|
|
105
|
+
### 🧶 Thread-safety
|
|
106
|
+
|
|
107
|
+
`pyaragorn.RNAFinder` instances are thread-safe. In addition, the `find_rna`
|
|
108
|
+
method is re-entrant. This means you can parameterize a `RNAFinder` instance
|
|
109
|
+
once, and then use a pool to process sequences in parallel:
|
|
110
|
+
|
|
111
|
+
```python
|
|
112
|
+
import multiprocessing.pool
|
|
113
|
+
import pyaragorn
|
|
114
|
+
|
|
115
|
+
rna_finder = pyaragorn.RNAFinder()
|
|
116
|
+
|
|
117
|
+
with multiprocessing.pool.ThreadPool() as pool:
|
|
118
|
+
predictions = pool.map(rna_finder.find_rna, sequences)
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
## 🔧 Installing
|
|
122
|
+
|
|
123
|
+
This project is supported on Python 3.7 and later.
|
|
124
|
+
|
|
125
|
+
PyARAGORN can be installed directly from [PyPI](https://pypi.org/project/pyaragorn/),
|
|
126
|
+
which hosts some pre-built wheels for the x86-64 architecture (Linux/MacOS/Windows)
|
|
127
|
+
and the Aarch64 architecture (Linux/MacOS), as well as the code required to compile
|
|
128
|
+
from source with Cython:
|
|
129
|
+
```console
|
|
130
|
+
$ pip install pyaragorn
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
## 💡 Example
|
|
134
|
+
|
|
135
|
+
Let's load a sequence from a
|
|
136
|
+
[GenBank](http://www.insdc.org/files/feature_table.html) file,
|
|
137
|
+
use a `RNAFinder` to find all the tRNA genes it contains,
|
|
138
|
+
and print the anticodon and corresponding amino-acids of the detected
|
|
139
|
+
tRNAs.
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
### 🔬 [Biopython](https://github.com/biopython/biopython)
|
|
143
|
+
|
|
144
|
+
To use the `RNAFinder` to detect tRNA and tmRNA genes, the default operation
|
|
145
|
+
mode, but using the bacterial genetic code (translation table 11):
|
|
146
|
+
|
|
147
|
+
```python
|
|
148
|
+
import Bio.SeqIO
|
|
149
|
+
import pyaragorn
|
|
150
|
+
|
|
151
|
+
record = Bio.SeqIO.read("sequence.gbk", "genbank")
|
|
152
|
+
|
|
153
|
+
rna_finder = pyaragorn.RNAFinder(translation_table=11)
|
|
154
|
+
genes = rna_finder.find_rna(bytes(record.seq))
|
|
155
|
+
|
|
156
|
+
for gene in genes:
|
|
157
|
+
if gene.type == "tRNA":
|
|
158
|
+
print(
|
|
159
|
+
gene.amino_acid, # 3-letter code
|
|
160
|
+
gene.begin, # 1-based, inclusive
|
|
161
|
+
gene.end,
|
|
162
|
+
gene.strand, # +1 or -1 for direct and reverse strand
|
|
163
|
+
gene.energy,
|
|
164
|
+
gene.anticodon
|
|
165
|
+
)
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
*On older versions of Biopython (before 1.79) you will need to use
|
|
169
|
+
`record.seq.encode()` instead of `bytes(record.seq)`*.
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
## 💭 Feedback
|
|
173
|
+
|
|
174
|
+
### ⚠️ Issue Tracker
|
|
175
|
+
|
|
176
|
+
Found a bug ? Have an enhancement request ? Head over to the [GitHub issue tracker](https://github.com/althonos/pyaragorn/issues)
|
|
177
|
+
if you need to report or ask something. If you are filing in on a bug,
|
|
178
|
+
please include as much information as you can about the issue, and try to
|
|
179
|
+
recreate the same bug in a simple, easily reproducible situation.
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
<!-- ### 🏗️ Contributing
|
|
183
|
+
|
|
184
|
+
Contributions are more than welcome! See
|
|
185
|
+
[`CONTRIBUTING.md`](https://github.com/althonos/pyaragorn/blob/main/CONTRIBUTING.md)
|
|
186
|
+
for more details. -->
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
## 📋 Changelog
|
|
190
|
+
|
|
191
|
+
This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html)
|
|
192
|
+
and provides a [changelog](https://github.com/althonos/pyaragorn/blob/main/CHANGELOG.md)
|
|
193
|
+
in the [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) format.
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
## ⚖️ License
|
|
197
|
+
|
|
198
|
+
This library is provided under the [GNU General Public License v3.0 or later](https://choosealicense.com/licenses/gpl-3.0/).
|
|
199
|
+
ARAGORN and ARWEN were developed by Dean Laslett and are distributed under the
|
|
200
|
+
terms of the GPLv3 or later as well. See `vendor/aragorn` for more information.
|
|
201
|
+
|
|
202
|
+
*This project is in no way not affiliated, sponsored, or otherwise endorsed
|
|
203
|
+
by the ARAGORN authors. It was developed by
|
|
204
|
+
[Martin Larralde](https://github.com/althonos/) during his PhD project
|
|
205
|
+
at the [Leiden University Medical Center](https://www.lumc.nl/en/) in
|
|
206
|
+
the [Zeller Lab](https://zellerlab.org).*
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
## 📚 References
|
|
210
|
+
|
|
211
|
+
- <a id="ref1">\[1\]</a> Laslett, Dean, and Bjorn Canback. “ARAGORN, a program to detect tRNA genes and tmRNA genes in nucleotide sequences.” Nucleic acids research vol. 32,1 11-6. 2 Jan. 2004, [doi:10.1093/nar/gkh152](https://doi.org/10.1093/nar/gkh152)
|
|
212
|
+
- <a id="ref2">\[2\]</a> Laslett, Dean, and Björn Canbäck. “ARWEN: a program to detect tRNA genes in metazoan mitochondrial nucleotide sequences.” Bioinformatics (Oxford, England) vol. 24,2 (2008): 172-5. [doi:10.1093/bioinformatics/btm573](https://doi.org/10.1093/bioinformatics/btm573)
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
pyaragorn/__init__.py,sha256=yk11uoNKEEy1QI8XtudgwKJh7mAUdC-SH6RXUh0-x3A,872
|
|
2
|
+
pyaragorn/CMakeLists.txt,sha256=Kv6Kqg594zByfDsm_usgax9nTlF6PtciSTtUcUe2QHs,35
|
|
3
|
+
pyaragorn/lib.cp38-win_amd64.pyd,sha256=Wr7Ri0pcxV7jhP3wI9JUw3tSqi6qYLPyAjIvaG56LdA,504832
|
|
4
|
+
pyaragorn/lib.pyi,sha256=hb58uxbUbfi0Gw5D63RBMHekuON9CTHMTvNE894u_HY,2903
|
|
5
|
+
pyaragorn/lib.pyx,sha256=5Q9ZWtTE1Nnk8RxVyarVWiwUxPc0m39lSF1JOC0XfPs,28111
|
|
6
|
+
pyaragorn/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
7
|
+
pyaragorn/tests/__init__.py,sha256=A_IoY00uMA3HQ7Qjorm5Pr2Tg7n3J2lnCzJyiCAW4lY,242
|
|
8
|
+
pyaragorn/tests/data/__init__.py,sha256=JnSWGIo3ThkKlbZLTFxP-fVBxSTN4Yw5YAzQqa_IpXM,705
|
|
9
|
+
pyaragorn/tests/data/CP001621.default.txt,sha256=40AQzlXhPr9mXrryFw0Nc67REf3MLZ2BNHG-7CRQvAU,6874
|
|
10
|
+
pyaragorn/tests/data/CP001621.fna.gz,sha256=dSAI3T64jSevuR4p0JXBNaTmMlCRsbbY6bCCAAjxwqQ,314162
|
|
11
|
+
pyaragorn/tests/data/CP001621.ps95.txt,sha256=O5RMXu8IgeInq50RHeNMlVlt1qb7ZUaGrKXd9uBRI2o,7326
|
|
12
|
+
pyaragorn/tests/fasta.py,sha256=Ocgd_9WusRLFVBxt9ZViNNhT9yr8S5-BlVJi5GkSUuQ,2826
|
|
13
|
+
pyaragorn/tests/requirements.txt,sha256=uy1xEQvsQwXz38J-DhiHWzGmgxiJMlbNuz_M2jvifDI,46
|
|
14
|
+
pyaragorn/tests/test_doctest.py,sha256=TMtD6iAGDRbaRJFSsTlLAxm-FR02FAfVFFCsOR_7hao,3235
|
|
15
|
+
pyaragorn/tests/test_rna_finder.py,sha256=s-Pdqy0fFGJVun1y_1BR5DptNvWklN1Rzt0b8IiZgt0,5288
|
|
16
|
+
pyaragorn-0.3.0.dist-info/METADATA,sha256=Ie-K5w_ij2AbdelYFe3MX7agik3loW7Stpsf8-0Kr3I,10612
|
|
17
|
+
pyaragorn-0.3.0.dist-info/WHEEL,sha256=yXMtVL9U8RkqJEJfb-z5X2s1_G1r2eGG-REYk3wgjZ0,104
|
|
18
|
+
pyaragorn-0.3.0.dist-info/licenses/COPYING,sha256=lE9DJUN_D0B-V6xgf_SX0xjldzX1TGs1xKyMvBdnWCM,35822
|
|
19
|
+
pyaragorn-0.3.0.dist-info/RECORD,,
|