Skip to content

Commit d43bf77

Browse files
committed
Add knowledge level and agent type
1 parent 3a3d1a5 commit d43bf77

1 file changed

Lines changed: 73 additions & 1 deletion

File tree

cohd/cohd_trapi_15.py

Lines changed: 73 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,7 @@ def _interpret_query(self):
572572
self._invalid_query_response = response, 200
573573
return self._valid_query, self._invalid_query_response
574574

575-
# If client specifies unsupported set_interpretation (ALL or MANY), respond with error code
575+
# If client specifies unsupported set_interpretation (ALL or MANY), respond with error code
576576
if concept_1_qnode.get('set_interpretation') in CohdTrapi150.unsupported_set_interpretation or \
577577
concept_2_qnode.get('set_interpretation') in CohdTrapi150.unsupported_set_interpretation:
578578
self._valid_query = False
@@ -1410,6 +1410,18 @@ def _add_kg_edge(self, node_1, node_2, cohd_result):
14101410
'value_type_id': 'EDAM:data_1048', # Database ID
14111411
'attribute_source': CohdTrapi._INFORES_ID,
14121412
'description': f'Dataset ID within {CohdTrapi._SERVICE_NAME}'
1413+
},
1414+
# Knowledge Level
1415+
{
1416+
'attribute_type_id': 'biolink:knowledge_level',
1417+
'value': 'statistical_association',
1418+
'attribute_source': CohdTrapi._INFORES_ID
1419+
},
1420+
# Agent Type
1421+
{
1422+
'attribute_type_id': 'biolink:agent_type',
1423+
'value': 'computational_model',
1424+
'attribute_source': CohdTrapi._INFORES_ID
14131425
}
14141426
]
14151427
},
@@ -1447,6 +1459,18 @@ def _add_kg_edge(self, node_1, node_2, cohd_result):
14471459
'value_type_id': 'EDAM:data_1048', # Database ID
14481460
'attribute_source': CohdTrapi._INFORES_ID,
14491461
'description': f'Dataset ID within {CohdTrapi._SERVICE_NAME}'
1462+
},
1463+
# Knowledge Level
1464+
{
1465+
'attribute_type_id': 'biolink:knowledge_level',
1466+
'value': 'statistical_association',
1467+
'attribute_source': CohdTrapi._INFORES_ID
1468+
},
1469+
# Agent Type
1470+
{
1471+
'attribute_type_id': 'biolink:agent_type',
1472+
'value': 'computational_model',
1473+
'attribute_source': CohdTrapi._INFORES_ID
14501474
}
14511475
]
14521476
},
@@ -1491,6 +1515,18 @@ def _add_kg_edge(self, node_1, node_2, cohd_result):
14911515
'value_type_id': 'EDAM:data_1048', # Database ID
14921516
'attribute_source': CohdTrapi._INFORES_ID,
14931517
'description': f'Dataset ID within {CohdTrapi._SERVICE_NAME}'
1518+
},
1519+
# Knowledge Level
1520+
{
1521+
'attribute_type_id': 'biolink:knowledge_level',
1522+
'value': 'statistical_association',
1523+
'attribute_source': CohdTrapi._INFORES_ID
1524+
},
1525+
# Agent Type
1526+
{
1527+
'attribute_type_id': 'biolink:agent_type',
1528+
'value': 'computational_model',
1529+
'attribute_source': CohdTrapi._INFORES_ID
14941530
}
14951531
]
14961532
},
@@ -1542,6 +1578,18 @@ def _add_kg_edge(self, node_1, node_2, cohd_result):
15421578
'value_type_id': 'EDAM:data_1048', # Database ID
15431579
'attribute_source': CohdTrapi._INFORES_ID,
15441580
'description': f'Dataset ID within {CohdTrapi._SERVICE_NAME}'
1581+
},
1582+
# Knowledge Level
1583+
{
1584+
'attribute_type_id': 'biolink:knowledge_level',
1585+
'value': 'statistical_association',
1586+
'attribute_source': CohdTrapi._INFORES_ID
1587+
},
1588+
# Agent Type
1589+
{
1590+
'attribute_type_id': 'biolink:agent_type',
1591+
'value': 'computational_model',
1592+
'attribute_source': CohdTrapi._INFORES_ID
15451593
}
15461594
]
15471595
},
@@ -1585,8 +1633,32 @@ def _add_kg_edge(self, node_1, node_2, cohd_result):
15851633
'value_type_id': 'EDAM:data_1048', # Database ID
15861634
'attribute_source': CohdTrapi._INFORES_ID,
15871635
'description': f'Dataset ID within {CohdTrapi._SERVICE_NAME}'
1636+
},
1637+
# Knowledge Level
1638+
{
1639+
'attribute_type_id': 'biolink:knowledge_level',
1640+
'value': 'statistical_association',
1641+
'attribute_source': CohdTrapi._INFORES_ID
1642+
},
1643+
# Agent Type
1644+
{
1645+
'attribute_type_id': 'biolink:agent_type',
1646+
'value': 'computational_model',
1647+
'attribute_source': CohdTrapi._INFORES_ID
15881648
}
15891649
]
1650+
},
1651+
# Knowledge Level
1652+
{
1653+
'attribute_type_id': 'biolink:knowledge_level',
1654+
'value': 'statistical_association',
1655+
'attribute_source': CohdTrapi._INFORES_ID
1656+
},
1657+
# Agent Type
1658+
{
1659+
'attribute_type_id': 'biolink:agent_type',
1660+
'value': 'computational_model',
1661+
'attribute_source': CohdTrapi._INFORES_ID
15901662
}
15911663
]
15921664
# From calculation of chi_square

0 commit comments

Comments
 (0)