opencloning 0.4.4__py3-none-any.whl → 0.4.6__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.
@@ -44,6 +44,7 @@ default_allowed_urls = [
44
44
  'http://www.euroscarf.de/',
45
45
  'https://wekwikgene.wllsb.edu.cn',
46
46
  'http://bahlerweb.cs.ucl.ac.uk',
47
+ 'https://assets.opencloning.org/open-dna-collections',
47
48
  ]
48
49
 
49
50
  if os.environ.get('ALLOWED_EXTERNAL_URLS') is not None:
@@ -24,6 +24,7 @@ from ..pydantic_models import (
24
24
  SequenceFileFormat,
25
25
  SEVASource,
26
26
  SequenceLocationStr,
27
+ OpenDNACollectionsSource,
27
28
  )
28
29
  from ..dna_functions import (
29
30
  format_sequence_genbank,
@@ -234,7 +235,8 @@ def repository_id_http_error_handler(exception: HTTPError, source: RepositoryIdS
234
235
  | list[BenchlingUrlSource]
235
236
  | list[EuroscarfSource]
236
237
  | list[WekWikGeneIdSource]
237
- | list[SEVASource],
238
+ | list[SEVASource]
239
+ | list[OpenDNACollectionsSource],
238
240
  ...,
239
241
  ),
240
242
  sequences=(list[TextFileSequence], ...),
@@ -249,6 +251,7 @@ async def get_from_repository_id(
249
251
  | EuroscarfSource
250
252
  | WekWikGeneIdSource
251
253
  | SEVASource
254
+ | OpenDNACollectionsSource
252
255
  ),
253
256
  ):
254
257
  return RedirectResponse(f'/repository_id/{source.repository_name}', status_code=307)
@@ -384,6 +387,22 @@ async def get_from_repository_id_igem(source: IGEMSource):
384
387
  repository_id_http_error_handler(exception, source)
385
388
 
386
389
 
