pydna 5.4.0__py3-none-any.whl → 5.5.0__py3-none-any.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.
pydna/__init__.py CHANGED
@@ -150,7 +150,7 @@ __license__ = "BSD"
150
150
  __maintainer__ = "Björn Johansson"
151
151
  __email__ = "bjorn_johansson@bio.uminho.pt"
152
152
  __status__ = "Development" # "Production" #"Prototype"
153
- __version__ = "5.4.0"
153
+ __version__ = "5.5.0"
154
154
 
155
155
 
156
156
  # create config directory
pydna/dseq.py CHANGED
@@ -1479,11 +1479,6 @@ class Dseq(_Seq):
1479
1479
  enz = cutsite[1]
1480
1480
  watson, crick, ovhg = self.get_cut_parameters(cutsite, True)
1481
1481
 
1482
- # The cut positions fall within the sequence
1483
- # This could go into Biopython
1484
- if not self.circular and crick < 0 or crick > len(self):
1485
- return False
1486
-
1487
1482
  # The overhang is double stranded
1488
1483
  overhang_dseq = self[watson:crick] if ovhg < 0 else self[crick:watson]
1489
1484
  if overhang_dseq.ovhg != 0 or overhang_dseq.watson_ovhg() != 0:
pydna/dseqrecord.py CHANGED
@@ -788,9 +788,10 @@ class Dseqrecord(_SeqRecord):
788
788
  if self.circular:
789
789
  raise TypeError("TypeError: can't multiply circular Dseqrecord.")
790
790
  if number > 0:
791
- new = _copy.copy(self)
791
+ new = _copy.deepcopy(self)
792
792
  for i in range(1, number):
793
793
  new += self
794
+ new._per_letter_annotations = self._per_letter_annotations
794
795
  return new
795
796
  else:
796
797
  return self.__class__("")
@@ -1061,7 +1062,10 @@ class Dseqrecord(_SeqRecord):
1061
1062
  pydna.dseqrecord.Dseqrecord.lower"""
1062
1063
 
1063
1064
  upper = _copy.deepcopy(self)
1065
+ # This is because the @seq.setter methods otherwise sets the _per_letter_annotations to an empty dict
1066
+ prev_per_letter_annotation = upper._per_letter_annotations
1064
1067
  upper.seq = upper.seq.upper()
1068
+ upper._per_letter_annotations = prev_per_letter_annotation
1065
1069
  return upper
1066
1070
 
1067
1071
  def lower(self):
@@ -1092,7 +1096,9 @@ class Dseqrecord(_SeqRecord):
1092
1096
 
1093
1097
  """
1094
1098
  lower = _copy.deepcopy(self)
1099
+ prev_per_letter_annotation = lower._per_letter_annotations
1095
1100
  lower.seq = lower.seq.lower()
1101
+ lower._per_letter_annotations = prev_per_letter_annotation
1096
1102
  return lower
1097
1103
 
1098
1104
  def orfs(self, minsize=300):
pydna/seqrecord.py CHANGED
@@ -50,10 +50,29 @@ class SeqRecord(_SeqRecord):
50
50
  nicer output in the IPython shell.
