/
constants.py
304 lines (285 loc) · 12.9 KB
/
constants.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
import rdflib
# All SBOL objects will be created in the default namespace,
# unless otherwise specified
DEFAULT_NS = "http://examples.org/"
# The URIs defined here determine the appearance of serialized RDF/XML nodes.
# Change these URIs to change the appearance of an SBOL class or property name
SBOL_URI = "http://sbols.org/v2" # < Namespace for the SBOL standard.
RDF_URI = "http://www.w3.org/1999/02/22-rdf-syntax-ns#"
PURL_URI = "http://purl.org/dc/terms/"
PROV_URI = "http://www.w3.org/ns/prov"
PROVO = "http://www.w3.org/ns/prov"
SYSBIO_URI = "http://sys-bio.org"
# PROVO = "https://www.w3.org/TR/prov-o/"
OM_URI = 'http://www.ontology-of-units-of-measure.org/resource/om-2/'
# A private namespace for pySBOL2 URIs
PYSBOL2_NS = rdflib.Namespace('https://github.com/SynBioDex/pySBOL2')
# rdf nodes used in SBOL
NODENAME_ABOUT = "rdf:about"
NODENAME_RESOURCE = "rdf:resource"
VERSION_STRING = "1"
# URIs for SBOL objects
SBOL_DOCUMENT = SBOL_URI + "#Document"
SBOL_IDENTIFIED = SBOL_URI + "#Identified"
SBOL_DOCUMENTED = SBOL_URI + "#Documented"
SBOL_TOP_LEVEL = SBOL_URI + "#TopLevel"
SBOL_GENERIC_TOP_LEVEL = SBOL_URI + "#GenericTopLevel"
SBOL_SEQUENCE_ANNOTATION = SBOL_URI + "#SequenceAnnotation"
SBOL_COMPONENT = SBOL_URI + "#Component"
SBOL_FUNCTIONAL_COMPONENT = SBOL_URI + "#FunctionalComponent"
SBOL_COMPONENT_DEFINITION = SBOL_URI + "#ComponentDefinition"
SBOL_SEQUENCE = SBOL_URI + "#Sequence"
SBOL_MODULE_DEFINITION = SBOL_URI + "#ModuleDefinition"
SBOL_MODULE = SBOL_URI + "#Module"
SBOL_MODEL = SBOL_URI + "#Model"
SBOL_MAPS_TO = SBOL_URI + "#MapsTo"
SBOL_INTERACTION = SBOL_URI + "#Interaction"
SBOL_PARTICIPATION = SBOL_URI + "#Participation"
SBOL_SEQUENCE_CONSTRAINT = SBOL_URI + "#SequenceConstraint"
SBOL_LOCATION = SBOL_URI + "#Location"
SBOL_RANGE = SBOL_URI + "#Range"
SBOL_CUT = SBOL_URI + "#Cut"
SBOL_COLLECTION = SBOL_URI + "#Collection"
SBOL_GENERIC_LOCATION = SBOL_URI + "#GenericLocation"
SBOL_VARIABLE_COMPONENT = SBOL_URI + "#VariableComponent"
SBOL_COMBINATORIAL_DERIVATION = SBOL_URI + "#CombinatorialDerivation"
SBOL_ATTACHMENT = SBOL_URI + "#Attachment"
SBOL_IMPLEMENTATION = SBOL_URI + "#Implementation"
SBOL_EXPERIMENT = SBOL_URI + "#Experiment"
SBOL_EXPERIMENTAL_DATA = SBOL_URI + "#ExperimentalData"
UNDEFINED = SBOL_URI + "#Undefined"
# URIs for SBOL Properties
SBOL_IDENTITY = SBOL_URI + "#identity"
SBOL_PERSISTENT_IDENTITY = SBOL_URI + "#persistentIdentity"
SBOL_VERSION = SBOL_URI + "#version"
SBOL_DISPLAY_ID = SBOL_URI + "#displayId"
SBOL_NAME = PURL_URI + "title"
SBOL_DESCRIPTION = PURL_URI + "description"
SBOL_TYPES = SBOL_URI + "#type"
SBOL_START = SBOL_URI + "#start"
SBOL_END = SBOL_URI + "#end"
SBOL_SEQUENCE_ANNOTATIONS = SBOL_URI + "#sequenceAnnotation"
SBOL_COMPONENTS = SBOL_URI + "#component"
SBOL_COMPONENT_PROPERTY = SBOL_URI + "#component"
SBOL_ROLES = SBOL_URI + "#role"
SBOL_ELEMENTS = SBOL_URI + "#elements"
SBOL_ENCODING = SBOL_URI + "#encoding"
SBOL_SEQUENCE_PROPERTY = SBOL_URI + "#sequence"
SBOL_WAS_DERIVED_FROM = PROV_URI + "#wasDerivedFrom"
SBOL_DEFINITION = SBOL_URI + "#definition"
SBOL_ACCESS = SBOL_URI + "#access"
SBOL_DIRECTION = SBOL_URI + "#direction"
SBOL_MODELS = SBOL_URI + "#model"
SBOL_MODULES = SBOL_URI + "#module"
SBOL_FUNCTIONAL_COMPONENTS = SBOL_URI + "#functionalComponent"
SBOL_INTERACTIONS = SBOL_URI + "#interaction"
SBOL_MAPS_TOS = SBOL_URI + "#mapsTo"
SBOL_PARTICIPATIONS = SBOL_URI + "#participation"
SBOL_PARTICIPANT = SBOL_URI + "#participant"
SBOL_LOCAL = SBOL_URI + "#local"
SBOL_REMOTE = SBOL_URI + "#remote"
SBOL_REFINEMENT = SBOL_URI + "#refinement"
SBOL_SOURCE = SBOL_URI + "#source"
SBOL_LANGUAGE = SBOL_URI + "#language"
SBOL_FRAMEWORK = SBOL_URI + "#framework"
SBOL_SEQUENCE_CONSTRAINTS = SBOL_URI + "#sequenceConstraint"
SBOL_SUBJECT = SBOL_URI + "#subject"
SBOL_OBJECT = SBOL_URI + "#object"
SBOL_RESTRICTION = SBOL_URI + "#restriction"
SBOL_ORIENTATION = SBOL_URI + "#orientation"
SBOL_LOCATIONS = SBOL_URI + "#location"
SBOL_SOURCE_LOCATIONS = SBOL_URI + "#sourceLocation"
SBOL_ROLE_INTEGRATION = SBOL_URI + "#roleIntegration"
SBOL_MEMBERS = SBOL_URI + "#member"
SBOL_AT = SBOL_URI + "#at"
SBOL_OPERATOR = SBOL_URI + "#operator"
SBOL_VARIABLE_COMPONENTS = SBOL_URI + "#variableComponent"
SBOL_VARIABLE = SBOL_URI + "#variable"
SBOL_VARIANTS = SBOL_URI + "#variant"
SBOL_VARIANT_COLLECTIONS = SBOL_URI + "#variantCollection"
SBOL_VARIANT_DERIVATIONS = SBOL_URI + "#variantDerivation"
SBOL_STRATEGY = SBOL_URI + "#strategy"
SBOL_TEMPLATE = SBOL_URI + "#template"
SBOL_ATTACHMENTS = SBOL_URI + "#attachment"
SBOL_MEASUREMENTS = SBOL_URI + "#measure"
SBOL_UNIT = SBOL_URI + "#unit"
SBOL_VALUE = SBOL_URI + "#hasNumericalValue"
# SBOL internal ontologies
# Option for Component::access or FunctionalComponent::access property
SBOL_ACCESS_PRIVATE = SBOL_URI + "#private"
# Option for Component::access or FunctionalComponent::access property
SBOL_ACCESS_PUBLIC = SBOL_URI + "#public"
# Option for FunctionalComponent::access property
SBOL_DIRECTION_IN = SBOL_URI + "#in"
# Option for FunctionalComponent::direction property
SBOL_DIRECTION_OUT = SBOL_URI + "#out"
# Option for FunctionalComponent::direction property
SBOL_DIRECTION_IN_OUT = SBOL_URI + "#inout"
# Option for FunctionalComponent::direction property
SBOL_DIRECTION_NONE = SBOL_URI + "#none"
# Option for SequenceConstraint::restriction property
SBOL_RESTRICTION_PRECEDES = SBOL_URI + "#precedes"
# Option for SequenceConstraint::restriction property
SBOL_RESTRICTION_SAME_ORIENTATION_AS = SBOL_URI + "#sameOrientationAs"
# Option for SequenceConstraint::restriction property
SBOL_RESTRICTION_OPPOSITE_ORIENTATION_AS = SBOL_URI + "#oppositeOrientationAs"
# Option for Sequence::encoding property
SBOL_ENCODING_IUPAC = "http://www.chem.qmul.ac.uk/iubmb/misc/naseq.html"
# Option for Sequence::encoding property
SBOL_ENCODING_IUPAC_PROTEIN = "http://www.chem.qmul.ac.uk/iupac/AminoAcid/"
# Option for Sequence::encoding property
SBOL_ENCODING_SMILES = "http://www.opensmiles.org/opensmiles.html"
# Option for Location::orientation property
SBOL_ORIENTATION_INLINE = SBOL_URI + "#inline"
# Option for Location::orientation property
SBOL_ORIENTATION_REVERSE_COMPLEMENT = SBOL_URI + "#reverseComplement"
# Option for FunctionalComponent::refinement property
SBOL_REFINEMENT_USE_REMOTE = SBOL_URI + "#useRemote"
# Option for FunctionalComponent::refinement property
SBOL_REFINEMENT_USE_LOCAL = SBOL_URI + "#useLocal"
# Option for MapsTo::refinement property
SBOL_REFINEMENT_VERIFY_IDENTICAL = SBOL_URI + "#verifyIdentical"
# Option for MapsTo::refinement property
SBOL_REFINEMENT_MERGE = SBOL_URI + "#merge"
# Option for SequenceAnnotation::roleIntegration
# or Component::roleIntegration property
SBOL_ROLE_INTEGRATION_MERGE = SBOL_URI + "#mergeRoles"
# Option for SequenceAnnotation::roleIntegration
# or Component::roleIntegration property
SBOL_ROLE_INTEGRATION_OVERRIDE = SBOL_URI + "#overrideRoles"
# Option for Usage::roles or Association::roles
SBOL_DESIGN = SBOL_URI + "#design"
# Option for Usage::roles or Association::roles
SBOL_BUILD = SBOL_URI + "#build"
# Option for Usage::roles or Association::roles
SBOL_TEST = SBOL_URI + "#test"
# Option for Usage::roles or Association::roles
SBOL_LEARN = SBOL_URI + "#learn"
# PROVO ontology
PROVO_ACTIVITY = PROVO + "#Activity"
PROVO_USAGE = PROVO + "#Usage"
PROVO_ASSOCIATION = PROVO + "#Association"
PROVO_AGENT = PROVO + "#Agent"
PROVO_PLAN = PROVO + "#Plan"
PROVO_WAS_GENERATED_BY = PROVO + "#wasGeneratedBy"
PROVO_STARTED_AT_TIME = PROVO + "#startedAtTime"
PROVO_ENDED_AT_TIME = PROVO + "#endedAtTime"
PROVO_QUALIFIED_ASSOCIATION = PROVO + "#qualifiedAssociation"
PROVO_QUALIFIED_USAGE = PROVO + "#qualifiedUsage"
PROVO_WAS_INFORMED_BY = PROVO + "#wasInformedBy"
PROVO_HAD_PLAN = PROVO + "#hadPlan"
PROVO_HAD_ROLE = PROVO + "#hadRole"
PROVO_AGENT_PROPERTY = PROVO + "#agent"
PROVO_ENTITY = PROVO + "#entity"
# Systems Biology Ontology
# Interaction.types
# Namespace for Systems Biology Ontology (SBO) terms
SBO = "http://identifiers.org/biomodels.sbo/SBO:"
# An SBO term and possible value for an Interaction::type property
SBO_INTERACTION = SBO + "0000343"
# An SBO term and possible value for an Interaction::type property
SBO_INHIBITION = SBO + "0000169"
# An SBO term and possible value for an Interaction::type property
SBO_GENETIC_PRODUCTION = SBO + "0000589"
# An SBO term and possible value for an Interaction::type property
SBO_NONCOVALENT_BINDING = SBO + "0000177"
# An SBO term and possible value for an Interaction::type property
SBO_STIMULATION = SBO + "0000170"
# An SBO term and possible value for an Interaction::type property
SBO_DEGRADATION = SBO + "0000179"
# An SBO term and possible value for an Interaction::type property
SBO_CONTROL = SBO + "0000168"
# An SBO term and possible value for an Interaction::type property
SBO_BIOCHEMICAL_REACTION = SBO + "0000176"
# An SBO term and possible value for an Interaction::type property
SBO_STIMULATED = SBO + "0000643"
# An SBO term and possible value for an Interaction::type property
SBO_CONVERSION = SBO + "0000182"
# Participant.roles
# An SBO term and possible value for an Participant::role property
SBO_PROMOTER = SBO + "0000598"
# An SBO term and possible value for an Participant::role property
SBO_GENE = SBO + "0000243"
# An SBO term and possible value for an Participant::role property
SBO_INHIBITOR = SBO + "0000020"
# An SBO term and possible value for an Participant::role property
SBO_INHIBITED = SBO + "0000642"
# An SBO term and possible value for an Participant::role property
SBO_STIMULATOR = SBO + "0000459"
# An SBO term and possible value for an Participant::role property
SBO_REACTANT = SBO + "0000010"
# An SBO term and possible value for an Participant::role property
SBO_PRODUCT = SBO + "0000011"
# An SBO term and possible value for an Participant::role property
SBO_LIGAND = SBO + "0000280"
# An SBO term and possible value for an Participant::role property
SBO_NONCOVALENT_COMPLEX = SBO + "0000253"
# An SBO term and possible value for an Participant::role property
SBO_BINDING_SITE = SBO + "0000494"
SBO_SUBSTRATE = SBO + "0000015"
SBO_COFACTOR = SBO + "0000604"
SBO_SIDEPRODUCT = SBO + "0000603"
# SBO_PRODUCT = SBO + "0000011"
SBO_ENZYME = SBO + "0000014"
# URIs for common Sequence Ontology terms
# Namespace for Sequence Ontology (SO) terms
SO = "http://identifiers.org/so/SO:"
# An SO term and possible value for ComponentDefinition::role property
SO_MISC = SO + "0000001"
# An SO term and possible value for ComponentDefinition::role property
SO_GENE = SO + "0000704"
# An SO term and possible value for ComponentDefinition::role property
SO_PROMOTER = SO + "0000167"
# An SO term and possible value for ComponentDefinition::role property
SO_CDS = SO + "0000316"
# An SO term and possible value for ComponentDefinition::role property
SO_RBS = SO + "0000139"
# An SO term and possible value for ComponentDefinition::role property
SO_TERMINATOR = SO + "0000141"
# An SO term and possible value for ComponentDefinition::role property
SO_SGRNA = SO + "0001998"
# An SO term and possible value for ComponentDefinition::role property
SO_LINEAR = SO + "0000987"
# An SO term and possible value for ComponentDefinition::role property
SO_CIRCULAR = SO + "0000988"
# An SO term and possible value for ComponentDefinition::role property
SO_PLASMID = SO + "0000155"
# BioPAX is used to indicate macromolecular and molecular types
# DNA
# A BioPax term and possible value for ComponentDefinition::type property
BIOPAX_DNA = "http://www.biopax.org/release/biopax-level3.owl#DnaRegion"
# RNA
# A BioPax term and possible value for ComponentDefinition::type property
BIOPAX_RNA = "http://www.biopax.org/release/biopax-level3.owl#RnaRegion"
# PROTEIN
# A BioPax term and possible value for ComponentDefinition::type property
BIOPAX_PROTEIN = "http://www.biopax.org/release/biopax-level3.owl#Protein"
# SMALL_MOLECULE
# A BioPax term and possible value for ComponentDefinition::type property
BIOPAX_SMALL_MOLECULE = "http://www.biopax.org/release/biopax-level3.owl#SmallMolecule"
# COMPLEX
# A BioPax term and possible value for ComponentDefinition::type property
BIOPAX_COMPLEX = "http://www.biopax.org/release/biopax-level3.owl#Complex"
# EDAM ontology is used for Model.languages
# An EDAM ontology term and option for Model::language
EDAM_SBML = "http://identifiers.org/edam/format_2585"
# An EDAM ontology term and option for Model::language
EDAM_CELLML = "http://identifiers.org/edam/format_3240"
# An EDAM ontology term and option for Model::language
EDAM_BIOPAX = "http://identifiers.org/edam/format_3156"
# Model.frameworks
# SBO term and option for Model::framework
SBO_CONTINUOUS = SBO + "0000062"
# SBO term and option for Model::framework
SBO_DISCRETE = SBO + "0000063"
# URIs for SBOL extension objects
SYSBIO_DESIGN = SYSBIO_URI + "#Design"
SYSBIO_BUILD = SYSBIO_URI + "#Build"
SYSBIO_TEST = SYSBIO_URI + "#Test"
SYSBIO_ANALYSIS = SYSBIO_URI + "#Analysis"
SYSBIO_SAMPLE_ROSTER = SYSBIO_URI + "#SampleRoster"
IGEM_URI = "http://wiki.synbiohub.org/wiki/Terms/igem"
OM_NS = rdflib.Namespace(OM_URI)
OM_MEASURE: str = OM_NS.Measure.toPython()
OM_HAS_UNIT: str = OM_NS.hasUnit.toPython()
OM_HAS_NUMERICAL_VALUE: str = OM_NS.hasNumericalValue.toPython()