RNApolis 0.4.2__tar.gz → 0.4.3__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
Files changed (31) hide show
  1. {rnapolis-0.4.2/src/RNApolis.egg-info → rnapolis-0.4.3}/PKG-INFO +1 -1
  2. {rnapolis-0.4.2 → rnapolis-0.4.3}/setup.py +1 -1
  3. {rnapolis-0.4.2 → rnapolis-0.4.3/src/RNApolis.egg-info}/PKG-INFO +1 -1
  4. {rnapolis-0.4.2 → rnapolis-0.4.3}/src/rnapolis/tertiary.py +17 -14
  5. {rnapolis-0.4.2 → rnapolis-0.4.3}/LICENSE +0 -0
  6. {rnapolis-0.4.2 → rnapolis-0.4.3}/README.md +0 -0
  7. {rnapolis-0.4.2 → rnapolis-0.4.3}/pyproject.toml +0 -0
  8. {rnapolis-0.4.2 → rnapolis-0.4.3}/setup.cfg +0 -0
  9. {rnapolis-0.4.2 → rnapolis-0.4.3}/src/RNApolis.egg-info/SOURCES.txt +0 -0
  10. {rnapolis-0.4.2 → rnapolis-0.4.3}/src/RNApolis.egg-info/dependency_links.txt +0 -0
  11. {rnapolis-0.4.2 → rnapolis-0.4.3}/src/RNApolis.egg-info/entry_points.txt +0 -0
  12. {rnapolis-0.4.2 → rnapolis-0.4.3}/src/RNApolis.egg-info/requires.txt +0 -0
  13. {rnapolis-0.4.2 → rnapolis-0.4.3}/src/RNApolis.egg-info/top_level.txt +0 -0
  14. {rnapolis-0.4.2 → rnapolis-0.4.3}/src/rnapolis/annotator.py +0 -0
  15. {rnapolis-0.4.2 → rnapolis-0.4.3}/src/rnapolis/clashfinder.py +0 -0
  16. {rnapolis-0.4.2 → rnapolis-0.4.3}/src/rnapolis/common.py +0 -0
  17. {rnapolis-0.4.2 → rnapolis-0.4.3}/src/rnapolis/metareader.py +0 -0
  18. {rnapolis-0.4.2 → rnapolis-0.4.3}/src/rnapolis/molecule_filter.py +0 -0
  19. {rnapolis-0.4.2 → rnapolis-0.4.3}/src/rnapolis/motif_extractor.py +0 -0
  20. {rnapolis-0.4.2 → rnapolis-0.4.3}/src/rnapolis/parser.py +0 -0
  21. {rnapolis-0.4.2 → rnapolis-0.4.3}/src/rnapolis/rfam_folder.py +0 -0
  22. {rnapolis-0.4.2 → rnapolis-0.4.3}/src/rnapolis/transformer.py +0 -0
  23. {rnapolis-0.4.2 → rnapolis-0.4.3}/src/rnapolis/util.py +0 -0
  24. {rnapolis-0.4.2 → rnapolis-0.4.3}/tests/test_annotator.py +0 -0
  25. {rnapolis-0.4.2 → rnapolis-0.4.3}/tests/test_bugfixes.py +0 -0
  26. {rnapolis-0.4.2 → rnapolis-0.4.3}/tests/test_common.py +0 -0
  27. {rnapolis-0.4.2 → rnapolis-0.4.3}/tests/test_metareader.py +0 -0
  28. {rnapolis-0.4.2 → rnapolis-0.4.3}/tests/test_parser.py +0 -0
  29. {rnapolis-0.4.2 → rnapolis-0.4.3}/tests/test_quadruplexes.py +0 -0
  30. {rnapolis-0.4.2 → rnapolis-0.4.3}/tests/test_rfam_folder.py +0 -0
  31. {rnapolis-0.4.2 → rnapolis-0.4.3}/tests/test_tertiary.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: RNApolis
3
- Version: 0.4.2
3
+ Version: 0.4.3
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
@@ -5,7 +5,7 @@ with open("README.md") as f:
5
5
 
6
6
  setup(
7
7
  name="RNApolis",
8
- version="0.4.2",
8
+ version="0.4.3",
9
9
  packages=["rnapolis"],
10
10
  package_dir={"": "src"},
11
11
  author="Tomasz Zok",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: RNApolis
3
- Version: 0.4.2
3
+ Version: 0.4.3
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
@@ -497,24 +497,27 @@ class Mapping2D3D:
497
497
 
498
498
  @cached_property
499
499
  def strands_sequences(self) -> List[Tuple[str, str]]:
500
- result = defaultdict(list)
500
+ nucleotides = list(filter(lambda r: r.is_nucleotide, self.structure3d.residues))
501
501
 
502
- for i, residue in enumerate(
503
- filter(lambda r: r.is_nucleotide, self.structure3d.residues)
504
- ):
505
- if i > 0 and self.find_gaps:
506
- previous = self.structure3d.residues[i - 1]
502
+ if not nucleotides:
503
+ return []
507
504
 
508
- if (
509
- not previous.is_connected(residue)
510
- and previous.chain == residue.chain
511
- ):
512
- for k in range(residue.number - previous.number - 1):
513
- result[residue.chain].append("?")
505
+ result = [(nucleotides[0].chain, [nucleotides[0].one_letter_name])]
506
+
507
+ for i in range(1, len(nucleotides)):
508
+ previous = nucleotides[i - 1]
509
+ residue = nucleotides[i]
514
510
 
515
- result[residue.chain].append(residue.one_letter_name)
511
+ if residue.chain != previous.chain:
512
+ result.append((residue.chain, [residue.one_letter_name]))
513
+ else:
514
+ if self.find_gaps:
515
+ if not previous.is_connected(residue):
516
+ for k in range(residue.number - previous.number - 1):
517
+ result[-1][1].append("?")
518
+ result[-1][1].append(residue.one_letter_name)
516
519
 
517
- return [(chain, "".join(sequence)) for chain, sequence in result.items()]
520
+ return [(chain, "".join(sequence)) for chain, sequence in result]
518
521
 
519
522
  @cached_property
520
523
  def bpseq(self) -> BpSeq:
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes