mtbls-mhd-integration 0.0.13__py3-none-any.whl → 0.0.14__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.
- mtbls2mhd/__init__.py +1 -1
- mtbls2mhd/convertor_factory.py +5 -1
- mtbls2mhd/v0_1/legacy/builder.py +1 -1
- mtbls2mhd/v0_1/ms/convertor.py +59 -3
- {mtbls_mhd_integration-0.0.13.dist-info → mtbls_mhd_integration-0.0.14.dist-info}/METADATA +1 -1
- {mtbls_mhd_integration-0.0.13.dist-info → mtbls_mhd_integration-0.0.14.dist-info}/RECORD +10 -10
- {mtbls_mhd_integration-0.0.13.dist-info → mtbls_mhd_integration-0.0.14.dist-info}/WHEEL +0 -0
- {mtbls_mhd_integration-0.0.13.dist-info → mtbls_mhd_integration-0.0.14.dist-info}/entry_points.txt +0 -0
- {mtbls_mhd_integration-0.0.13.dist-info → mtbls_mhd_integration-0.0.14.dist-info}/licenses/LICENSE +0 -0
- {mtbls_mhd_integration-0.0.13.dist-info → mtbls_mhd_integration-0.0.14.dist-info}/top_level.txt +0 -0
mtbls2mhd/__init__.py
CHANGED
mtbls2mhd/convertor_factory.py
CHANGED
|
@@ -6,6 +6,7 @@ from mhd_model.model.definitions import (
|
|
|
6
6
|
)
|
|
7
7
|
|
|
8
8
|
from mtbls2mhd.v0_1.legacy.convertor import LegacyProfileV01Convertor
|
|
9
|
+
from mtbls2mhd.v0_1.ms.convertor import MsProfileConvertor
|
|
9
10
|
|
|
10
11
|
|
|
11
12
|
class Mtbls2MhdConvertorFactory(BaseMhdConvertorFactory):
|
|
@@ -21,7 +22,10 @@ class Mtbls2MhdConvertorFactory(BaseMhdConvertorFactory):
|
|
|
21
22
|
target_mhd_model_profile_uri=target_mhd_model_profile_uri,
|
|
22
23
|
)
|
|
23
24
|
elif target_mhd_model_profile_uri == MHD_MODEL_V0_1_MS_PROFILE_NAME:
|
|
24
|
-
|
|
25
|
+
return MsProfileConvertor(
|
|
26
|
+
target_mhd_model_schema_uri=target_mhd_model_schema_uri,
|
|
27
|
+
target_mhd_model_profile_uri=target_mhd_model_profile_uri,
|
|
28
|
+
)
|
|
25
29
|
raise NotImplementedError()
|
|
26
30
|
else:
|
|
27
31
|
raise NotImplementedError()
|
mtbls2mhd/v0_1/legacy/builder.py
CHANGED
|
@@ -1808,7 +1808,7 @@ class MhdLegacyDatasetBuilder:
|
|
|
1808
1808
|
files_map,
|
|
1809
1809
|
) -> dict[str, mhd_domain.Assay]:
|
|
1810
1810
|
protocol_summaries: OrderedDict[str, ProtocolRunSummary] = OrderedDict()
|
|
1811
|
-
assays
|
|
1811
|
+
assays: OrderedDict[str, mhd_domain.Assay] = OrderedDict()
|
|
1812
1812
|
for assay in selected_assays:
|
|
1813
1813
|
if assay.file_name not in data.assays:
|
|
1814
1814
|
continue
|
mtbls2mhd/v0_1/ms/convertor.py
CHANGED
|
@@ -1,3 +1,59 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
from pathlib import Path
|
|
2
|
+
|
|
3
|
+
from mhd_model.convertors.mhd.convertor import BaseMhdConvertor
|
|
4
|
+
from mhd_model.shared.model import Revision
|
|
5
|
+
|
|
6
|
+
from mtbls2mhd.config import Mtbls2MhdConfiguration, get_default_config
|
|
7
|
+
from mtbls2mhd.v0_1.legacy.builder import BuildType, MhdLegacyDatasetBuilder
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class MsProfileConvertor(BaseMhdConvertor):
|
|
11
|
+
def __init__(
|
|
12
|
+
self,
|
|
13
|
+
target_mhd_model_schema_uri: str,
|
|
14
|
+
target_mhd_model_profile_uri: str,
|
|
15
|
+
):
|
|
16
|
+
self.target_mhd_model_schema_uri = target_mhd_model_schema_uri
|
|
17
|
+
self.target_mhd_model_profile_uri = target_mhd_model_profile_uri
|
|
18
|
+
|
|
19
|
+
def convert(
|
|
20
|
+
self,
|
|
21
|
+
repository_name: str,
|
|
22
|
+
repository_identifier: str,
|
|
23
|
+
mhd_identifier: None | str,
|
|
24
|
+
repository_revision: None | Revision = None,
|
|
25
|
+
config: None | Mtbls2MhdConfiguration = None, # noqa: F821
|
|
26
|
+
cached_mtbls_model_file_path: None | str = None,
|
|
27
|
+
**kwargs,
|
|
28
|
+
):
|
|
29
|
+
if not config:
|
|
30
|
+
config = get_default_config()
|
|
31
|
+
mhd_dataset_builder = MhdLegacyDatasetBuilder()
|
|
32
|
+
mtbls_study_repository_url = (
|
|
33
|
+
f"{config.study_http_base_url}/{repository_identifier}"
|
|
34
|
+
)
|
|
35
|
+
|
|
36
|
+
mtbls_study_path = Path(config.mtbls_studies_root_path) / Path(
|
|
37
|
+
repository_identifier
|
|
38
|
+
)
|
|
39
|
+
try:
|
|
40
|
+
success, message = mhd_dataset_builder.build(
|
|
41
|
+
mhd_id=mhd_identifier,
|
|
42
|
+
mtbls_study_id=repository_identifier,
|
|
43
|
+
mtbls_study_path=mtbls_study_path,
|
|
44
|
+
mtbls_study_repository_url=mtbls_study_repository_url,
|
|
45
|
+
target_mhd_model_schema_uri=self.target_mhd_model_schema_uri,
|
|
46
|
+
target_mhd_model_profile_uri=self.target_mhd_model_profile_uri,
|
|
47
|
+
config=config,
|
|
48
|
+
cached_mtbls_model_file_path=cached_mtbls_model_file_path,
|
|
49
|
+
revision=repository_revision,
|
|
50
|
+
repository_name=repository_name,
|
|
51
|
+
build_type=BuildType.FULL_AND_CUSTOM_NODES,
|
|
52
|
+
**kwargs,
|
|
53
|
+
)
|
|
54
|
+
return success, message
|
|
55
|
+
except Exception as ex:
|
|
56
|
+
import traceback
|
|
57
|
+
|
|
58
|
+
traceback.print_exc()
|
|
59
|
+
return False, str(ex)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
mtbls2mhd/__init__.py,sha256=
|
|
1
|
+
mtbls2mhd/__init__.py,sha256=XpOJ1XATu_r7h8z0RvXDGIZ-JHycpLZFRO5bzsIc6W0,158
|
|
2
2
|
mtbls2mhd/config.py,sha256=BjOqAyfDhp9byoFjJz70xh4HRR8pu1yrm_5jweqygSI,2310
|
|
3
|
-
mtbls2mhd/convertor_factory.py,sha256=
|
|
3
|
+
mtbls2mhd/convertor_factory.py,sha256=WNXgzLFq84whwv0phrB1B2L1YRabO2tD0nPDT9QJ6gQ,1365
|
|
4
4
|
mtbls2mhd/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
5
|
mtbls2mhd/commands/cli.py,sha256=XhLcqBxmBNX_nSEc4aU9q2D9VoYvqZKeRuYLbt-JwZ8,662
|
|
6
6
|
mtbls2mhd/commands/create.py,sha256=fcZO5Ez5yams95Zpx1vQjjagBiJzfnZrIKfk5Z6qoRw,452
|
|
@@ -8,16 +8,16 @@ mtbls2mhd/commands/create_mhd_file.py,sha256=0sDr-Cm0JhhEB5V1g66uoag3rlcaAnGP8Md
|
|
|
8
8
|
mtbls2mhd/commands/validate.py,sha256=iwIKegviRxdH0r8scRXbDISlwQUzAq5uVoCHinU7x6Q,473
|
|
9
9
|
mtbls2mhd/v0_1/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
10
10
|
mtbls2mhd/v0_1/legacy/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
11
|
-
mtbls2mhd/v0_1/legacy/builder.py,sha256=
|
|
11
|
+
mtbls2mhd/v0_1/legacy/builder.py,sha256=EhTDcshxkQTs-vz60TZ6e2ECyn6ZwRaJRxJGKwilS0o,90588
|
|
12
12
|
mtbls2mhd/v0_1/legacy/convertor.py,sha256=Nu6xJvEk8WsRQJQFoxM5eo-y46tVfWV8EkedVoqI9rI,2198
|
|
13
13
|
mtbls2mhd/v0_1/legacy/db_metadata_collector.py,sha256=UGk1AeST1NQ9lWwy_sYZxaaWs0ajgaKELDJtXJ4-Uco,13071
|
|
14
14
|
mtbls2mhd/v0_1/legacy/folder_metadata_collector.py,sha256=QwtXI9rBvdh6pxILQDHymIwYDqzGuMxqdOcqtdAObME,7538
|
|
15
15
|
mtbls2mhd/v0_1/legacy/mtbls_study_schema.py,sha256=gUTbRmI8GfHI5leLiw8dxsmWnV3NnWw5RPX_LQWRFRQ,3162
|
|
16
16
|
mtbls2mhd/v0_1/ms/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
17
|
-
mtbls2mhd/v0_1/ms/convertor.py,sha256=
|
|
18
|
-
mtbls_mhd_integration-0.0.
|
|
19
|
-
mtbls_mhd_integration-0.0.
|
|
20
|
-
mtbls_mhd_integration-0.0.
|
|
21
|
-
mtbls_mhd_integration-0.0.
|
|
22
|
-
mtbls_mhd_integration-0.0.
|
|
23
|
-
mtbls_mhd_integration-0.0.
|
|
17
|
+
mtbls2mhd/v0_1/ms/convertor.py,sha256=axkKDRx00ix6ceqJe9-KruEYEZOgaVtsAgCHiixPo5k,2201
|
|
18
|
+
mtbls_mhd_integration-0.0.14.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
19
|
+
mtbls_mhd_integration-0.0.14.dist-info/METADATA,sha256=7Y-wIcfSz16osVnn30q1V4xd3I1A6kIsYDfcqHBEu0E,688
|
|
20
|
+
mtbls_mhd_integration-0.0.14.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
21
|
+
mtbls_mhd_integration-0.0.14.dist-info/entry_points.txt,sha256=WQjM4flaYMyvHyv9zGKjCVk1i1_FGdNlhTmFVGgLgxs,61
|
|
22
|
+
mtbls_mhd_integration-0.0.14.dist-info/top_level.txt,sha256=b7pI95n6HIQMFXDD0yL1NwldiDc-XdeWql4Iw-uYygQ,10
|
|
23
|
+
mtbls_mhd_integration-0.0.14.dist-info/RECORD,,
|
|
File without changes
|
{mtbls_mhd_integration-0.0.13.dist-info → mtbls_mhd_integration-0.0.14.dist-info}/entry_points.txt
RENAMED
|
File without changes
|
{mtbls_mhd_integration-0.0.13.dist-info → mtbls_mhd_integration-0.0.14.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|
{mtbls_mhd_integration-0.0.13.dist-info → mtbls_mhd_integration-0.0.14.dist-info}/top_level.txt
RENAMED
|
File without changes
|