opencloning 0.2.8.3__py3-none-any.whl → 0.3.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.
- opencloning/_version.py +7 -0
- opencloning/assembly2.py +11 -0
- opencloning/batch_cloning/pombe/__init__.py +0 -6
- opencloning/batch_cloning/ziqiang_et_al2024/ziqiang_et_al2024.json +39 -46
- opencloning/bug_fixing/README.md +138 -0
- opencloning/bug_fixing/__init__.py +0 -0
- opencloning/bug_fixing/backend_v0_3.py +117 -0
- opencloning/cre_lox.py +58 -0
- opencloning/endpoints/assembly.py +12 -3
- opencloning/endpoints/external_import.py +3 -3
- opencloning/endpoints/other.py +49 -7
- opencloning/endpoints/primer_design.py +5 -6
- opencloning/gateway.py +5 -4
- opencloning/pydantic_models.py +119 -25
- opencloning/utils.py +0 -12
- {opencloning-0.2.8.3.dist-info → opencloning-0.3.0.dist-info}/METADATA +10 -3
- {opencloning-0.2.8.3.dist-info → opencloning-0.3.0.dist-info}/RECORD +19 -15
- {opencloning-0.2.8.3.dist-info → opencloning-0.3.0.dist-info}/LICENSE +0 -0
- {opencloning-0.2.8.3.dist-info → opencloning-0.3.0.dist-info}/WHEEL +0 -0
opencloning/_version.py
ADDED
opencloning/assembly2.py
CHANGED
|
@@ -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)
|