RNApolis 0.4.13__py3-none-any.whl → 0.4.15__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- {RNApolis-0.4.13.dist-info → RNApolis-0.4.15.dist-info}/METADATA +11 -2
- {RNApolis-0.4.13.dist-info → RNApolis-0.4.15.dist-info}/RECORD +9 -9
- {RNApolis-0.4.13.dist-info → RNApolis-0.4.15.dist-info}/WHEEL +1 -1
- rnapolis/annotator.py +2 -1
- rnapolis/molecule_filter.py +16 -2
- rnapolis/parser.py +13 -2
- {RNApolis-0.4.13.dist-info → RNApolis-0.4.15.dist-info}/LICENSE +0 -0
- {RNApolis-0.4.13.dist-info → RNApolis-0.4.15.dist-info}/entry_points.txt +0 -0
- {RNApolis-0.4.13.dist-info → RNApolis-0.4.15.dist-info}/top_level.txt +0 -0
@@ -1,6 +1,6 @@
|
|
1
|
-
Metadata-Version: 2.
|
1
|
+
Metadata-Version: 2.2
|
2
2
|
Name: RNApolis
|
3
|
-
Version: 0.4.
|
3
|
+
Version: 0.4.15
|
4
4
|
Summary: A Python library containing RNA-related bioinformatics functions and classes
|
5
5
|
Home-page: https://github.com/tzok/rnapolis-py
|
6
6
|
Author: Tomasz Zok
|
@@ -26,6 +26,15 @@ Requires-Dist: pulp
|
|
26
26
|
Requires-Dist: requests
|
27
27
|
Requires-Dist: scipy
|
28
28
|
Requires-Dist: viennarna
|
29
|
+
Dynamic: author
|
30
|
+
Dynamic: author-email
|
31
|
+
Dynamic: classifier
|
32
|
+
Dynamic: description
|
33
|
+
Dynamic: description-content-type
|
34
|
+
Dynamic: home-page
|
35
|
+
Dynamic: project-url
|
36
|
+
Dynamic: requires-dist
|
37
|
+
Dynamic: summary
|
29
38
|
|
30
39
|
# RNApolis
|
31
40
|
|
@@ -1,17 +1,17 @@
|
|
1
|
-
rnapolis/annotator.py,sha256=
|
1
|
+
rnapolis/annotator.py,sha256=hRRzRmneYxbg2tvwVHMWLfzmJb4szV0JL_6EOC09Gwg,22101
|
2
2
|
rnapolis/clashfinder.py,sha256=i95kp0o6OWNqmJDBr-PbsZd7RY2iJtBDr7QqolJSuAQ,8513
|
3
3
|
rnapolis/common.py,sha256=LY6Uz96Br8ki_gA8LpfatgtvVbt9jOTkwgagayqTgf8,31251
|
4
4
|
rnapolis/metareader.py,sha256=I1-cXc2YNBPwa3zihAnMTjEsAo79tEKzSmWu5yvN1Pk,2071
|
5
|
-
rnapolis/molecule_filter.py,sha256=
|
5
|
+
rnapolis/molecule_filter.py,sha256=_7zrF-AH56vXI4vhFtfaU9wr-X7aeOL6DsXbX6_9vPQ,9497
|
6
6
|
rnapolis/motif_extractor.py,sha256=Lfn1iEkhkP9eZD3GPEWNAfy00QO7QPCc8wM_XS1ory8,1147
|
7
|
-
rnapolis/parser.py,sha256=
|
7
|
+
rnapolis/parser.py,sha256=3g4mtFvpiEENFcSBBtx_E_x1vJPF9BujWnts0kb9XjE,16340
|
8
8
|
rnapolis/rfam_folder.py,sha256=SjiiyML_T1__saruFwSMJEoQ7Y55GIU8ktS8ZUn5-fw,11111
|
9
9
|
rnapolis/tertiary.py,sha256=6t9ZB4w33-5n_M3sns1RoFXCOTgVAgGH4WDNG5OG9Kg,23426
|
10
10
|
rnapolis/transformer.py,sha256=aC0nBmHHJf5TyLvBIV57Jj3tlwpvHbPo347opfAOlQA,3844
|
11
11
|
rnapolis/util.py,sha256=IdquFO3PV1_KDqodjupzm0Rqvgy0CeSzxGHaGEHYXVU,543
|
12
|
-
RNApolis-0.4.
|
13
|
-
RNApolis-0.4.
|
14
|
-
RNApolis-0.4.
|
15
|
-
RNApolis-0.4.
|
16
|
-
RNApolis-0.4.
|
17
|
-
RNApolis-0.4.
|
12
|
+
RNApolis-0.4.15.dist-info/LICENSE,sha256=ZGRu12MzCgbYA-Lt8MyBlmjvPZh7xfiD5u5wBx0enq4,1066
|
13
|
+
RNApolis-0.4.15.dist-info/METADATA,sha256=qLYXvmGt9gT0KsEnD-303D8EqqpVz5-hZYCekAOAn1E,54516
|
14
|
+
RNApolis-0.4.15.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
15
|
+
RNApolis-0.4.15.dist-info/entry_points.txt,sha256=foN2Pn5e-OzEz0fFmNoX6PnFSZFQntOlY8LbognP5F0,308
|
16
|
+
RNApolis-0.4.15.dist-info/top_level.txt,sha256=LcO18koxZcWoJ21KDRRRo_tyIbmXL5z61dPitZpy8yc,9
|
17
|
+
RNApolis-0.4.15.dist-info/RECORD,,
|
rnapolis/annotator.py
CHANGED
@@ -11,6 +11,8 @@ import numpy
|
|
11
11
|
import numpy.typing
|
12
12
|
import orjson
|
13
13
|
from ordered_set import OrderedSet
|
14
|
+
from scipy.spatial import KDTree
|
15
|
+
|
14
16
|
from rnapolis.common import (
|
15
17
|
BR,
|
16
18
|
BaseInteractions,
|
@@ -42,7 +44,6 @@ from rnapolis.tertiary import (
|
|
42
44
|
torsion_angle,
|
43
45
|
)
|
44
46
|
from rnapolis.util import handle_input_file
|
45
|
-
from scipy.spatial import KDTree
|
46
47
|
|
47
48
|
HYDROGEN_BOND_MAX_DISTANCE = 4.0
|
48
49
|
HYDROGEN_BOND_ANGLE_RANGE = (50.0, 130.0) # 90 degrees is ideal, so allow +- 40 degrees
|
rnapolis/molecule_filter.py
CHANGED
@@ -156,7 +156,9 @@ def select_category_by_id(
|
|
156
156
|
|
157
157
|
|
158
158
|
def filter_by_poly_types(
|
159
|
-
file_content: str,
|
159
|
+
file_content: str,
|
160
|
+
entity_poly_types: Iterable[str] = ["polyribonucleotide"],
|
161
|
+
retain_categories: Iterable[str] = [],
|
160
162
|
) -> str:
|
161
163
|
adapter = IoAdapterPy()
|
162
164
|
|
@@ -187,13 +189,20 @@ def filter_by_poly_types(
|
|
187
189
|
obj = DataCategory(category, attributes, rows)
|
188
190
|
output.append(obj)
|
189
191
|
|
192
|
+
for category in retain_categories:
|
193
|
+
obj = data[0].getObj(category)
|
194
|
+
if obj:
|
195
|
+
output.append(obj)
|
196
|
+
|
190
197
|
with tempfile.NamedTemporaryFile("rt+") as tmp:
|
191
198
|
adapter.writeFile(tmp.name, [output])
|
192
199
|
tmp.seek(0)
|
193
200
|
return tmp.read()
|
194
201
|
|
195
202
|
|
196
|
-
def filter_by_chains(
|
203
|
+
def filter_by_chains(
|
204
|
+
file_content: str, chains: Iterable[str], retain_categories: Iterable[str] = []
|
205
|
+
) -> str:
|
197
206
|
"""
|
198
207
|
Filter a PDBx/mmCIF file by chain IDs. The function returns a new PDBx/mmCIF file.
|
199
208
|
|
@@ -228,6 +237,11 @@ def filter_by_chains(file_content: str, chains: Iterable[str]) -> str:
|
|
228
237
|
obj = DataCategory(category, attributes, rows)
|
229
238
|
output.append(obj)
|
230
239
|
|
240
|
+
for category in retain_categories:
|
241
|
+
obj = data[0].getObj(category)
|
242
|
+
if obj:
|
243
|
+
output.append(obj)
|
244
|
+
|
231
245
|
with tempfile.NamedTemporaryFile("rt+") as tmp:
|
232
246
|
adapter.writeFile(tmp.name, [output])
|
233
247
|
tmp.seek(0)
|
rnapolis/parser.py
CHANGED
@@ -218,7 +218,9 @@ def parse_cif(
|
|
218
218
|
)
|
219
219
|
|
220
220
|
if entity_id and pdbx_seq_one_letter_code_can:
|
221
|
-
sequence_by_entity[entity_id] =
|
221
|
+
sequence_by_entity[entity_id] = (
|
222
|
+
pdbx_seq_one_letter_code_can.replace("\n", "")
|
223
|
+
)
|
222
224
|
|
223
225
|
if entity:
|
224
226
|
for row in entity.getRowList():
|
@@ -234,7 +236,16 @@ def parse_cif(
|
|
234
236
|
|
235
237
|
if type_:
|
236
238
|
is_nucleic_acid_by_entity[entity_id] = (
|
237
|
-
is_nucleic_acid_by_entity.get(
|
239
|
+
is_nucleic_acid_by_entity.get(
|
240
|
+
entity_id,
|
241
|
+
type_
|
242
|
+
in (
|
243
|
+
"peptide nucleic acid",
|
244
|
+
"polydeoxyribonucleotide",
|
245
|
+
"polydeoxyribonucleotide/polyribonucleotide hybrid",
|
246
|
+
"polyribonucleotide",
|
247
|
+
),
|
248
|
+
)
|
238
249
|
)
|
239
250
|
|
240
251
|
atoms = filter_clashing_atoms(atoms_to_process)
|
File without changes
|
File without changes
|
File without changes
|