opencloning 0.2.8.3__tar.gz → 0.3.0__tar.gz
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-0.2.8.3 → opencloning-0.3.0}/PKG-INFO +10 -3
- {opencloning-0.2.8.3 → opencloning-0.3.0}/README.md +7 -1
- {opencloning-0.2.8.3 → opencloning-0.3.0}/pyproject.toml +15 -4
- opencloning-0.3.0/src/opencloning/_version.py +7 -0
- {opencloning-0.2.8.3 → opencloning-0.3.0}/src/opencloning/assembly2.py +11 -0
- {opencloning-0.2.8.3 → opencloning-0.3.0}/src/opencloning/batch_cloning/pombe/__init__.py +0 -6
- opencloning-0.3.0/src/opencloning/batch_cloning/ziqiang_et_al2024/ziqiang_et_al2024.json +273 -0
- opencloning-0.3.0/src/opencloning/bug_fixing/README.md +138 -0
- opencloning-0.3.0/src/opencloning/bug_fixing/backend_v0_3.py +117 -0
- opencloning-0.3.0/src/opencloning/cre_lox.py +116 -0
- opencloning-0.3.0/src/opencloning/ebic/__init__.py +0 -0
- {opencloning-0.2.8.3 → opencloning-0.3.0}/src/opencloning/endpoints/assembly.py +12 -3
- {opencloning-0.2.8.3 → opencloning-0.3.0}/src/opencloning/endpoints/external_import.py +3 -3
- opencloning-0.3.0/src/opencloning/endpoints/other.py +106 -0
- {opencloning-0.2.8.3 → opencloning-0.3.0}/src/opencloning/endpoints/primer_design.py +5 -6
- {opencloning-0.2.8.3 → opencloning-0.3.0}/src/opencloning/gateway.py +5 -4
- {opencloning-0.2.8.3 → opencloning-0.3.0}/src/opencloning/pydantic_models.py +119 -25
- {opencloning-0.2.8.3 → opencloning-0.3.0}/src/opencloning/utils.py +0 -12
- opencloning-0.2.8.3/src/opencloning/batch_cloning/ziqiang_et_al2024/ziqiang_et_al2024.json +0 -280
- opencloning-0.2.8.3/src/opencloning/cre_lox.py +0 -58
- opencloning-0.2.8.3/src/opencloning/endpoints/other.py +0 -64
- {opencloning-0.2.8.3 → opencloning-0.3.0}/LICENSE +0 -0
- {opencloning-0.2.8.3 → opencloning-0.3.0}/src/opencloning/__init__.py +0 -0
- {opencloning-0.2.8.3 → opencloning-0.3.0}/src/opencloning/api_config_utils.py +0 -0
- {opencloning-0.2.8.3 → opencloning-0.3.0}/src/opencloning/app_settings.py +0 -0
- {opencloning-0.2.8.3 → opencloning-0.3.0}/src/opencloning/batch_cloning/EBIC/__init__.py +0 -0
- {opencloning-0.2.8.3 → opencloning-0.3.0}/src/opencloning/batch_cloning/EBIC/barcode.gb +0 -0
- {opencloning-0.2.8.3 → opencloning-0.3.0}/src/opencloning/batch_cloning/EBIC/common_plasmid.gb +0 -0
- {opencloning-0.2.8.3 → opencloning-0.3.0}/src/opencloning/batch_cloning/EBIC/example.py +0 -0
- {opencloning-0.2.8.3 → opencloning-0.3.0}/src/opencloning/batch_cloning/EBIC/primer_design_settings.py +0 -0
- {opencloning-0.2.8.3 → opencloning-0.3.0}/src/opencloning/batch_cloning/__init__.py +0 -0
- {opencloning-0.2.8.3 → opencloning-0.3.0}/src/opencloning/batch_cloning/index.html +0 -0
- {opencloning-0.2.8.3 → opencloning-0.3.0}/src/opencloning/batch_cloning/pombe/index.html +0 -0
- {opencloning-0.2.8.3 → opencloning-0.3.0}/src/opencloning/batch_cloning/pombe/pombe_all.sh +0 -0
- {opencloning-0.2.8.3 → opencloning-0.3.0}/src/opencloning/batch_cloning/pombe/pombe_clone.py +0 -0
- {opencloning-0.2.8.3 → opencloning-0.3.0}/src/opencloning/batch_cloning/pombe/pombe_gather.py +0 -0
- {opencloning-0.2.8.3 → opencloning-0.3.0}/src/opencloning/batch_cloning/pombe/pombe_get_primers.py +0 -0
- {opencloning-0.2.8.3 → opencloning-0.3.0}/src/opencloning/batch_cloning/pombe/pombe_summary.py +0 -0
- {opencloning-0.2.8.3 → opencloning-0.3.0}/src/opencloning/batch_cloning/ziqiang_et_al2024/__init__.py +0 -0
- {opencloning-0.2.8.3 → opencloning-0.3.0}/src/opencloning/batch_cloning/ziqiang_et_al2024/index.html +0 -0
- {opencloning-0.2.8.3/src/opencloning/ebic → opencloning-0.3.0/src/opencloning/bug_fixing}/__init__.py +0 -0
- {opencloning-0.2.8.3 → opencloning-0.3.0}/src/opencloning/dna_functions.py +0 -0
- {opencloning-0.2.8.3 → opencloning-0.3.0}/src/opencloning/dna_utils.py +0 -0
- {opencloning-0.2.8.3 → opencloning-0.3.0}/src/opencloning/ebic/primer_design.py +0 -0
- {opencloning-0.2.8.3 → opencloning-0.3.0}/src/opencloning/ebic/primer_design_settings.py +0 -0
- {opencloning-0.2.8.3 → opencloning-0.3.0}/src/opencloning/endpoints/annotation.py +0 -0
- {opencloning-0.2.8.3 → opencloning-0.3.0}/src/opencloning/endpoints/no_assembly.py +0 -0
- {opencloning-0.2.8.3 → opencloning-0.3.0}/src/opencloning/endpoints/no_input.py +0 -0
- {opencloning-0.2.8.3 → opencloning-0.3.0}/src/opencloning/get_router.py +0 -0
- {opencloning-0.2.8.3 → opencloning-0.3.0}/src/opencloning/main.py +0 -0
- {opencloning-0.2.8.3 → opencloning-0.3.0}/src/opencloning/ncbi_requests.py +0 -0
- {opencloning-0.2.8.3 → opencloning-0.3.0}/src/opencloning/primer_design.py +0 -0
- {opencloning-0.2.8.3 → opencloning-0.3.0}/src/opencloning/request_examples.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: opencloning
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.0
|
|
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
6
|
Author: Manuel Lera-Ramirez
|
|
@@ -15,8 +15,9 @@ Requires-Dist: beautifulsoup4 (>=4.11.1,<5.0.0)
|
|
|
15
15
|
Requires-Dist: biopython (==1.84)
|
|
16
16
|
Requires-Dist: fastapi
|
|
17
17
|
Requires-Dist: httpx (>=0.25.0,<0.26.0)
|
|
18
|
-
Requires-Dist: opencloning-linkml (==0.
|
|
18
|
+
Requires-Dist: opencloning-linkml (==0.3.0a0)
|
|
19
19
|
Requires-Dist: openpyxl (>=3.1.5,<4.0.0)
|
|
20
|
+
Requires-Dist: packaging (>=25.0,<26.0)
|
|
20
21
|
Requires-Dist: pandas (>=2.2.3,<3.0.0)
|
|
21
22
|
Requires-Dist: primer3-py (==2.0.3)
|
|
22
23
|
Requires-Dist: pydantic (>=2.7.1,<3.0.0)
|
|
@@ -48,6 +49,12 @@ This API provides a series of entry points. The API documentation can be accesse
|
|
|
48
49
|
|
|
49
50
|
The API functions can also be used to write python scripts to automate cloning. See the [scripting examples](examples/scripting) for more information.
|
|
50
51
|
|
|
52
|
+
## Migrating between model versions and fixing model bugs
|
|
53
|
+
|
|
54
|
+
* The data model changes, so the json files you created may not be compatible with the newest version of the library, which uses the latest data mode. You can easily fix this using `python -m opencloning_linkml.migrations.migrate file.json
|
|
55
|
+
` see [full documentation](https://github.com/OpenCloning/OpenCloning_LinkML?tab=readme-ov-file#migration-from-previous-versions-of-the-schema).
|
|
56
|
+
* Before version 0.3, there was a bug for assembly fields that included locations spanning the origin. See the details and how to fix it in the documentation of [this file](./src/opencloning/bug_fixing/README.md).
|
|
57
|
+
|
|
51
58
|
## Getting started
|
|
52
59
|
|
|
53
60
|
If you want to quickly set up a local instance of the frontend and backend of the application, check [getting started in 5 minutes](https://github.com/manulera/OpenCloning#timer_clock-getting-started-in-5-minutes) in the main repository.
|
|
@@ -61,7 +68,7 @@ You can install this as a python package:
|
|
|
61
68
|
python -m venv .venv
|
|
62
69
|
# Activate the virtual environment
|
|
63
70
|
source .venv/bin/activate
|
|
64
|
-
# Install the package from
|
|
71
|
+
# Install the package from pypi
|
|
65
72
|
pip install opencloning
|
|
66
73
|
# Run the API (uvicorn should be installed in the virtual environment)
|
|
67
74
|
uvicorn opencloning.main:app
|
|
@@ -17,6 +17,12 @@ This API provides a series of entry points. The API documentation can be accesse
|
|
|
17
17
|
|
|
18
18
|
The API functions can also be used to write python scripts to automate cloning. See the [scripting examples](examples/scripting) for more information.
|
|
19
19
|
|
|
20
|
+
## Migrating between model versions and fixing model bugs
|
|
21
|
+
|
|
22
|
+
* The data model changes, so the json files you created may not be compatible with the newest version of the library, which uses the latest data mode. You can easily fix this using `python -m opencloning_linkml.migrations.migrate file.json
|
|
23
|
+
` see [full documentation](https://github.com/OpenCloning/OpenCloning_LinkML?tab=readme-ov-file#migration-from-previous-versions-of-the-schema).
|
|
24
|
+
* Before version 0.3, there was a bug for assembly fields that included locations spanning the origin. See the details and how to fix it in the documentation of [this file](./src/opencloning/bug_fixing/README.md).
|
|
25
|
+
|
|
20
26
|
## Getting started
|
|
21
27
|
|
|
22
28
|
If you want to quickly set up a local instance of the frontend and backend of the application, check [getting started in 5 minutes](https://github.com/manulera/OpenCloning#timer_clock-getting-started-in-5-minutes) in the main repository.
|
|
@@ -30,7 +36,7 @@ You can install this as a python package:
|
|
|
30
36
|
python -m venv .venv
|
|
31
37
|
# Activate the virtual environment
|
|
32
38
|
source .venv/bin/activate
|
|
33
|
-
# Install the package from
|
|
39
|
+
# Install the package from pypi
|
|
34
40
|
pip install opencloning
|
|
35
41
|
# Run the API (uvicorn should be installed in the virtual environment)
|
|
36
42
|
uvicorn opencloning.main:app
|
|
@@ -1,9 +1,14 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "opencloning"
|
|
3
|
+
dynamic = ["version"]
|
|
4
|
+
|
|
5
|
+
|
|
1
6
|
[tool.poetry]
|
|
2
7
|
authors = ["Manuel Lera-Ramirez <manulera14@gmail.com>"]
|
|
3
8
|
description = "Backend of OpenCloning, a web application to generate molecular cloning strategies in json format, and share them with others."
|
|
4
9
|
license = "MIT"
|
|
5
10
|
name = "opencloning"
|
|
6
|
-
version = "
|
|
11
|
+
version = "0.3.0"
|
|
7
12
|
package-mode = true
|
|
8
13
|
readme = "README.md"
|
|
9
14
|
repository = "https://github.com/manulera/OpenCloning_backend"
|
|
@@ -22,9 +27,10 @@ pydantic = "^2.7.1"
|
|
|
22
27
|
pandas = "^2.2.3"
|
|
23
28
|
openpyxl = "^3.1.5"
|
|
24
29
|
pyyaml = "^6.0.2"
|
|
25
|
-
opencloning-linkml = "0.
|
|
30
|
+
opencloning-linkml = "0.3.0a0"
|
|
26
31
|
primer3-py = "2.0.3"
|
|
27
32
|
biopython = "1.84"
|
|
33
|
+
packaging = "^25.0"
|
|
28
34
|
|
|
29
35
|
[tool.poetry.group.dev.dependencies]
|
|
30
36
|
autopep8 = "^2.0.4"
|
|
@@ -47,9 +53,14 @@ ipython = "^8.20.0"
|
|
|
47
53
|
ipykernel = "^6.28.0"
|
|
48
54
|
|
|
49
55
|
[build-system]
|
|
50
|
-
build-backend = "
|
|
51
|
-
requires = ["poetry-core>=1.0.0"]
|
|
56
|
+
build-backend = "poetry_dynamic_versioning.backend"
|
|
57
|
+
requires = ["poetry-core>=1.0.0", "poetry-dynamic-versioning"]
|
|
52
58
|
|
|
53
59
|
[tool.black]
|
|
54
60
|
skip-string-normalization = true
|
|
55
61
|
line-length = 119
|
|
62
|
+
|
|
63
|
+
[tool.poetry-dynamic-versioning]
|
|
64
|
+
enable = false
|
|
65
|
+
style = "pep440"
|
|
66
|
+
vcs = "git"
|
|
@@ -465,6 +465,17 @@ def assemble(fragments, assembly, is_insertion=False):
|
|
|
465
465
|
is_circular = assembly_is_circular(assembly, fragments)
|
|
466
466
|
|
|
467
467
|
subfragment_representation = edge_representation2subfragment_representation(assembly, is_circular)
|
|
468
|
+
|
|
469
|
+
# Sanity check
|
|
470
|
+
for asm_edge in assembly:
|
|
471
|
+
u, v, loc_u, loc_v = asm_edge
|
|
472
|
+
f_u = fragments[u - 1] if u > 0 else fragments[-u - 1].reverse_complement()
|
|
473
|
+
f_v = fragments[v - 1] if v > 0 else fragments[-v - 1].reverse_complement()
|
|
474
|
+
seq_u = str(loc_u.extract(f_u).seq).upper()
|
|
475
|
+
seq_v = str(loc_v.extract(f_v).seq).upper()
|
|
476
|
+
if seq_u != seq_v:
|
|
477
|
+
raise ValueError('Mismatch in assembly')
|
|
478
|
+
|
|
468
479
|
# We transform into Dseqrecords (for primers)
|
|
469
480
|
dseqr_fragments = [f if isinstance(f, _Dseqrecord) else _Dseqrecord(f) for f in fragments]
|
|
470
481
|
subfragments = get_assembly_subfragments(dseqr_fragments, subfragment_representation)
|
|
@@ -9,9 +9,7 @@ from .pombe_summary import main as pombe_summary
|
|
|
9
9
|
from .pombe_gather import main as pombe_gather
|
|
10
10
|
import shutil
|
|
11
11
|
import traceback
|
|
12
|
-
import json
|
|
13
12
|
from ...get_router import get_router
|
|
14
|
-
from ...utils import api_version
|
|
15
13
|
from fastapi import Request
|
|
16
14
|
|
|
17
15
|
router = get_router()
|
|
@@ -75,10 +73,6 @@ async def post_batch_cloning(
|
|
|
75
73
|
except Exception:
|
|
76
74
|
raise HTTPException(status_code=400, detail='Summary failed')
|
|
77
75
|
|
|
78
|
-
# Write the version
|
|
79
|
-
with open(os.path.join(temp_dir, 'version.json'), 'w') as f:
|
|
80
|
-
f.write(json.dumps(api_version(), indent=2))
|
|
81
|
-
|
|
82
76
|
# zip the temp dir and return it
|
|
83
77
|
zip_filename = f'{temp_dir}_archive'
|
|
84
78
|
shutil.make_archive(zip_filename, 'zip', temp_dir)
|