RNApolis 0.4.14__tar.gz → 0.4.15__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
Files changed (33) hide show
  1. {rnapolis-0.4.14/src/RNApolis.egg-info → rnapolis-0.4.15}/PKG-INFO +11 -2
  2. {rnapolis-0.4.14 → rnapolis-0.4.15}/setup.py +1 -1
  3. {rnapolis-0.4.14 → rnapolis-0.4.15/src/RNApolis.egg-info}/PKG-INFO +11 -2
  4. {rnapolis-0.4.14 → rnapolis-0.4.15}/src/rnapolis/annotator.py +2 -1
  5. {rnapolis-0.4.14 → rnapolis-0.4.15}/src/rnapolis/parser.py +13 -2
  6. {rnapolis-0.4.14 → rnapolis-0.4.15}/tests/test_parser.py +19 -0
  7. {rnapolis-0.4.14 → rnapolis-0.4.15}/LICENSE +0 -0
  8. {rnapolis-0.4.14 → rnapolis-0.4.15}/README.md +0 -0
  9. {rnapolis-0.4.14 → rnapolis-0.4.15}/pyproject.toml +0 -0
  10. {rnapolis-0.4.14 → rnapolis-0.4.15}/setup.cfg +0 -0
  11. {rnapolis-0.4.14 → rnapolis-0.4.15}/src/RNApolis.egg-info/SOURCES.txt +0 -0
  12. {rnapolis-0.4.14 → rnapolis-0.4.15}/src/RNApolis.egg-info/dependency_links.txt +0 -0
  13. {rnapolis-0.4.14 → rnapolis-0.4.15}/src/RNApolis.egg-info/entry_points.txt +0 -0
  14. {rnapolis-0.4.14 → rnapolis-0.4.15}/src/RNApolis.egg-info/requires.txt +0 -0
  15. {rnapolis-0.4.14 → rnapolis-0.4.15}/src/RNApolis.egg-info/top_level.txt +0 -0
  16. {rnapolis-0.4.14 → rnapolis-0.4.15}/src/rnapolis/clashfinder.py +0 -0
  17. {rnapolis-0.4.14 → rnapolis-0.4.15}/src/rnapolis/common.py +0 -0
  18. {rnapolis-0.4.14 → rnapolis-0.4.15}/src/rnapolis/metareader.py +0 -0
  19. {rnapolis-0.4.14 → rnapolis-0.4.15}/src/rnapolis/molecule_filter.py +0 -0
  20. {rnapolis-0.4.14 → rnapolis-0.4.15}/src/rnapolis/motif_extractor.py +0 -0
  21. {rnapolis-0.4.14 → rnapolis-0.4.15}/src/rnapolis/rfam_folder.py +0 -0
  22. {rnapolis-0.4.14 → rnapolis-0.4.15}/src/rnapolis/tertiary.py +0 -0
  23. {rnapolis-0.4.14 → rnapolis-0.4.15}/src/rnapolis/transformer.py +0 -0
  24. {rnapolis-0.4.14 → rnapolis-0.4.15}/src/rnapolis/util.py +0 -0
  25. {rnapolis-0.4.14 → rnapolis-0.4.15}/tests/test_annotator.py +0 -0
  26. {rnapolis-0.4.14 → rnapolis-0.4.15}/tests/test_bugfixes.py +0 -0
  27. {rnapolis-0.4.14 → rnapolis-0.4.15}/tests/test_common.py +0 -0
  28. {rnapolis-0.4.14 → rnapolis-0.4.15}/tests/test_metareader.py +0 -0
  29. {rnapolis-0.4.14 → rnapolis-0.4.15}/tests/test_molecule_filter.py +0 -0
  30. {rnapolis-0.4.14 → rnapolis-0.4.15}/tests/test_quadruplexes.py +0 -0
  31. {rnapolis-0.4.14 → rnapolis-0.4.15}/tests/test_rfam_folder.py +0 -0
  32. {rnapolis-0.4.14 → rnapolis-0.4.15}/tests/test_tertiary.py +0 -0
  33. {rnapolis-0.4.14 → rnapolis-0.4.15}/tests/test_transformer.py +0 -0
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: RNApolis
3
- Version: 0.4.14
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
 
@@ -5,7 +5,7 @@ with open("README.md") as f:
5
5
 
6
6
  setup(
7
7
  name="RNApolis",
8
- version="0.4.14",
8
+ version="0.4.15",
9
9
  packages=["rnapolis"],
10
10
  package_dir={"": "src"},
11
11
  author="Tomasz Zok",
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: RNApolis
3
- Version: 0.4.14
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
 
@@ -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
@@ -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] = pdbx_seq_one_letter_code_can
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(entity_id, type_)
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)
@@ -1,3 +1,5 @@
1
+ import gzip
2
+
1
3
  from rnapolis.parser import read_3d_structure
2
4
 
3
5
 
@@ -31,3 +33,20 @@ def test_4qln_no_duplicate_atoms():
31
33
  assert len(atom_names) == len(
32
34
  set(atom_names)
33
35
  ), f"Duplicate atoms found in residue {residue.auth}"
36
+
37
+
38
+ def test_1gid():
39
+ expected_sequence = "GAAUUGCGGGAAAGGGGUCAACAGCCGUUCAGUACCAAGUCUCAGGGGAAACUUUGAGAUGGCCUUGCAAAGGGUAUGGUAAUAAGCUGACGGACAUGGUCCUAACCACGCAGCCAAGUCCUAAGUCAACAGAUCUUCUGUUGAUAUGGAUGCAGUUC"
40
+
41
+ with gzip.open("tests/1gid.cif.gz", "rt") as f:
42
+ structure3d = read_3d_structure(f, nucleic_acid_only=True)
43
+
44
+ residues_a = [r for r in structure3d.residues if r.auth.chain == "A"]
45
+ residues_b = [r for r in structure3d.residues if r.auth.chain == "B"]
46
+ assert len(residues_a) == len(expected_sequence)
47
+ assert len(residues_b) == len(expected_sequence)
48
+
49
+ actual_sequence_a = "".join([residue.one_letter_name for residue in residues_a])
50
+ actual_sequence_b = "".join([residue.one_letter_name for residue in residues_b])
51
+ assert actual_sequence_a == expected_sequence
52
+ assert actual_sequence_b == expected_sequence
File without changes
File without changes
File without changes
File without changes