kraph 0.2.0__tar.gz → 0.3.0__tar.gz
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.
- kraph-0.3.0/.gitignore +147 -0
- kraph-0.3.0/PKG-INFO +29 -0
- kraph-0.3.0/README.md +17 -0
- kraph-0.3.0/kraph/__init__.py +23 -0
- {kraph-0.2.0 → kraph-0.3.0}/kraph/api/project.json +17 -0
- {kraph-0.2.0 → kraph-0.3.0}/kraph/api/schema.graphql +239 -11
- {kraph-0.2.0 → kraph-0.3.0}/kraph/api/schema.py +2685 -655
- {kraph-0.2.0 → kraph-0.3.0}/kraph/arkitekt.py +6 -6
- kraph-0.3.0/kraph/contrib/fakts/datalayer.py +40 -0
- {kraph-0.2.0 → kraph-0.3.0}/kraph/datalayer.py +11 -7
- kraph-0.3.0/kraph/funcs.py +68 -0
- {kraph-0.2.0 → kraph-0.3.0}/kraph/io.py +2 -4
- kraph-0.3.0/kraph/kraph.py +9 -0
- kraph-0.3.0/kraph/links/errors.py +0 -0
- {kraph-0.2.0 → kraph-0.3.0}/kraph/links/upload.py +6 -8
- kraph-0.3.0/kraph/py.typed +0 -0
- {kraph-0.2.0 → kraph-0.3.0}/kraph/rath.py +11 -4
- {kraph-0.2.0 → kraph-0.3.0}/kraph/rekuest.py +39 -16
- {kraph-0.2.0 → kraph-0.3.0}/kraph/scalars.py +60 -63
- kraph-0.3.0/kraph/traits.py +1661 -0
- kraph-0.3.0/pyproject.toml +92 -0
- kraph-0.2.0/PKG-INFO +0 -14
- kraph-0.2.0/kraph/__init__.py +0 -13
- kraph-0.2.0/kraph/contrib/fakts/datalayer.py +0 -39
- kraph-0.2.0/kraph/funcs.py +0 -37
- kraph-0.2.0/kraph/kraph.py +0 -13
- kraph-0.2.0/kraph/traits.py +0 -935
- kraph-0.2.0/kraph/utils.py +0 -62
- kraph-0.2.0/pyproject.toml +0 -35
- {kraph-0.2.0/kraph/contrib/fakts → kraph-0.3.0/kraph/api}/__init__.py +0 -0
- /kraph-0.2.0/kraph/links/errors.py → /kraph-0.3.0/kraph/contrib/fakts/__init__.py +0 -0
- {kraph-0.2.0 → kraph-0.3.0}/kraph/errors.py +0 -0
- {kraph-0.2.0 → kraph-0.3.0}/kraph/links/__init__.py +0 -0
- {kraph-0.2.0 → kraph-0.3.0}/kraph/vars.py +0 -0
- {kraph-0.2.0 → kraph-0.3.0}/kraph/widgets.py +0 -0
kraph-0.3.0/.gitignore
ADDED
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
**/__pycache__
|
|
4
|
+
*.py[cod]
|
|
5
|
+
*$py.class
|
|
6
|
+
*.pyc
|
|
7
|
+
|
|
8
|
+
# C extensions
|
|
9
|
+
*.so
|
|
10
|
+
|
|
11
|
+
# Distribution / packaging
|
|
12
|
+
.Python
|
|
13
|
+
build/
|
|
14
|
+
develop-eggs/
|
|
15
|
+
dist/
|
|
16
|
+
downloads/
|
|
17
|
+
eggs/
|
|
18
|
+
.eggs/
|
|
19
|
+
lib/
|
|
20
|
+
lib64/
|
|
21
|
+
parts/
|
|
22
|
+
sdist/
|
|
23
|
+
var/
|
|
24
|
+
wheels/
|
|
25
|
+
pip-wheel-metadata/
|
|
26
|
+
share/python-wheels/
|
|
27
|
+
*.egg-info/
|
|
28
|
+
.installed.cfg
|
|
29
|
+
*.egg
|
|
30
|
+
MANIFEST
|
|
31
|
+
|
|
32
|
+
# PyInstaller
|
|
33
|
+
# Usually these files are written by a python script from a template
|
|
34
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
35
|
+
*.manifest
|
|
36
|
+
*.spec
|
|
37
|
+
|
|
38
|
+
# Installer logs
|
|
39
|
+
pip-log.txt
|
|
40
|
+
pip-delete-this-directory.txt
|
|
41
|
+
|
|
42
|
+
# Unit test / coverage reports
|
|
43
|
+
htmlcov/
|
|
44
|
+
.tox/
|
|
45
|
+
.nox/
|
|
46
|
+
.coverage
|
|
47
|
+
.coverage.*
|
|
48
|
+
.cache
|
|
49
|
+
nosetests.xml
|
|
50
|
+
coverage.xml
|
|
51
|
+
*.cover
|
|
52
|
+
*.py,cover
|
|
53
|
+
.hypothesis/
|
|
54
|
+
.pytest_cache/
|
|
55
|
+
cover/
|
|
56
|
+
|
|
57
|
+
# Translations
|
|
58
|
+
*.mo
|
|
59
|
+
*.pot
|
|
60
|
+
|
|
61
|
+
# Django stuff:
|
|
62
|
+
*.log
|
|
63
|
+
local_settings.py
|
|
64
|
+
db.sqlite3
|
|
65
|
+
db.sqlite3-journal
|
|
66
|
+
|
|
67
|
+
# Flask stuff:
|
|
68
|
+
instance/
|
|
69
|
+
.webassets-cache
|
|
70
|
+
|
|
71
|
+
# Scrapy stuff:
|
|
72
|
+
.scrapy
|
|
73
|
+
|
|
74
|
+
# Sphinx documentation
|
|
75
|
+
docs/_build/
|
|
76
|
+
|
|
77
|
+
# PyBuilder
|
|
78
|
+
.pybuilder/
|
|
79
|
+
target/
|
|
80
|
+
|
|
81
|
+
# Jupyter Notebook
|
|
82
|
+
.ipynb_checkpoints
|
|
83
|
+
|
|
84
|
+
# IPython
|
|
85
|
+
profile_default/
|
|
86
|
+
ipython_config.py
|
|
87
|
+
|
|
88
|
+
# pyenv
|
|
89
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
90
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
91
|
+
# .python-version
|
|
92
|
+
|
|
93
|
+
# pipenv
|
|
94
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
95
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
96
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
97
|
+
# install all needed dependencies.
|
|
98
|
+
#Pipfile.lock
|
|
99
|
+
|
|
100
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
|
|
101
|
+
__pypackages__/
|
|
102
|
+
|
|
103
|
+
# Celery stuff
|
|
104
|
+
celerybeat-schedule
|
|
105
|
+
celerybeat.pid
|
|
106
|
+
|
|
107
|
+
# SageMath parsed files
|
|
108
|
+
*.sage.py
|
|
109
|
+
|
|
110
|
+
# Environments
|
|
111
|
+
.env
|
|
112
|
+
.venv
|
|
113
|
+
env/
|
|
114
|
+
venv/
|
|
115
|
+
ENV/
|
|
116
|
+
env.bak/
|
|
117
|
+
venv.bak/
|
|
118
|
+
|
|
119
|
+
# Spyder project settings
|
|
120
|
+
.spyderproject
|
|
121
|
+
.spyproject
|
|
122
|
+
|
|
123
|
+
# Rope project settings
|
|
124
|
+
.ropeproject
|
|
125
|
+
|
|
126
|
+
# mkdocs documentation
|
|
127
|
+
/site
|
|
128
|
+
|
|
129
|
+
# mypy
|
|
130
|
+
.mypy_cache/
|
|
131
|
+
.dmypy.json
|
|
132
|
+
dmypy.json
|
|
133
|
+
|
|
134
|
+
# Pyre type checker
|
|
135
|
+
.pyre/
|
|
136
|
+
|
|
137
|
+
# pytype static type analyzer
|
|
138
|
+
.pytype/
|
|
139
|
+
|
|
140
|
+
# Cython debug symbols
|
|
141
|
+
cython_debug/
|
|
142
|
+
|
|
143
|
+
# static files generated from Django application using `collectstatic`
|
|
144
|
+
media
|
|
145
|
+
export
|
|
146
|
+
static_collected
|
|
147
|
+
data
|
kraph-0.3.0/PKG-INFO
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: kraph
|
|
3
|
+
Version: 0.3.0
|
|
4
|
+
Summary: the arkitekt knowledge graph
|
|
5
|
+
Author-email: jhnnsrs <jhnnsrs@gmail.com>
|
|
6
|
+
License-Expression: GPL-3.0-or-later
|
|
7
|
+
Requires-Python: <4.0,>=3.11
|
|
8
|
+
Requires-Dist: dokker>=2.3
|
|
9
|
+
Requires-Dist: rath>=3.5
|
|
10
|
+
Requires-Dist: websockets>=15.0.1
|
|
11
|
+
Description-Content-Type: text/markdown
|
|
12
|
+
|
|
13
|
+
# kraph
|
|
14
|
+
|
|
15
|
+
Kraph is a Python library for creating and manipulating knowledge graphs build around apache AGE.
|
|
16
|
+
|
|
17
|
+
## Features
|
|
18
|
+
|
|
19
|
+
- Create and manipulate knowledge graphs
|
|
20
|
+
- Query knowledge graphs using Cypher
|
|
21
|
+
- Ontology support (custom entities and relationships)
|
|
22
|
+
- GraphQL API for adding and querying data
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
## Installation
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
pip install kraph
|
|
29
|
+
```
|
kraph-0.3.0/README.md
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# kraph
|
|
2
|
+
|
|
3
|
+
Kraph is a Python library for creating and manipulating knowledge graphs build around apache AGE.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- Create and manipulate knowledge graphs
|
|
8
|
+
- Query knowledge graphs using Cypher
|
|
9
|
+
- Ontology support (custom entities and relationships)
|
|
10
|
+
- GraphQL API for adding and querying data
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
## Installation
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
pip install kraph
|
|
17
|
+
```
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
from .kraph import Kraph
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
try:
|
|
5
|
+
from .arkitekt import KraphService
|
|
6
|
+
except ImportError as e:
|
|
7
|
+
try:
|
|
8
|
+
import arkitekt_next
|
|
9
|
+
except ImportError:
|
|
10
|
+
pass
|
|
11
|
+
else:
|
|
12
|
+
raise e
|
|
13
|
+
try:
|
|
14
|
+
from .rekuest import structure_reg
|
|
15
|
+
except ImportError as e:
|
|
16
|
+
try:
|
|
17
|
+
import rekuest_next
|
|
18
|
+
except ImportError:
|
|
19
|
+
pass
|
|
20
|
+
else:
|
|
21
|
+
raise e
|
|
22
|
+
|
|
23
|
+
__all__ = ["Kraph", "structure_reg", "KraphService"]
|
|
@@ -84,6 +84,12 @@
|
|
|
84
84
|
"Graph": [
|
|
85
85
|
"kraph.traits.GraphTrait"
|
|
86
86
|
],
|
|
87
|
+
"Node": [
|
|
88
|
+
"kraph.traits.NodeTrait"
|
|
89
|
+
],
|
|
90
|
+
"NodeCategory": [
|
|
91
|
+
"kraph.traits.NodeCategoryTrait"
|
|
92
|
+
],
|
|
87
93
|
"StructureCategory": [
|
|
88
94
|
"kraph.traits.StructureCategoryTrait"
|
|
89
95
|
],
|
|
@@ -108,6 +114,9 @@
|
|
|
108
114
|
"RelationCategory": [
|
|
109
115
|
"kraph.traits.RelationCategoryTrait"
|
|
110
116
|
],
|
|
117
|
+
"StructureRelationCategory": [
|
|
118
|
+
"kraph.traits.StructureRelationCategoryTrait"
|
|
119
|
+
],
|
|
111
120
|
"EntityRoleDefinitionInput": [
|
|
112
121
|
"kraph.traits.EntityRoleDefinitionInputTrait"
|
|
113
122
|
],
|
|
@@ -132,6 +141,9 @@
|
|
|
132
141
|
"RelationCategoryInput": [
|
|
133
142
|
"kraph.traits.RelationCategoryInputTrait"
|
|
134
143
|
],
|
|
144
|
+
"StructureRelationCategoryInput": [
|
|
145
|
+
"kraph.traits.StructureRelationCategoryInputTrait"
|
|
146
|
+
],
|
|
135
147
|
"MeasurementCategoryInput": [
|
|
136
148
|
"kraph.traits.MeasurementCategoryInputTrait"
|
|
137
149
|
],
|
|
@@ -157,6 +169,11 @@
|
|
|
157
169
|
},
|
|
158
170
|
{
|
|
159
171
|
"type": "turms.plugins.funcs.FuncsPlugin",
|
|
172
|
+
"coercible_scalars": {
|
|
173
|
+
"ID": "rath.scalars.IDCoercible",
|
|
174
|
+
"Cypher": "kraph.scalars.CypherCoercible",
|
|
175
|
+
"StructureIdentifier": "kraph.scalars.StructureIdentifierCoercible"
|
|
176
|
+
},
|
|
160
177
|
"expand_input_types": [
|
|
161
178
|
"input"
|
|
162
179
|
],
|
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
"""Make string uppercase"""
|
|
2
|
-
directive @upper on FIELD
|
|
3
|
-
|
|
4
|
-
directive @replace(old: String!, new: String!) on FIELD
|
|
5
|
-
|
|
6
|
-
"""Make get stuff uppercase"""
|
|
7
|
-
directive @relation(on: String!) on FIELD
|
|
8
|
-
|
|
9
1
|
"""
|
|
10
2
|
A Entity is a recorded data point in a graph. It can measure a property of an entity through a direct measurement edge, that connects the entity to the structure. It of course can relate to other structures through relation edges.
|
|
11
3
|
"""
|
|
@@ -108,6 +100,9 @@ type Graph {
|
|
|
108
100
|
|
|
109
101
|
"""The list of relation expressions defined in this ontology"""
|
|
110
102
|
relationCategories(filters: RelationCategoryFilter, pagination: OffsetPaginationInput): [RelationCategory!]!
|
|
103
|
+
|
|
104
|
+
"""The list of structure relation expressions defined in this ontology"""
|
|
105
|
+
structureRelationCategories(filters: StructureRelationCategoryFilter, pagination: OffsetPaginationInput): [StructureRelationCategory!]!
|
|
111
106
|
nodeCategories(filters: NodeCategoryFilter, pagination: OffsetPaginationInput): [NodeCategory!]!
|
|
112
107
|
edgeCategories(filters: EdgeCategoryFilter, pagination: OffsetPaginationInput): [EdgeCategory!]!
|
|
113
108
|
latestNodes(filters: EntityFilter = null, pagination: GraphPaginationInput = null): [Node!]!
|
|
@@ -123,11 +118,13 @@ input NodeQueryFilter {
|
|
|
123
118
|
id: ID
|
|
124
119
|
AND: NodeQueryFilter
|
|
125
120
|
OR: NodeQueryFilter
|
|
121
|
+
NOT: NodeQueryFilter
|
|
122
|
+
DISTINCT: Boolean
|
|
126
123
|
}
|
|
127
124
|
|
|
128
125
|
input OffsetPaginationInput {
|
|
129
126
|
offset: Int! = 0
|
|
130
|
-
limit: Int
|
|
127
|
+
limit: Int
|
|
131
128
|
}
|
|
132
129
|
|
|
133
130
|
"""A view of a graph, that contains entities and relations."""
|
|
@@ -172,6 +169,8 @@ input ScatterPlotFilter {
|
|
|
172
169
|
id: ID
|
|
173
170
|
AND: ScatterPlotFilter
|
|
174
171
|
OR: ScatterPlotFilter
|
|
172
|
+
NOT: ScatterPlotFilter
|
|
173
|
+
DISTINCT: Boolean
|
|
175
174
|
}
|
|
176
175
|
|
|
177
176
|
union PathPairsTable = Path | Pairs | Table
|
|
@@ -193,10 +192,10 @@ type Pairs {
|
|
|
193
192
|
"""A paired structure two entities and the relation between them."""
|
|
194
193
|
type Pair {
|
|
195
194
|
"""The left entity."""
|
|
196
|
-
|
|
195
|
+
source: Node!
|
|
197
196
|
|
|
198
197
|
"""The right entity."""
|
|
199
|
-
|
|
198
|
+
target: Node!
|
|
200
199
|
|
|
201
200
|
"""The relation between the two entities."""
|
|
202
201
|
edge: Edge!
|
|
@@ -259,6 +258,8 @@ input GraphQueryFilter {
|
|
|
259
258
|
id: ID
|
|
260
259
|
AND: GraphQueryFilter
|
|
261
260
|
OR: GraphQueryFilter
|
|
261
|
+
NOT: GraphQueryFilter
|
|
262
|
+
DISTINCT: Boolean
|
|
262
263
|
}
|
|
263
264
|
|
|
264
265
|
type MetricCategory implements NodeCategory & BaseCategory {
|
|
@@ -417,6 +418,8 @@ input TagFilter {
|
|
|
417
418
|
values: [String!] = null
|
|
418
419
|
AND: TagFilter
|
|
419
420
|
OR: TagFilter
|
|
421
|
+
NOT: TagFilter
|
|
422
|
+
DISTINCT: Boolean
|
|
420
423
|
}
|
|
421
424
|
|
|
422
425
|
type StructureCategoryDefinition implements CategoryDefintion {
|
|
@@ -495,6 +498,8 @@ input MetricCategoryFilter {
|
|
|
495
498
|
pinned: Boolean
|
|
496
499
|
AND: MetricCategoryFilter
|
|
497
500
|
OR: MetricCategoryFilter
|
|
501
|
+
NOT: MetricCategoryFilter
|
|
502
|
+
DISTINCT: Boolean
|
|
498
503
|
}
|
|
499
504
|
|
|
500
505
|
input StructureCategoryFilter {
|
|
@@ -506,6 +511,8 @@ input StructureCategoryFilter {
|
|
|
506
511
|
pinned: Boolean
|
|
507
512
|
AND: StructureCategoryFilter
|
|
508
513
|
OR: StructureCategoryFilter
|
|
514
|
+
NOT: StructureCategoryFilter
|
|
515
|
+
DISTINCT: Boolean
|
|
509
516
|
}
|
|
510
517
|
|
|
511
518
|
type ProtocolEventCategory implements NodeCategory & BaseCategory {
|
|
@@ -761,6 +768,8 @@ input ProtocolEventCategoryFilter {
|
|
|
761
768
|
pinned: Boolean
|
|
762
769
|
AND: ProtocolEventCategoryFilter
|
|
763
770
|
OR: ProtocolEventCategoryFilter
|
|
771
|
+
NOT: ProtocolEventCategoryFilter
|
|
772
|
+
DISTINCT: Boolean
|
|
764
773
|
}
|
|
765
774
|
|
|
766
775
|
type NaturalEventCategory implements NodeCategory & BaseCategory {
|
|
@@ -833,6 +842,8 @@ input NaturalEventCategoryFilter {
|
|
|
833
842
|
pinned: Boolean
|
|
834
843
|
AND: NaturalEventCategoryFilter
|
|
835
844
|
OR: NaturalEventCategoryFilter
|
|
845
|
+
NOT: NaturalEventCategoryFilter
|
|
846
|
+
DISTINCT: Boolean
|
|
836
847
|
}
|
|
837
848
|
|
|
838
849
|
input EntityCategoryFilter {
|
|
@@ -845,6 +856,8 @@ input EntityCategoryFilter {
|
|
|
845
856
|
tags: [String!]
|
|
846
857
|
AND: EntityCategoryFilter
|
|
847
858
|
OR: EntityCategoryFilter
|
|
859
|
+
NOT: EntityCategoryFilter
|
|
860
|
+
DISTINCT: Boolean
|
|
848
861
|
}
|
|
849
862
|
|
|
850
863
|
input ReagentCategoryFilter {
|
|
@@ -856,6 +869,8 @@ input ReagentCategoryFilter {
|
|
|
856
869
|
pinned: Boolean
|
|
857
870
|
AND: ReagentCategoryFilter
|
|
858
871
|
OR: ReagentCategoryFilter
|
|
872
|
+
NOT: ReagentCategoryFilter
|
|
873
|
+
DISTINCT: Boolean
|
|
859
874
|
}
|
|
860
875
|
|
|
861
876
|
type MeasurementCategory implements EdgeCategory & BaseCategory {
|
|
@@ -913,6 +928,8 @@ input MeasurementCategoryFilter {
|
|
|
913
928
|
graph: ID
|
|
914
929
|
AND: MeasurementCategoryFilter
|
|
915
930
|
OR: MeasurementCategoryFilter
|
|
931
|
+
NOT: MeasurementCategoryFilter
|
|
932
|
+
DISTINCT: Boolean
|
|
916
933
|
}
|
|
917
934
|
|
|
918
935
|
type RelationCategory implements EdgeCategory & BaseCategory {
|
|
@@ -967,6 +984,66 @@ input RelationCategoryFilter {
|
|
|
967
984
|
pinned: Boolean
|
|
968
985
|
AND: RelationCategoryFilter
|
|
969
986
|
OR: RelationCategoryFilter
|
|
987
|
+
NOT: RelationCategoryFilter
|
|
988
|
+
DISTINCT: Boolean
|
|
989
|
+
}
|
|
990
|
+
|
|
991
|
+
type StructureRelationCategory implements EdgeCategory & BaseCategory {
|
|
992
|
+
"""The unique identifier of the expression within its graph"""
|
|
993
|
+
id: ID!
|
|
994
|
+
|
|
995
|
+
"""The ontology the expression belongs to."""
|
|
996
|
+
graph: Graph!
|
|
997
|
+
|
|
998
|
+
"""A description of the expression."""
|
|
999
|
+
description: String
|
|
1000
|
+
|
|
1001
|
+
"""
|
|
1002
|
+
An image or other media file that can be used to represent the expression.
|
|
1003
|
+
"""
|
|
1004
|
+
store: MediaStore
|
|
1005
|
+
|
|
1006
|
+
"""The unique identifier of the expression within its graph"""
|
|
1007
|
+
ageName: String!
|
|
1008
|
+
color: [Float!]
|
|
1009
|
+
|
|
1010
|
+
"""The kind of expression"""
|
|
1011
|
+
kind: ExpressionKind!
|
|
1012
|
+
|
|
1013
|
+
"""The tags that are associated with the expression"""
|
|
1014
|
+
tags(filters: TagFilter, pagination: OffsetPaginationInput): [Tag!]!
|
|
1015
|
+
|
|
1016
|
+
"""The unique identifier of the expression within its graph"""
|
|
1017
|
+
purl: String
|
|
1018
|
+
|
|
1019
|
+
"""The sequence of the expression within its graph"""
|
|
1020
|
+
sequence: GraphSequence
|
|
1021
|
+
relevantQueries: [GraphQuery!]!
|
|
1022
|
+
relevantNodeQueries: [NodeQuery!]!
|
|
1023
|
+
bestQuery: GraphQuery
|
|
1024
|
+
pinned: Boolean!
|
|
1025
|
+
|
|
1026
|
+
"""The label of the expression"""
|
|
1027
|
+
label: String!
|
|
1028
|
+
|
|
1029
|
+
"""The unique identifier of the expression within its graph"""
|
|
1030
|
+
sourceDefinition: StructureCategoryDefinition!
|
|
1031
|
+
targetDefinition: StructureCategoryDefinition!
|
|
1032
|
+
}
|
|
1033
|
+
|
|
1034
|
+
input StructureRelationCategoryFilter {
|
|
1035
|
+
ids: [ID!]
|
|
1036
|
+
id: ID
|
|
1037
|
+
search: String
|
|
1038
|
+
graph: ID
|
|
1039
|
+
ontology: ID
|
|
1040
|
+
pinned: Boolean
|
|
1041
|
+
sourceIdentifier: String = null
|
|
1042
|
+
targetIdentifier: String = null
|
|
1043
|
+
AND: StructureRelationCategoryFilter
|
|
1044
|
+
OR: StructureRelationCategoryFilter
|
|
1045
|
+
NOT: StructureRelationCategoryFilter
|
|
1046
|
+
DISTINCT: Boolean
|
|
970
1047
|
}
|
|
971
1048
|
|
|
972
1049
|
input NodeCategoryFilter {
|
|
@@ -1452,6 +1529,9 @@ type Query {
|
|
|
1452
1529
|
"""List of all measurement categories"""
|
|
1453
1530
|
measurementCategories(filters: MeasurementCategoryFilter, pagination: OffsetPaginationInput): [MeasurementCategory!]!
|
|
1454
1531
|
|
|
1532
|
+
"""List of all structure relation categories"""
|
|
1533
|
+
structureRelationCategories(filters: StructureRelationCategoryFilter, pagination: OffsetPaginationInput): [StructureRelationCategory!]!
|
|
1534
|
+
|
|
1455
1535
|
"""List of all scatter plots"""
|
|
1456
1536
|
scatterPlots(filters: ScatterPlotFilter, pagination: OffsetPaginationInput): [ScatterPlot!]!
|
|
1457
1537
|
|
|
@@ -1478,6 +1558,7 @@ type Query {
|
|
|
1478
1558
|
graphSequence(id: ID!): GraphSequence!
|
|
1479
1559
|
entityCategory(id: ID!): EntityCategory!
|
|
1480
1560
|
getEntityByCategoryAndExternalId(category: ID!, externalId: String!): Entity!
|
|
1561
|
+
structureRelationCategory(id: ID!): StructureRelationCategory!
|
|
1481
1562
|
metricCategory(id: ID!): MetricCategory!
|
|
1482
1563
|
structureCategory(id: ID!): StructureCategory!
|
|
1483
1564
|
naturalEventCategory(id: ID!): NaturalEventCategory!
|
|
@@ -1524,6 +1605,8 @@ input GraphFilter {
|
|
|
1524
1605
|
pinned: Boolean = null
|
|
1525
1606
|
AND: GraphFilter
|
|
1526
1607
|
OR: GraphFilter
|
|
1608
|
+
NOT: GraphFilter
|
|
1609
|
+
DISTINCT: Boolean
|
|
1527
1610
|
}
|
|
1528
1611
|
|
|
1529
1612
|
input GraphSequenceFilter {
|
|
@@ -1535,6 +1618,8 @@ input GraphSequenceFilter {
|
|
|
1535
1618
|
id: ID
|
|
1536
1619
|
AND: GraphSequenceFilter
|
|
1537
1620
|
OR: GraphSequenceFilter
|
|
1621
|
+
NOT: GraphSequenceFilter
|
|
1622
|
+
DISTINCT: Boolean
|
|
1538
1623
|
}
|
|
1539
1624
|
|
|
1540
1625
|
"""
|
|
@@ -1558,6 +1643,8 @@ input ModelFilter {
|
|
|
1558
1643
|
search: String
|
|
1559
1644
|
AND: ModelFilter
|
|
1560
1645
|
OR: ModelFilter
|
|
1646
|
+
NOT: ModelFilter
|
|
1647
|
+
DISTINCT: Boolean
|
|
1561
1648
|
}
|
|
1562
1649
|
|
|
1563
1650
|
"""Filter for entity relations in the graph"""
|
|
@@ -1813,6 +1900,15 @@ type Mutation {
|
|
|
1813
1900
|
"""Delete an existing expression"""
|
|
1814
1901
|
deleteRelationCategory(input: DeleteRelationCategoryInput!): ID!
|
|
1815
1902
|
|
|
1903
|
+
"""Create a new expression"""
|
|
1904
|
+
createStructureRelationCategory(input: StructureRelationCategoryInput!): StructureRelationCategory!
|
|
1905
|
+
|
|
1906
|
+
"""Update an existing expression"""
|
|
1907
|
+
updateStructureRelationCategory(input: UpdateStructureRelationCategoryInput!): StructureRelationCategory!
|
|
1908
|
+
|
|
1909
|
+
"""Delete an existing expression"""
|
|
1910
|
+
deleteStructureRelationCategory(input: DeleteStructureRelationCategoryInput!): ID!
|
|
1911
|
+
|
|
1816
1912
|
"""Create a new expression"""
|
|
1817
1913
|
createEntityCategory(input: EntityCategoryInput!): EntityCategory!
|
|
1818
1914
|
|
|
@@ -1873,6 +1969,9 @@ type Mutation {
|
|
|
1873
1969
|
"""Create a new relation between entities"""
|
|
1874
1970
|
createRelation(input: RelationInput!): Relation!
|
|
1875
1971
|
|
|
1972
|
+
"""Create a new relation between entities"""
|
|
1973
|
+
createStructureRelation(input: StructureRelationInput!): StructureRelation!
|
|
1974
|
+
|
|
1876
1975
|
"""Create a new metric for an entity"""
|
|
1877
1976
|
createMetric(input: MetricInput!): Metric!
|
|
1878
1977
|
|
|
@@ -2314,6 +2413,99 @@ input DeleteRelationCategoryInput {
|
|
|
2314
2413
|
id: ID!
|
|
2315
2414
|
}
|
|
2316
2415
|
|
|
2416
|
+
"""Input for creating a new expression"""
|
|
2417
|
+
input StructureRelationCategoryInput {
|
|
2418
|
+
"""
|
|
2419
|
+
The ID of the graph this expression belongs to. If not provided, uses default ontology
|
|
2420
|
+
"""
|
|
2421
|
+
graph: ID!
|
|
2422
|
+
|
|
2423
|
+
"""A detailed description of the expression"""
|
|
2424
|
+
description: String = null
|
|
2425
|
+
|
|
2426
|
+
"""Permanent URL identifier for the expression"""
|
|
2427
|
+
purl: String = null
|
|
2428
|
+
|
|
2429
|
+
"""RGBA color values as list of 3 or 4 integers"""
|
|
2430
|
+
color: [Int!] = null
|
|
2431
|
+
|
|
2432
|
+
"""An optional image associated with this expression"""
|
|
2433
|
+
image: ID = null
|
|
2434
|
+
|
|
2435
|
+
"""A list of tags associated with this expression"""
|
|
2436
|
+
tags: [String!] = null
|
|
2437
|
+
|
|
2438
|
+
"""Whether this expression should be pinned or not"""
|
|
2439
|
+
pin: Boolean = null
|
|
2440
|
+
|
|
2441
|
+
"""The ID of the sequence this category will get internal_ids from"""
|
|
2442
|
+
sequence: ID = null
|
|
2443
|
+
|
|
2444
|
+
"""Whether to create a sequence if it does not exist"""
|
|
2445
|
+
autoCreateSequence: Boolean = false
|
|
2446
|
+
|
|
2447
|
+
"""The label/name of the expression"""
|
|
2448
|
+
label: String!
|
|
2449
|
+
|
|
2450
|
+
"""The source definition for this expression"""
|
|
2451
|
+
sourceDefinition: StructureCategoryDefinitionInput!
|
|
2452
|
+
|
|
2453
|
+
"""The target definition for this expression"""
|
|
2454
|
+
targetDefinition: StructureCategoryDefinitionInput!
|
|
2455
|
+
}
|
|
2456
|
+
|
|
2457
|
+
"""Input for creating a new expression"""
|
|
2458
|
+
input StructureCategoryDefinitionInput {
|
|
2459
|
+
"""A list of classes to filter the entities"""
|
|
2460
|
+
categoryFilters: [ID!] = null
|
|
2461
|
+
|
|
2462
|
+
"""A list of StructureIdentifier to filter the entities"""
|
|
2463
|
+
identifierFilters: [StructureIdentifier!] = null
|
|
2464
|
+
|
|
2465
|
+
"""A list of tags to filter the entities by"""
|
|
2466
|
+
tagFilters: [String!] = null
|
|
2467
|
+
|
|
2468
|
+
"""
|
|
2469
|
+
The default ACTIVE reagent to use for this port if a reagent is not provided
|
|
2470
|
+
"""
|
|
2471
|
+
defaultUseActive: ID = null
|
|
2472
|
+
|
|
2473
|
+
"""
|
|
2474
|
+
The default creation of entity or reagent to use for this port if a reagent is not provided
|
|
2475
|
+
"""
|
|
2476
|
+
defaultUseNew: ID = null
|
|
2477
|
+
}
|
|
2478
|
+
|
|
2479
|
+
"""Input for updating an existing expression"""
|
|
2480
|
+
input UpdateStructureRelationCategoryInput {
|
|
2481
|
+
"""A detailed description of the expression"""
|
|
2482
|
+
description: String = null
|
|
2483
|
+
|
|
2484
|
+
"""Permanent URL identifier for the expression"""
|
|
2485
|
+
purl: String = null
|
|
2486
|
+
|
|
2487
|
+
"""RGBA color values as list of 3 or 4 integers"""
|
|
2488
|
+
color: [Int!] = null
|
|
2489
|
+
|
|
2490
|
+
"""An optional image associated with this expression"""
|
|
2491
|
+
image: ID = null
|
|
2492
|
+
|
|
2493
|
+
"""A list of tags associated with this expression"""
|
|
2494
|
+
tags: [String!] = null
|
|
2495
|
+
|
|
2496
|
+
"""Whether this expression should be pinned or not"""
|
|
2497
|
+
pin: Boolean = null
|
|
2498
|
+
|
|
2499
|
+
"""New label for the expression"""
|
|
2500
|
+
label: String = null
|
|
2501
|
+
}
|
|
2502
|
+
|
|
2503
|
+
"""Input for deleting an expression"""
|
|
2504
|
+
input DeleteStructureRelationCategoryInput {
|
|
2505
|
+
"""The ID of the expression to delete"""
|
|
2506
|
+
id: ID!
|
|
2507
|
+
}
|
|
2508
|
+
|
|
2317
2509
|
"""Input for creating a new expression"""
|
|
2318
2510
|
input EntityCategoryInput {
|
|
2319
2511
|
"""
|
|
@@ -2976,6 +3168,42 @@ input RelationInput {
|
|
|
2976
3168
|
context: ContextInput = null
|
|
2977
3169
|
}
|
|
2978
3170
|
|
|
3171
|
+
"A relation is an edge between two entities. It is a directed edge, that connects two entities and established a relationship\n that is not a measurement between them. I.e. when they are an subjective assertion about the entities.\n \n \n \n "
|
|
3172
|
+
type StructureRelation implements Edge {
|
|
3173
|
+
"""The unique identifier of the entity within its graph"""
|
|
3174
|
+
id: NodeID!
|
|
3175
|
+
label: String!
|
|
3176
|
+
leftId: String!
|
|
3177
|
+
rightId: String!
|
|
3178
|
+
right: Node!
|
|
3179
|
+
left: Node!
|
|
3180
|
+
|
|
3181
|
+
"""Timestamp from when this entity is valid"""
|
|
3182
|
+
validFrom: DateTime!
|
|
3183
|
+
|
|
3184
|
+
"""Timestamp until when this entity is valid"""
|
|
3185
|
+
validTo: DateTime!
|
|
3186
|
+
|
|
3187
|
+
"""When this entity was created"""
|
|
3188
|
+
createdAt: DateTime!
|
|
3189
|
+
category: StructureRelationCategory!
|
|
3190
|
+
}
|
|
3191
|
+
|
|
3192
|
+
"""Input type for creating a relation between two entities"""
|
|
3193
|
+
input StructureRelationInput {
|
|
3194
|
+
"""ID of the left entity (format: graph:id)"""
|
|
3195
|
+
source: ID!
|
|
3196
|
+
|
|
3197
|
+
"""ID of the right entity (format: graph:id)"""
|
|
3198
|
+
target: ID!
|
|
3199
|
+
|
|
3200
|
+
"""ID of the relation category (LinkedExpression)"""
|
|
3201
|
+
category: ID!
|
|
3202
|
+
|
|
3203
|
+
"""The context of the measurement"""
|
|
3204
|
+
context: ContextInput = null
|
|
3205
|
+
}
|
|
3206
|
+
|
|
2979
3207
|
input MetricInput {
|
|
2980
3208
|
structure: NodeID!
|
|
2981
3209
|
category: ID!
|