opencloning 0.4.7__py3-none-any.whl → 0.5__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.
Files changed (38) hide show
  1. opencloning/app_settings.py +7 -0
  2. opencloning/batch_cloning/pombe/__init__.py +2 -2
  3. opencloning/batch_cloning/pombe/pombe_clone.py +31 -112
  4. opencloning/batch_cloning/pombe/pombe_summary.py +20 -8
  5. opencloning/batch_cloning/ziqiang_et_al2024/__init__.py +8 -8
  6. opencloning/batch_cloning/ziqiang_et_al2024/ziqiang_et_al2024.json +2 -9
  7. opencloning/bug_fixing/backend_v0_3.py +13 -5
  8. opencloning/catalogs/__init__.py +36 -0
  9. opencloning/catalogs/igem2024.yaml +2172 -0
  10. opencloning/catalogs/openDNA_collections.yaml +1161 -0
  11. opencloning/catalogs/readme.txt +1 -0
  12. opencloning/catalogs/seva.tsv +231 -0
  13. opencloning/catalogs/snapgene.yaml +2837 -0
  14. opencloning/dna_functions.py +155 -158
  15. opencloning/dna_utils.py +45 -62
  16. opencloning/ebic/primer_design.py +24 -14
  17. opencloning/endpoints/annotation.py +9 -13
  18. opencloning/endpoints/assembly.py +157 -378
  19. opencloning/endpoints/endpoint_utils.py +52 -0
  20. opencloning/endpoints/external_import.py +169 -124
  21. opencloning/endpoints/no_assembly.py +23 -39
  22. opencloning/endpoints/no_input.py +32 -47
  23. opencloning/endpoints/other.py +1 -1
  24. opencloning/endpoints/primer_design.py +23 -17
  25. opencloning/http_client.py +2 -2
  26. opencloning/ncbi_requests.py +113 -47
  27. opencloning/primer3_functions.py +3 -3
  28. opencloning/primer_design.py +1 -1
  29. opencloning/pydantic_models.py +10 -510
  30. opencloning/request_examples.py +10 -22
  31. opencloning/temp_functions.py +50 -0
  32. {opencloning-0.4.7.dist-info → opencloning-0.5.dist-info}/METADATA +18 -8
  33. opencloning-0.5.dist-info/RECORD +51 -0
  34. {opencloning-0.4.7.dist-info → opencloning-0.5.dist-info}/WHEEL +1 -1
  35. opencloning/cre_lox.py +0 -116
  36. opencloning/gateway.py +0 -154
  37. opencloning-0.4.7.dist-info/RECORD +0 -45
  38. {opencloning-0.4.7.dist-info → opencloning-0.5.dist-info}/licenses/LICENSE +0 -0
@@ -1,15 +1,14 @@
1
- from fastapi import Query, HTTPException
1
+ from fastapi import Query
2
2
  from pydantic import create_model
3
- from urllib.error import HTTPError
4
3
 
5
4
  from ..get_router import get_router
6
- from ..pydantic_models import TextFileSequence, AnnotationSource
5
+ from opencloning_linkml.datamodel import TextFileSequence, AnnotationSource
7
6
  from ..dna_functions import (
8
7
  read_dsrecord_from_json,
9
8
  annotate_with_plannotate as _annotate_with_plannotate,
10
9
  format_sequence_genbank,
11
10
  )
12
- from ..gateway import find_gateway_sites
11
+ from pydna.gateway import find_gateway_sites
13
12
  from ..app_settings import settings
14
13
 
15
14
  router = get_router()
@@ -46,15 +45,12 @@ if settings.PLANNOTATE_URL is not None:
46
45
  ):
47
46
  input_seqr = read_dsrecord_from_json(sequence)
48
47
  # Make a request submitting sequence as a file:
49
- try:
50
- seqr, annotations, version = await _annotate_with_plannotate(
51
- sequence.file_content,
52
- f'{sequence.id}.gb',
53
- settings.PLANNOTATE_URL + 'annotate',
54
- settings.PLANNOTATE_TIMEOUT,
55
- )
56
- except HTTPError as e:
57
- raise HTTPException(e.code, e.msg) from e
48
+ seqr, annotations, version = await _annotate_with_plannotate(
49
+ sequence.file_content,
50
+ f'{sequence.id}.gb',
51
+ settings.PLANNOTATE_URL + 'annotate',
52
+ settings.PLANNOTATE_TIMEOUT,
53
+ )
58
54
 
59
55
  source.annotation_report = annotations
60
56
  source.annotation_tool = 'plannotate'