opencloning 0.4.2__py3-none-any.whl → 0.4.3__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.
@@ -4,7 +4,7 @@ from primer3 import bindings
4
4
  import json
5
5
  from fastapi import UploadFile, Response
6
6
 
7
- from ...pydantic_models import (
7
+ from opencloning.pydantic_models import (
8
8
  GenomeCoordinatesSource,
9
9
  TextFileSequence,
10
10
  PrimerModel,
@@ -13,10 +13,10 @@ from ...pydantic_models import (
13
13
  BaseCloningStrategy,
14
14
  HomologousRecombinationSource,
15
15
  )
16
- from .primer_design_settings import amanda_settings
17
- from ...endpoints.external_import import genome_coordinates, read_from_file
18
- from ...endpoints.assembly import pcr, restriction_and_ligation, homologous_recombination
19
- from ...dna_functions import read_dsrecord_from_json
16
+ from opencloning.batch_cloning.EBIC.primer_design_settings import amanda_settings
17
+ from opencloning.endpoints.external_import import genome_coordinates, read_from_file
18
+ from opencloning.endpoints.assembly import pcr, restriction_and_ligation, homologous_recombination
19
+ from opencloning.dna_functions import read_dsrecord_from_json
20
20
 
21
21
  # Settings for design
22
22
  padding = 1000
@@ -123,7 +123,9 @@ async def main():
123
123
 
124
124
  with open(os.path.join(os.path.dirname(__file__), 'barcode.gb'), 'rb') as f:
125
125
  dummy_resp = Response()
126
- resp = await read_from_file(dummy_resp, UploadFile(file=f, filename='barcode.gb'), None, None, True, 'barcode')
126
+ resp = await read_from_file(
127
+ dummy_resp, UploadFile(file=f, filename='barcode.gb'), None, None, True, 'barcode', None, None
128
+ )
127
129
 
128
130
  barcode_source = resp['sources'][0]
129
131
  barcode_seq: TextFileSequence = resp['sequences'][0]
@@ -132,7 +134,14 @@ async def main():
132
134
  with open(os.path.join(os.path.dirname(__file__), 'common_plasmid.gb'), 'rb') as f:
133
135
  dummy_resp = Response()
134
136
  resp = await read_from_file(
135
- dummy_resp, UploadFile(file=f, filename='common_plasmid.gb'), None, None, True, 'common_plasmid'
137
+ dummy_resp,
138
+ UploadFile(file=f, filename='common_plasmid.gb'),
139
+ None,
140
+ None,
141
+ True,
142
+ 'common_plasmid',
143
+ None,
144
+ None,
136
145
  )
137
146
 
138
147
  common_plasmid_source = resp['sources'][0]
@@ -1,7 +1,7 @@
1
1
  import os
2
- from ...endpoints.external_import import genome_coordinates, get_from_repository_id_addgene, read_from_file
3
- from ...endpoints.assembly import pcr, homologous_recombination
4
- from ...pydantic_models import (
2
+ from opencloning.endpoints.external_import import genome_coordinates, get_from_repository_id_addgene, read_from_file
3
+ from opencloning.endpoints.assembly import pcr, homologous_recombination
4
+ from opencloning.pydantic_models import (
5
5
  GenomeCoordinatesSource,
6
6
  TextFileSequence,
7
7
  AddgeneIdSource,
@@ -12,7 +12,7 @@ from ...pydantic_models import (
12
12
  UploadedFileSource,
13
13
  )
14
14
 
15
- from ...ncbi_requests import get_annotations_from_query
15
+ from opencloning.ncbi_requests import get_annotations_from_query
16
16
  import asyncio
17
17
  import json
18
18
  from Bio import SeqIO
@@ -78,9 +78,9 @@ async def main(
78
78
  # Get plasmid sequence =================s================================================================
79
79
  if not isinstance(plasmid, str):
80
80
  if plasmid.filename.endswith('.fa') or plasmid.filename.endswith('.fasta'):
81
- resp = await read_from_file(plasmid, None, None, True, None)
81
+ resp = await read_from_file(plasmid, None, None, True, None, None, None)
82
82
  else:
83
- resp = await read_from_file(plasmid, None, None, None, None)
83
+ resp = await read_from_file(plasmid, None, None, None, None, None, None)
84
84
  # Verify that plasmid is circular
85
85
  if not pydna_parse(resp['sequences'][0].file_content)[0].circular:
86
86
  raise ValueError('Plasmid is not circular')
@@ -265,12 +265,16 @@ async def pcr(
265
265
  source: PCRSource,
266
266
  sequences: Annotated[list[TextFileSequence], Field(min_length=1, max_length=1)],
267
267
  primers: Annotated[list[PrimerModel], Field(min_length=1, max_length=2)],
268
- minimal_annealing: int = Query(20, description='The minimal annealing length for each primer.'),
268
+ minimal_annealing: int = Query(
269
+ 14,
270
+ description='The minimal amount of bases that must match between the primer and the sequence, excluding mismatches.',
271
+ ),
269
272
  allowed_mismatches: int = Query(0, description='The number of mismatches allowed'),
270
273
  ):
271
274
  if len(primers) != len(sequences) * 2:
272
275
  raise HTTPException(400, 'The number of primers should be twice the number of sequences.')
273
276
 
277
+ minimal_annealing = minimal_annealing + allowed_mismatches
274
278
  pydna_sequences = [read_dsrecord_from_json(s) for s in sequences]
275
279
  pydna_primers = [PydnaPrimer(p.sequence, id=str(p.id), name=p.name) for p in primers]
276
280
 
@@ -1,8 +1,9 @@
1
- Metadata-Version: 2.3
1
+ Metadata-Version: 2.4
2
2
  Name: opencloning
3
- Version: 0.4.2
3
+ Version: 0.4.3
4
4
  Summary: Backend of OpenCloning, a web application to generate molecular cloning strategies in json format, and share them with others.
5
5
  License: MIT
6
+ License-File: LICENSE
6
7
  Author: Manuel Lera-Ramirez
7
8
  Author-email: manulera14@gmail.com
8
9
  Requires-Python: >=3.11,<4.0
@@ -11,6 +12,7 @@ Classifier: Programming Language :: Python :: 3
11
12
  Classifier: Programming Language :: Python :: 3.11
12
13
  Classifier: Programming Language :: Python :: 3.12
13
14
  Classifier: Programming Language :: Python :: 3.13
15
+ Classifier: Programming Language :: Python :: 3.14
14
16
  Requires-Dist: beautifulsoup4 (>=4.11.1,<5.0.0)
15
17
  Requires-Dist: biopython (>=1.85,<2.0)
16
18
  Requires-Dist: fastapi
@@ -5,13 +5,13 @@ opencloning/app_settings.py,sha256=FJFayBMLtE9gRC1e0ns5sVQRUb9DVXJ8o-ix4bTlPmI,2
5
5
  opencloning/batch_cloning/EBIC/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
6
  opencloning/batch_cloning/EBIC/barcode.gb,sha256=G6kP6MuY23S-n3xg16LQaTasFtYFqik5eEgcooZ9ATM,815
7
7
  opencloning/batch_cloning/EBIC/common_plasmid.gb,sha256=At1HJjqJ2MsLMEx6W3MihJy7tgdtDu3fhwF4YGuw8Dk,13068
8
- opencloning/batch_cloning/EBIC/example.py,sha256=1OENMoPVn5lhTall_DvD7qx7t021a2HMV11kpStVs88,6851
8
+ opencloning/batch_cloning/EBIC/example.py,sha256=tCXbxJtn4O0PxxAnm1UlxlrTlFHSK5C8R9D_6Br_8HE,7048
9
9
  opencloning/batch_cloning/EBIC/primer_design_settings.py,sha256=MVML1r1ciJYMFUJoqZVcGLoPM-f28oBN1wSDzlD0y64,1896
10
10
  opencloning/batch_cloning/__init__.py,sha256=uDxAa45g30_S6dJScNMlIxubQXlLRUsWoLX4S4y-l88,244
11
11
  opencloning/batch_cloning/index.html,sha256=HDqPHrJxrrKfGmy_dwYHhOsdUgZHHIch7Z0ey8qyvZI,1332
12
12
  opencloning/batch_cloning/pombe/__init__.py,sha256=Fq7SroO0Fer5CtFBRWdduIvzp1_dTUZwBb8IjBtRQO0,3332
13
13
  opencloning/batch_cloning/pombe/index.html,sha256=3YchoKGpcKDfvTOW1Rdih4PkbZIkMjKIQ0PaVXfV3e8,8348
14
- opencloning/batch_cloning/pombe/pombe_clone.py,sha256=3Z51NA0rhU-e4SxuLnlV5iDWeQrqECJTfe8IfiDoiow,7996
14
+ opencloning/batch_cloning/pombe/pombe_clone.py,sha256=JlaTKcPBH8pR94FVgTPCopGRBCjS2VKvkkxZLjJdyb4,8056
15
15
  opencloning/batch_cloning/pombe/pombe_gather.py,sha256=qI-biMZGLxVDV-vOf3sT6bS1BawtTihZNcSYNlnnEi8,2432
16
16
  opencloning/batch_cloning/pombe/pombe_get_primers.py,sha256=nrn6V4_l8FWWfqS4WU3qPt95KwzvCXxETh8E-zWbRhM,3968
17
17
  opencloning/batch_cloning/pombe/pombe_summary.py,sha256=DBpoSEV1xPFm8TFDhrxS4tjqxJVrfH-ttM_0ELjQqok,4350
@@ -28,7 +28,7 @@ opencloning/ebic/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,
28
28
  opencloning/ebic/primer_design.py,sha256=gPZTF9w5SV7WGgnefp_HBM831y0z73M1Kb0QUPnbfIM,2270
29
29
  opencloning/ebic/primer_design_settings.py,sha256=OnFsuh0QCvplUEPXLZouzRo9R7rm4nLbcd2LkDCiIDM,1896
30
30
  opencloning/endpoints/annotation.py,sha256=3rlIXeNQzoqPD9lJUEBGLGxvlhUCTcfkqno814A8P0U,2283
31
- opencloning/endpoints/assembly.py,sha256=KdVi63Bjmb7qwCQrwMUkRK6lAhlAJvBcHLqj1VJtuAQ,21584
31
+ opencloning/endpoints/assembly.py,sha256=xkvChfwspdh2lnCi9tQFfTQuEhJfNXNjDb4wRKymZV8,21727
32
32
  opencloning/endpoints/external_import.py,sha256=Z9zd94kzmnbLG_yEAjI-1HK7sIAMcLz3FSZZR66BV-U,18386
33
33
  opencloning/endpoints/no_assembly.py,sha256=F6mRZFGUAASZ0v7EhPyBgmn_O-YLySMR1a_0aUH2U70,4806
34
34
  opencloning/endpoints/no_input.py,sha256=0wc5sTD6nL0SrsXmT__x0g-m6m45ID5hq-D8KDKy98Y,4170
@@ -43,7 +43,7 @@ opencloning/primer_design.py,sha256=nqCmYIZ7UvU4CQwVGJwX7T5LTHwt3-51_ZcTZZAgT_Y,
43
43
  opencloning/pydantic_models.py,sha256=N18tl8r6owDxTBRtrvB7DU3kmp59sBc8gYxujT9q6jE,19900
44
44
  opencloning/request_examples.py,sha256=_VvY4lNpgqhLTM6O_OUs1TujhL7RUbRFZ9ptyssbxLk,2934
45
45
  opencloning/utils.py,sha256=0Lvw1h1AsUJTK2b9mNzYVi_DBeWmWCFA5dIPl_gERcI,1479
46
- opencloning-0.4.2.dist-info/LICENSE,sha256=VSdVE1f8axjIh6gvo9ZZygJdTVkRFMcwCW_hvjOHC_w,1058
47
- opencloning-0.4.2.dist-info/METADATA,sha256=jdAjLsb539U782FhTf2O7jV3UdQ-07mlCvu4LnFyd-c,9138
48
- opencloning-0.4.2.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
49
- opencloning-0.4.2.dist-info/RECORD,,
46
+ opencloning-0.4.3.dist-info/METADATA,sha256=fCbNrI65QXY0C6J_kMt5M0jMPo5TbzZasWaBxWqYheo,9211
47
+ opencloning-0.4.3.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
48
+ opencloning-0.4.3.dist-info/licenses/LICENSE,sha256=VSdVE1f8axjIh6gvo9ZZygJdTVkRFMcwCW_hvjOHC_w,1058
49
+ opencloning-0.4.3.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: poetry-core 2.1.3
2
+ Generator: poetry-core 2.2.1
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any