51
51
  """
52
52
 
53
- def __init__(self, seq, *args, id="id", name="name", description="description", **kwargs):
53
+ def __init__(
54
+ self,
55
+ seq,
56
+ id="id",
57
+ name="name",
58
+ description="description",
59
+ dbxrefs=None,
60
+ features=None,
61
+ annotations=None,
62
+ letter_annotations=None,
63
+ ):
54
64
  if isinstance(seq, str):
55
65
  seq = _Seq(seq)
56
- super().__init__(seq, *args, id=id, name=name, description=description, **kwargs)
66
+ super().__init__(
67
+ seq,
68
+ id=id,
69
+ name=name,
70
+ description=description,
71
+ dbxrefs=dbxrefs,
72
+ features=features,
73
+ annotations=annotations,
74
+ letter_annotations=letter_annotations,
75
+ )
57
76
  self._fix_attributes()
58
77
 
59
78
  def _fix_attributes(self):
@@ -612,7 +631,7 @@ class SeqRecord(_SeqRecord):
612
631
 
613
632
  if format == "pydnafasta":
614
633
  return _pretty_str(
615
- f">{self.id} {len(self)} bp {dict(((True,'circular'),(False,'linear')))[self.seq.circular]}\n{str(self.seq)}\n"
634
+ f">{self.id} {len(self)} bp {dict(((True, 'circular'), (False, 'linear')))[self.seq.circular]}\n{str(self.seq)}\n"
616
635
  )
617
636
  if format == "primer":
618
637
  return _pretty_str(
@@ -1,11 +1,11 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: pydna
3
- Version: 5.4.0
3
+ Version: 5.5.0
4
4
  Summary: Representing double stranded DNA and functions for simulating cloning and homologous recombination between DNA molecules.
5
5
  License: BSD
6
6
  Author: Björn F. Johansson
7
7
  Author-email: bjornjobb@gmail.com
8
- Requires-Python: >=3.8,<4.0
8
+ Requires-Python: >=3.9,<4.0
9
9
  Classifier: Development Status :: 4 - Beta
10
10
  Classifier: Environment :: Console
11
11
  Classifier: Intended Audience :: Education
@@ -13,7 +13,6 @@ Classifier: Intended Audience :: Developers
13
13
  Classifier: Intended Audience :: Science/Research
14
14
  Classifier: License :: OSI Approved :: BSD License
15
15
  Classifier: Operating System :: OS Independent
16
- Classifier: Programming Language :: Python :: 3.8
17
16
  Classifier: Programming Language :: Python :: 3.9
18
17
  Classifier: Programming Language :: Python :: 3.10
19
18
  Classifier: Programming Language :: Python :: 3.11
@@ -25,12 +24,11 @@ Provides-Extra: download
25
24
  Provides-Extra: express
26
25
  Provides-Extra: gel
27
26
  Requires-Dist: appdirs (>=1.4.4)
28
- Requires-Dist: biopython (>=1.80,<1.85)
27
+ Requires-Dist: biopython (>=1.80)
29
28
  Requires-Dist: cai2 (>=1.0.5) ; extra == "express"
30
29
  Requires-Dist: matplotlib (>=3.4.3) ; extra == "gel"
31
30
  Requires-Dist: networkx (>=2.8.8)
32
- Requires-Dist: numpy (<1.24) ; python_version < "3.9"
33
- Requires-Dist: numpy (>1.26) ; python_version >= "3.9"
31
+ Requires-Dist: numpy (>1.26)
34
32
  Requires-Dist: pillow (>=8.4.0) ; extra == "gel"
35
33
  Requires-Dist: prettytable (>=3.5.0)
36
34
  Requires-Dist: pydivsufsort (>=0.0.14)
@@ -1,4 +1,4 @@
1
- pydna/__init__.py,sha256=uFnVyBghAdjtBuBA6ROIj0u0WH1jDY9AapdRLGDu2Yk,13391
1
+ pydna/__init__.py,sha256=QmteIqgNg8sAeRrXfFOOewLYxuQy21oceQ2DeAggPig,13391
2
2
  pydna/_pretty.py,sha256=eMjYTy19AUTA-nntiYEql3FPVe4WzTLSZ4f0Jd6SLfo,1172
3
3
  pydna/_thermodynamic_data.py,sha256=9_w-97DpkbsWbJGHVijscMvUS_SFt7GxzrxspMRPZSg,10903
4
4
  pydna/all.py,sha256=i2dR9cAccr3AdtAMMeH4jazpVjxWjfvu8LB3LD9hwgY,2099
@@ -12,8 +12,8 @@ pydna/contig.py,sha256=aNKtXGaHY0c70tEEMHk_9lDMk9DQzjFRO6LK-GPtdwc,7991
12
12
  pydna/crispr.py,sha256=VbOe_nDVmdhlnYvnnmukJJhRMZr1gk1UK6qOJCCs988,3824
13
13
  pydna/design.py,sha256=IE04UXQqAkpX1leTZN8KPJjdd9gj1Es_4HNcTZML5Dw,28781
14
14
  pydna/download.py,sha256=uFoAvWYXr1C30071p9OweMdemvKO-1F2pB5CHo2k31U,1307
15
- pydna/dseq.py,sha256=OL1qwTuoutPHX1lSyJyoN_viJuWassVPPXv-Jk45tw4,53784
16
- pydna/dseqrecord.py,sha256=6w2MJF4b-6JJrmu4YV7-8lLPqWJAXcDWtJWzMlHG2A0,46785
15
+ pydna/dseq.py,sha256=-iOK3uHplIgYfwbImHzJA2aZ8uXsBwXZbWwkO01-IMM,53601
16
+ pydna/dseqrecord.py,sha256=qVWbAWT672TNYAx_R_TDqbTnlxbL2mN-c-I14PyetR0,47238
17
17
  pydna/editor.py,sha256=Au3kZ5DYqa6MYB3kXJePHOJOioSJ5w7jtlZ8kfHvKm8,3471
18
18
  pydna/fakeseq.py,sha256=eGeivoppQ8vSPQqggxFXARmUhU6oEBfdnIkGDR_v9UQ,1449
19
19
  pydna/fusionpcr.py,sha256=uRuHbwmZ2H5SThDUYW-KwxMB1DwqA2Khof7KXiMdxN8,2783
@@ -32,13 +32,13 @@ pydna/parsers.py,sha256=UlG5xh4EsNNPaPK4SoEE6KL52YxkQfLvKJiDm3DB5s4,6927
32
32
  pydna/primer.py,sha256=7AYWIhr1YbjG0Gak94bU6bTlsRUgWCIbKTndgsgWZ2M,2533
33
33
  pydna/readers.py,sha256=dsihpjRopxWeeab1bRAK4TRHMBLYK_SpK1j2llHrHk0,1850
34
34
  pydna/seq.py,sha256=Qwbx1uo-JIYXIuySXevNtxoDgohENHTTTCjPMnn4yjo,7703
35
- pydna/seqrecord.py,sha256=FLgdvr0zVDhSffxBguBs033SaSKmbNdRTGvA8bAj8ik,23203
35
+ pydna/seqrecord.py,sha256=oz2YZR3_tkNj7YgdWmJr0MyREJZvCgvmq1g8hzuzNyQ,23530
36
36
  pydna/sequence_picker.py,sha256=jYbGUparKyIhDD30BzT2x-olnPpDjv-xvyaeIk6_V4E,1659
37
37
  pydna/threading_timer_decorator_exit.py,sha256=D91kqjKSavWDnXyc1Fo-CwPYtbmR2DjTXnBYSRXKmSA,2793
38
38
  pydna/tm.py,sha256=YVXgDMB_AxNyzPR9fYT1YWlfy80paKTl2r0bkLFNxU8,11330
39
39
  pydna/user_cloning.py,sha256=VSpYX1tdbcD_PzEt69Jz6Lud-yAkYMVXnzVd4v2usnE,692
40
40
  pydna/utils.py,sha256=7CQ8tkVcTcNY_k1eBbP242ax3X2MMZGZ1cPhHcDY8y4,22084
41
- pydna-5.4.0.dist-info/LICENSE.txt,sha256=u8QfcsnNXZM0UCexerK_MvyA2lPWgeGyUtSYXvLG6Oc,6119
42
- pydna-5.4.0.dist-info/METADATA,sha256=Qmeyd1KYYFxQvuE_ewAfwZwHswgo1azcjnx8DI8Mx74,24458
43
- pydna-5.4.0.dist-info/WHEEL,sha256=IYZQI976HJqqOpQU6PHkJ8fb3tMNBFjg-Cn-pwAbaFM,88
44
- pydna-5.4.0.dist-info/RECORD,,
41
+ pydna-5.5.0.dist-info/LICENSE.txt,sha256=u8QfcsnNXZM0UCexerK_MvyA2lPWgeGyUtSYXvLG6Oc,6119
42
+ pydna-5.5.0.dist-info/METADATA,sha256=c-uZramQdFTL6ceghaoWSt7aZNuJFoD8FeUhgAxmy9Y,24322
43
+ pydna-5.5.0.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
44
+ pydna-5.5.0.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: poetry-core 2.0.1
2
+ Generator: poetry-core 2.1.1
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any