390
+ @router.post(
391
+ '/repository_id/open_dna_collections',
392
+ response_model=create_model(
393
+ 'OpenDNACollectionsResponse',
394
+ sources=(list[OpenDNACollectionsSource], ...),
395
+ sequences=(list[TextFileSequence], ...),
396
+ ),
397
+ )
398
+ async def get_from_repository_id_open_dna_collections(source: OpenDNACollectionsSource):
399
+ try:
400
+ dseq = (await get_sequences_from_file_url(source.sequence_file_url))[0]
401
+ return {'sequences': [format_sequence_genbank(dseq, source.output_name)], 'sources': [source]}
402
+ except HTTPError as exception:
403
+ repository_id_http_error_handler(exception, source)
404
+
405
+
387
406
  @router.post(
388
407
  '/genome_coordinates',
389
408
  response_model=create_model(
@@ -22,7 +22,6 @@ class AllowedExternalUrlsTransport(AsyncHTTPTransport):
22
22
  async def handle_async_request(self, request: Request) -> Response:
23
23
  if any(str(request.url).startswith(url) for url in allowed_external_urls):
24
24
  return await super().handle_async_request(request)
25
-
26
25
  raise HTTPError(request.url, 403, f'Request to {request.url} is not allowed', None, None)
27
26
 
28
27
 
@@ -50,6 +50,7 @@ from opencloning_linkml.datamodel import (
50
50
  CreLoxRecombinationSource as _CreLoxRecombinationSource,
51
51
  InVivoAssemblySource as _InVivoAssemblySource,
52
52
  SourceInput as _SourceInput,
53
+ OpenDNACollectionsSource as _OpenDNACollectionsSource,
53
54
  )
54
55
  from pydna.assembly2 import (
55
56
  edge_representation2subfragment_representation,
@@ -183,6 +184,10 @@ class IGEMSource(SourceCommonClass, _IGEMSource):
183
184
  return self
184
185
 
185
186
 
187
+ class OpenDNACollectionsSource(SourceCommonClass, _OpenDNACollectionsSource):
188
+ pass
189
+
190
+
186
191
  class SEVASource(SourceCommonClass, _SEVASource):
187
192
  pass
188
193
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: opencloning
3
- Version: 0.4.4
3
+ Version: 0.4.6
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
  License-File: LICENSE
@@ -17,7 +17,7 @@ Requires-Dist: beautifulsoup4 (>=4.11.1,<5.0.0)
17
17
  Requires-Dist: biopython (>=1.85,<2.0)
18
18
  Requires-Dist: fastapi
19
19
  Requires-Dist: httpx (>=0.28.1,<0.29.0)
20
- Requires-Dist: opencloning-linkml (==0.4.3)
20
+ Requires-Dist: opencloning-linkml (==0.4.4)
21
21
  Requires-Dist: openpyxl (>=3.1.5,<4.0.0)
22
22
  Requires-Dist: packaging (>=25.0,<26.0)
23
23
  Requires-Dist: pairwise-alignments-to-msa (>=0.1.1,<0.2.0)
@@ -1,7 +1,7 @@
1
1
  opencloning/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
2
  opencloning/_version.py,sha256=6QbWXLSZypjtWL_CwJFHH4dzMRK3AUH4B0YudzvGz9s,200
3
3
  opencloning/api_config_utils.py,sha256=inAXPGYNDz-DuEoSqitImj0Vv5TpQSbMZH9D3dQb5P0,4319
4
- opencloning/app_settings.py,sha256=FJFayBMLtE9gRC1e0ns5sVQRUb9DVXJ8o-ix4bTlPmI,2911
4
+ opencloning/app_settings.py,sha256=6gtIgDIVA9FzfBCnv8IJrEkroTjg4qdAGI4lNdxoA9E,2970
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
@@ -29,21 +29,21 @@ opencloning/ebic/primer_design.py,sha256=gPZTF9w5SV7WGgnefp_HBM831y0z73M1Kb0QUPn
29
29
  opencloning/ebic/primer_design_settings.py,sha256=OnFsuh0QCvplUEPXLZouzRo9R7rm4nLbcd2LkDCiIDM,1896
30
30
  opencloning/endpoints/annotation.py,sha256=3rlIXeNQzoqPD9lJUEBGLGxvlhUCTcfkqno814A8P0U,2283
31
31
  opencloning/endpoints/assembly.py,sha256=xkvChfwspdh2lnCi9tQFfTQuEhJfNXNjDb4wRKymZV8,21727
32
- opencloning/endpoints/external_import.py,sha256=Z9zd94kzmnbLG_yEAjI-1HK7sIAMcLz3FSZZR66BV-U,18386
32
+ opencloning/endpoints/external_import.py,sha256=Fdjj6zu0bdZg8vRi1f5bMejnKNBlt3So-BxaeD1CLxk,19115
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
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
39
- opencloning/http_client.py,sha256=coVesi_qJWea-VHBOd-V-Th6e4P9rzl-8ZILPGq2ne0,1262
39
+ opencloning/http_client.py,sha256=m8LPCxT4b63XPOWGAMmecaNZ7Ho1uxzJm8z7bbhOMqY,1261
40
40
  opencloning/main.py,sha256=l9PrPBMtGMEWxAPiPWR15Qv2oDNnRoNd8H8E3bZW6Do,3750
41
41
  opencloning/ncbi_requests.py,sha256=b8ow9TDpXbyYk_0HeK-7RXWwwZGrhH-MylSNc3_tH0I,5557
42
42
  opencloning/primer_design.py,sha256=nqCmYIZ7UvU4CQwVGJwX7T5LTHwt3-51_ZcTZZAgT_Y,9175
43
- opencloning/pydantic_models.py,sha256=N18tl8r6owDxTBRtrvB7DU3kmp59sBc8gYxujT9q6jE,19900
43
+ opencloning/pydantic_models.py,sha256=SZDFrITTELkel3jOu9YlPC27RsJHzaAXTEYOMEZvvqs,20048
44
44
  opencloning/request_examples.py,sha256=_VvY4lNpgqhLTM6O_OUs1TujhL7RUbRFZ9ptyssbxLk,2934
45
45
  opencloning/utils.py,sha256=0Lvw1h1AsUJTK2b9mNzYVi_DBeWmWCFA5dIPl_gERcI,1479
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,,
46
+ opencloning-0.4.6.dist-info/METADATA,sha256=0PsN9Ho48_stnFV5pX-qHjMqhTlrdE7dGl3pgRHZfpc,9211
47
+ opencloning-0.4.6.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
48
+ opencloning-0.4.6.dist-info/licenses/LICENSE,sha256=VSdVE1f8axjIh6gvo9ZZygJdTVkRFMcwCW_hvjOHC_w,1058
49
+ opencloning-0.4.6.dist-info/RECORD,,