mtbls-mhd-integration 0.0.15__py3-none-any.whl → 0.0.17__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/v0_1/legacy/builder.py +21 -14
- {mtbls_mhd_integration-0.0.15.dist-info → mtbls_mhd_integration-0.0.17.dist-info}/METADATA +2 -2
- {mtbls_mhd_integration-0.0.15.dist-info → mtbls_mhd_integration-0.0.17.dist-info}/RECORD +8 -8
- {mtbls_mhd_integration-0.0.15.dist-info → mtbls_mhd_integration-0.0.17.dist-info}/WHEEL +0 -0
- {mtbls_mhd_integration-0.0.15.dist-info → mtbls_mhd_integration-0.0.17.dist-info}/entry_points.txt +0 -0
- {mtbls_mhd_integration-0.0.15.dist-info → mtbls_mhd_integration-0.0.17.dist-info}/licenses/LICENSE +0 -0
- {mtbls_mhd_integration-0.0.15.dist-info → mtbls_mhd_integration-0.0.17.dist-info}/top_level.txt +0 -0
mtbls2mhd/__init__.py
CHANGED
mtbls2mhd/v0_1/legacy/builder.py
CHANGED
|
@@ -26,7 +26,7 @@ from mhd_model.model.v0_1.dataset.profiles.legacy.profile import MhDatasetLegacy
|
|
|
26
26
|
from mhd_model.model.v0_1.rules.managed_cv_terms import (
|
|
27
27
|
COMMON_ASSAY_TYPES,
|
|
28
28
|
COMMON_CHARACTERISTIC_DEFINITIONS,
|
|
29
|
-
|
|
29
|
+
COMMON_MEASUREMENT_TYPES_MAP,
|
|
30
30
|
COMMON_OMICS_TYPES,
|
|
31
31
|
COMMON_PARAMETER_DEFINITIONS,
|
|
32
32
|
COMMON_PROTOCOLS,
|
|
@@ -61,11 +61,11 @@ MTBLS_ASSAY_TYPES = {
|
|
|
61
61
|
"MS": COMMON_ASSAY_TYPES["OBI:0000470"],
|
|
62
62
|
}
|
|
63
63
|
MTBLS_MEASUREMENT_TYPES = {
|
|
64
|
-
"targeted":
|
|
65
|
-
"untargeted":
|
|
64
|
+
"targeted": COMMON_MEASUREMENT_TYPES_MAP["MSIO:0000100"],
|
|
65
|
+
"untargeted": COMMON_MEASUREMENT_TYPES_MAP["MSIO:0000101"],
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
-
DEFAULT_MEASUREMENT_TYPE =
|
|
68
|
+
DEFAULT_MEASUREMENT_TYPE = COMMON_MEASUREMENT_TYPES_MAP["MSIO:0000101"]
|
|
69
69
|
|
|
70
70
|
DEFAULT_OMICS_TYPE = COMMON_OMICS_TYPES["EDAM:3172"]
|
|
71
71
|
|
|
@@ -283,6 +283,7 @@ class MhdLegacyDatasetBuilder:
|
|
|
283
283
|
if x
|
|
284
284
|
]
|
|
285
285
|
),
|
|
286
|
+
email_list=[submitter.user_name],
|
|
286
287
|
)
|
|
287
288
|
mhd_builder.add(mhd_contact)
|
|
288
289
|
mhd_builder.link(
|
|
@@ -331,6 +332,11 @@ class MhdLegacyDatasetBuilder:
|
|
|
331
332
|
idx,
|
|
332
333
|
)
|
|
333
334
|
continue
|
|
335
|
+
if contact.additional_emails:
|
|
336
|
+
if mhd_contact.email_list:
|
|
337
|
+
mhd_contact.email_list.extend(contact.additional_emails)
|
|
338
|
+
else:
|
|
339
|
+
mhd_contact.email_list = contact.additional_emails
|
|
334
340
|
if not mhd_contact.email_list:
|
|
335
341
|
logger.warning(
|
|
336
342
|
"%s study %s. contact's ('%s') email is empty. Contact will be ignored.",
|
|
@@ -360,7 +366,11 @@ class MhdLegacyDatasetBuilder:
|
|
|
360
366
|
organization,
|
|
361
367
|
reverse_relationship_name="affiliates",
|
|
362
368
|
)
|
|
369
|
+
roles = set()
|
|
363
370
|
for role in contact.roles:
|
|
371
|
+
if role.term.lower() in roles:
|
|
372
|
+
continue
|
|
373
|
+
roles.add(role.term.lower())
|
|
364
374
|
if role.term.lower() == "principal investigator":
|
|
365
375
|
mhd_builder.link(
|
|
366
376
|
mhd_contact,
|
|
@@ -429,7 +439,7 @@ class MhdLegacyDatasetBuilder:
|
|
|
429
439
|
else:
|
|
430
440
|
mhd_contact = contacts[submitter.user_name]
|
|
431
441
|
submitter_roles = [
|
|
432
|
-
x for x in contact.roles if x.term == "submitter"
|
|
442
|
+
x for x in contact.roles if x.term.lower() == "submitter"
|
|
433
443
|
]
|
|
434
444
|
if not submitter_roles:
|
|
435
445
|
mhd_builder.link(
|
|
@@ -1487,17 +1497,17 @@ class MhdLegacyDatasetBuilder:
|
|
|
1487
1497
|
)
|
|
1488
1498
|
mhd_builder.add_node(keyword)
|
|
1489
1499
|
|
|
1490
|
-
if item.source
|
|
1500
|
+
if not item.source or item.source.lower() in ("submitter",):
|
|
1491
1501
|
mhd_builder.link(
|
|
1492
1502
|
mhd_study,
|
|
1493
|
-
"has-
|
|
1503
|
+
"has-submitter-keyword",
|
|
1494
1504
|
keyword,
|
|
1495
1505
|
reverse_relationship_name="keyword-of",
|
|
1496
1506
|
)
|
|
1497
1507
|
else:
|
|
1498
1508
|
mhd_builder.link(
|
|
1499
1509
|
mhd_study,
|
|
1500
|
-
"has-
|
|
1510
|
+
"has-repository-keyword",
|
|
1501
1511
|
keyword,
|
|
1502
1512
|
reverse_relationship_name="keyword-of",
|
|
1503
1513
|
)
|
|
@@ -1525,20 +1535,17 @@ class MhdLegacyDatasetBuilder:
|
|
|
1525
1535
|
)
|
|
1526
1536
|
mhd_builder.add_node(keyword)
|
|
1527
1537
|
|
|
1528
|
-
if item.source
|
|
1529
|
-
"data-curation",
|
|
1530
|
-
"workflows",
|
|
1531
|
-
):
|
|
1538
|
+
if not item.source or item.source.lower() in ("submitter",):
|
|
1532
1539
|
mhd_builder.link(
|
|
1533
1540
|
mhd_assay,
|
|
1534
|
-
"has-
|
|
1541
|
+
"has-submitter-keyword",
|
|
1535
1542
|
keyword,
|
|
1536
1543
|
reverse_relationship_name="keyword-of",
|
|
1537
1544
|
)
|
|
1538
1545
|
else:
|
|
1539
1546
|
mhd_builder.link(
|
|
1540
1547
|
mhd_assay,
|
|
1541
|
-
"has-
|
|
1548
|
+
"has-repository-keyword",
|
|
1542
1549
|
keyword,
|
|
1543
1550
|
reverse_relationship_name="keyword-of",
|
|
1544
1551
|
)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mtbls-mhd-integration
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.17
|
|
4
4
|
Summary: MetaboLights - MetabolomicsHub Integration
|
|
5
5
|
Author-email: MetaboLights Team <metabolights-help@ebi.ac.uk>
|
|
6
6
|
License-Expression: Apache-2.0
|
|
@@ -9,7 +9,7 @@ Description-Content-Type: text/markdown
|
|
|
9
9
|
License-File: LICENSE
|
|
10
10
|
Requires-Dist: asyncpg>=0.30.0
|
|
11
11
|
Requires-Dist: metabolights-utils>=1.4.18
|
|
12
|
-
Requires-Dist: mhd-model>=0.1.
|
|
12
|
+
Requires-Dist: mhd-model>=0.1.46
|
|
13
13
|
Requires-Dist: psycopg[binary,pool]>=3.3.2
|
|
14
14
|
Requires-Dist: pydantic>=2.12.4
|
|
15
15
|
Requires-Dist: pydantic-settings>=2.10.1
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
mtbls2mhd/__init__.py,sha256=
|
|
1
|
+
mtbls2mhd/__init__.py,sha256=lkJhnuTb0LawSiMqaWAugon4vfs7AMhVqkBwwjO7xfg,158
|
|
2
2
|
mtbls2mhd/config.py,sha256=BjOqAyfDhp9byoFjJz70xh4HRR8pu1yrm_5jweqygSI,2310
|
|
3
3
|
mtbls2mhd/convertor_factory.py,sha256=WNXgzLFq84whwv0phrB1B2L1YRabO2tD0nPDT9QJ6gQ,1365
|
|
4
4
|
mtbls2mhd/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -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=sG6hc50FFdvarm1406E2z1xrzVvR3zqZMmFA8jOZBSQ,93117
|
|
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
17
|
mtbls2mhd/v0_1/ms/convertor.py,sha256=axkKDRx00ix6ceqJe9-KruEYEZOgaVtsAgCHiixPo5k,2201
|
|
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.
|
|
18
|
+
mtbls_mhd_integration-0.0.17.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
19
|
+
mtbls_mhd_integration-0.0.17.dist-info/METADATA,sha256=WVYl02uLUuCzx-5iqXouy1a5I1u78voiAB1RQrwgml0,688
|
|
20
|
+
mtbls_mhd_integration-0.0.17.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
21
|
+
mtbls_mhd_integration-0.0.17.dist-info/entry_points.txt,sha256=WQjM4flaYMyvHyv9zGKjCVk1i1_FGdNlhTmFVGgLgxs,61
|
|
22
|
+
mtbls_mhd_integration-0.0.17.dist-info/top_level.txt,sha256=b7pI95n6HIQMFXDD0yL1NwldiDc-XdeWql4Iw-uYygQ,10
|
|
23
|
+
mtbls_mhd_integration-0.0.17.dist-info/RECORD,,
|
|
File without changes
|
{mtbls_mhd_integration-0.0.15.dist-info → mtbls_mhd_integration-0.0.17.dist-info}/entry_points.txt
RENAMED
|
File without changes
|
{mtbls_mhd_integration-0.0.15.dist-info → mtbls_mhd_integration-0.0.17.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|
{mtbls_mhd_integration-0.0.15.dist-info → mtbls_mhd_integration-0.0.17.dist-info}/top_level.txt
RENAMED
|
File without changes
|