opencloning 0.4.2__py3-none-any.whl → 0.4.4__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.
- opencloning/batch_cloning/EBIC/example.py +16 -7
- opencloning/batch_cloning/pombe/pombe_clone.py +6 -6
- opencloning/endpoints/assembly.py +5 -1
- opencloning/endpoints/other.py +20 -1
- {opencloning-0.4.2.dist-info → opencloning-0.4.4.dist-info}/METADATA +4 -2
- {opencloning-0.4.2.dist-info → opencloning-0.4.4.dist-info}/RECORD +8 -8
- {opencloning-0.4.2.dist-info → opencloning-0.4.4.dist-info}/WHEEL +1 -1
- {opencloning-0.4.2.dist-info → opencloning-0.4.4.dist-info/licenses}/LICENSE +0 -0
|
@@ -4,7 +4,7 @@ from primer3 import bindings
|
|
|
4
4
|
import json
|
|
5
5
|
from fastapi import UploadFile, Response
|
|
6
6
|
|
|
7
|
-
from
|
|
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
|
|
18
|
-
from
|
|
19
|
-
from
|
|
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(
|
|
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,
|
|
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
|
|
3
|
-
from
|
|
4
|
-
from
|
|
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
|
|
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(
|
|
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
|
|
opencloning/endpoints/other.py
CHANGED
|
@@ -3,6 +3,7 @@ from Bio.Restriction.Restriction_Dictionary import rest_dict
|
|
|
3
3
|
from pydantic import ValidationError
|
|
4
4
|
from opencloning_linkml.migrations import migrate
|
|
5
5
|
from opencloning_linkml._version import __version__ as schema_version
|
|
6
|
+
import os
|
|
6
7
|
|
|
7
8
|
from ..bug_fixing.backend_v0_3 import fix_backend_v0_3
|
|
8
9
|
|
|
@@ -22,9 +23,27 @@ from .._version import __version__ as backend_version
|
|
|
22
23
|
router = get_router()
|
|
23
24
|
|
|
24
25
|
|
|
26
|
+
def version_to_int(version: str | None) -> int | None:
|
|
27
|
+
if version is None:
|
|
28
|
+
return None
|
|
29
|
+
try:
|
|
30
|
+
version = version.replace('v', '')
|
|
31
|
+
# Pad to 2 digits
|
|
32
|
+
int_vals = [val.zfill(2) for val in version.split('.')]
|
|
33
|
+
return int(''.join(int_vals))
|
|
34
|
+
except ValueError:
|
|
35
|
+
return None
|
|
36
|
+
|
|
37
|
+
|
|
25
38
|
@router.get('/version')
|
|
26
39
|
async def get_version():
|
|
27
|
-
|
|
40
|
+
opencloning_version = os.getenv('OPENCLONING_VERSION')
|
|
41
|
+
return {
|
|
42
|
+
'backend_version': backend_version,
|
|
43
|
+
'schema_version': schema_version,
|
|
44
|
+
'opencloning_version': opencloning_version,
|
|
45
|
+
'opencloning_version_int': version_to_int(opencloning_version),
|
|
46
|
+
}
|
|
28
47
|
|
|
29
48
|
|
|
30
49
|
@router.get('/restriction_enzyme_list', response_model=dict[str, list[str]])
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: opencloning
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.4
|
|
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=
|
|
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=
|
|
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,11 +28,11 @@ 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=
|
|
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
|
|
35
|
-
opencloning/endpoints/other.py,sha256=
|
|
35
|
+
opencloning/endpoints/other.py,sha256=KvsrfaZXmZcfh3R7mCovuoe62O66EXKEb0pZaEAAYr8,3992
|
|
36
36
|
opencloning/endpoints/primer_design.py,sha256=3eiQ7MwgeLoAuXFUMNF-DzjzwH_eJGCjd4s32CjxIic,12717
|
|
37
37
|
opencloning/gateway.py,sha256=pFB3gsCQL715kOFOP1NQOOsQqrkWuQe5qXk4IunF5SA,8486
|
|
38
38
|
opencloning/get_router.py,sha256=l2DXaTbeL2tDqlnVMlcewutzt1sjaHlxku1X9HVUwJk,252
|
|
@@ -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.
|
|
47
|
-
opencloning-0.4.
|
|
48
|
-
opencloning-0.4.
|
|
49
|
-
opencloning-0.4.
|
|
46
|
+
opencloning-0.4.4.dist-info/METADATA,sha256=NV3X1i61xwbv9VwKTpawPRjeFh-xv6W2vP-DmjycFqA,9211
|
|
47
|
+
opencloning-0.4.4.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
|
|
48
|
+
opencloning-0.4.4.dist-info/licenses/LICENSE,sha256=VSdVE1f8axjIh6gvo9ZZygJdTVkRFMcwCW_hvjOHC_w,1058
|
|
49
|
+
opencloning-0.4.4.dist-info/RECORD,,
|
|
File without changes
|