biointerchange 0.1.0 → 0.1.2

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.
Files changed (45) hide show
  1. data/.travis.yml +3 -3
  2. data/Gemfile +2 -1
  3. data/README.md +192 -7
  4. data/Rakefile +1 -1
  5. data/VERSION +1 -1
  6. data/examples/vocabulary.rb +23 -0
  7. data/generators/javaify.rb +131 -0
  8. data/generators/pythonify.rb +67 -0
  9. data/generators/rdfxml.rb +152 -44
  10. data/lib/biointerchange/core.rb +2 -1
  11. data/lib/biointerchange/exceptions.rb +27 -0
  12. data/lib/biointerchange/genomics/gff3_rdf_ntriples.rb +21 -18
  13. data/lib/biointerchange/gff3o.rb +495 -0
  14. data/lib/biointerchange/gvf1o.rb +730 -0
  15. data/lib/biointerchange/registry.rb +2 -2
  16. data/lib/biointerchange/sio.rb +10951 -5845
  17. data/lib/biointerchange/sofa.rb +2171 -1300
  18. data/spec/exceptions_spec.rb +6 -0
  19. data/spec/gff3_rdfwriter_spec.rb +7 -1
  20. data/spec/text_mining_pdfx_xml_reader_spec.rb +6 -0
  21. data/spec/text_mining_pubannos_json_reader_spec.rb +6 -0
  22. data/spec/text_mining_rdfwriter_spec.rb +6 -0
  23. data/supplemental/java/biointerchange/pom.xml +45 -0
  24. data/supplemental/java/biointerchange/src/main/java/org/biointerchange/App.java +58 -0
  25. data/supplemental/java/biointerchange/src/main/java/org/biointerchange/AppSIO.java +49 -0
  26. data/supplemental/java/biointerchange/src/main/java/org/biointerchange/vocabulary/GFF3O.java +647 -0
  27. data/supplemental/java/biointerchange/src/main/java/org/biointerchange/vocabulary/GVF1O.java +946 -0
  28. data/supplemental/java/biointerchange/src/main/java/org/biointerchange/vocabulary/SIO.java +15390 -0
  29. data/supplemental/java/biointerchange/src/main/java/org/biointerchange/vocabulary/SOFA.java +2968 -0
  30. data/supplemental/java/biointerchange/src/test/java/org/biointerchange/AppTest.java +38 -0
  31. data/supplemental/python/biointerchange/__init__.py +4 -0
  32. data/supplemental/python/biointerchange/gff3o.py +581 -0
  33. data/supplemental/python/biointerchange/gvf1o.py +864 -0
  34. data/supplemental/python/biointerchange/sio.py +11772 -0
  35. data/supplemental/python/biointerchange/sofa.py +2422 -0
  36. data/supplemental/python/example.py +19 -0
  37. data/supplemental/python/setup.py +13 -0
  38. data/web/about.html +3 -0
  39. data/web/api.html +219 -0
  40. data/web/index.html +4 -3
  41. data/web/ontologies.html +109 -0
  42. data/web/webservices.html +1 -0
  43. metadata +144 -117
  44. data/docs/exceptions_readme.txt +0 -13
  45. data/lib/biointerchange/gff3.rb +0 -135
@@ -0,0 +1,864 @@
1
+ import rdflib
2
+
3
+ from rdflib import Namespace
4
+
5
+ __namespace_GVF1O = Namespace('http://www.biointerchange.org/gvf1o#')
6
+
7
+ def _namespace_GVF1O(accession):
8
+ return __namespace_GVF1O[accession]
9
+
10
+ class GVF1O:
11
+
12
+ @classmethod
13
+ def strand(cls):
14
+ """Strand of the feature.
15
+ (cls, GVF1_0010)
16
+ """
17
+ return _namespace_GVF1O('GVF1_0010')
18
+
19
+ @classmethod
20
+ def attributes(cls):
21
+ """Tag name/value pair attributes of a feature.
22
+ (cls, GVF1_0012)
23
+ """
24
+ return _namespace_GVF1O('GVF1_0012')
25
+
26
+ @classmethod
27
+ def parent(cls):
28
+ """Link out to the parent feature.
29
+ (cls, GVF1_0014)
30
+ """
31
+ return _namespace_GVF1O('GVF1_0014')
32
+
33
+ @classmethod
34
+ def contains(cls):
35
+ """Relationship that describes which features belong to a feature set.
36
+ (cls, GVF1_0015)
37
+ """
38
+ return _namespace_GVF1O('GVF1_0015')
39
+
40
+ @classmethod
41
+ def region(cls):
42
+ """Either:
43
+ FALDO "Region" instance replacement for a feature's start, stop, strand properties.
44
+ (cls, GVF1_0021)
45
+ Or:
46
+ FALDO "Region" instance replacement for a breakpoint's start, stop, strand properties.
47
+ (GVF1_0079)
48
+ """
49
+ return [ _namespace_GVF1O('GVF1_0021'), _namespace_GVF1O('GVF1_0079') ]
50
+
51
+ @classmethod
52
+ def species(cls):
53
+ """NCBI Taxonomy Ontology "NCBITaxon_1" (cls, or sub-classes) instance that denotes the species for a feature set.
54
+ (GVF1_0023)
55
+ """
56
+ return _namespace_GVF1O('GVF1_0023')
57
+
58
+ @classmethod
59
+ def variant(cls):
60
+ """Specific information about the variant(cls, s) of a feature.
61
+ (GVF1_0034)
62
+ """
63
+ return _namespace_GVF1O('GVF1_0034')
64
+
65
+ @classmethod
66
+ def individual(cls):
67
+ """Links to information about an individual.
68
+ (cls, GVF1_0036)
69
+ """
70
+ return _namespace_GVF1O('GVF1_0036')
71
+
72
+ @classmethod
73
+ def effect(cls):
74
+ """An effect of a particular feature variant.
75
+ (cls, GVF1_0041)
76
+ """
77
+ return _namespace_GVF1O('GVF1_0041')
78
+
79
+ @classmethod
80
+ def sequence_variant(cls):
81
+ """Effect of a sequence alteration on a sequence feature.
82
+ (cls, GVF1_0042)
83
+ """
84
+ return _namespace_GVF1O('GVF1_0042')
85
+
86
+ @classmethod
87
+ def feature_type(cls):
88
+ """A term that is describing the sequence feature that is being affected.
89
+ (cls, GVF1_0043)
90
+ """
91
+ return _namespace_GVF1O('GVF1_0043')
92
+
93
+ @classmethod
94
+ def feature_id(cls):
95
+ """Features that are affected by this sequence alteration effect.
96
+ (cls, GVF1_0044)
97
+ """
98
+ return _namespace_GVF1O('GVF1_0044')
99
+
100
+ @classmethod
101
+ def start_range(cls):
102
+ """A coordinate range for ambiguous start coordinates.
103
+ (cls, GVF1_0046)
104
+ """
105
+ return _namespace_GVF1O('GVF1_0046')
106
+
107
+ @classmethod
108
+ def end_range(cls):
109
+ """A coordinate range for ambiguous start coordinates.
110
+ (cls, GVF1_0047)
111
+ """
112
+ return _namespace_GVF1O('GVF1_0047')
113
+
114
+ @classmethod
115
+ def chromosome(cls):
116
+ """Denotes abstract chromosome representations for capturing variants that appear on the same chromosome of a polyploid organism.
117
+ (cls, GVF1_0051)
118
+ """
119
+ return _namespace_GVF1O('GVF1_0051')
120
+
121
+ @classmethod
122
+ def genotype(cls):
123
+ """Determines the genotype as observed in an individual.
124
+ (cls, GVF1_0053)
125
+ """
126
+ return _namespace_GVF1O('GVF1_0053')
127
+
128
+ @classmethod
129
+ def feature_properties(cls):
130
+ """Either:
131
+ Properties that are directly associated with Feature class instances.
132
+ (cls, GVF1_0066)
133
+ Or:
134
+ Properties that are directly associated with Feature class instances.
135
+ (GVF1_0059)
136
+ """
137
+ return [ _namespace_GVF1O('GVF1_0066'), _namespace_GVF1O('GVF1_0059') ]
138
+
139
+ @classmethod
140
+ def sequencedindividual_properties(cls):
141
+ """Either:
142
+ Properties that are directly associated with SequencedIndividual class instances.
143
+ (cls, GVF1_0067)
144
+ Or:
145
+ Properties that are directly associated with SequencedIndividual class instances.
146
+ (GVF1_0065)
147
+ """
148
+ return [ _namespace_GVF1O('GVF1_0067'), _namespace_GVF1O('GVF1_0065') ]
149
+
150
+ @classmethod
151
+ def set_properties(cls):
152
+ """Either:
153
+ Properties that are directly associated with Set class instances.
154
+ (cls, GVF1_0068)
155
+ Or:
156
+ Properties that are directly associated with Set class instances.
157
+ (GVF1_0063)
158
+ """
159
+ return [ _namespace_GVF1O('GVF1_0068'), _namespace_GVF1O('GVF1_0063') ]
160
+
161
+ @classmethod
162
+ def variant_properties(cls):
163
+ """Either:
164
+ Properties that are directly associated with Variant class instances.
165
+ (cls, GVF1_0069)
166
+ Or:
167
+ Properties that are directly associated with Variant class instances.
168
+ (GVF1_0060)
169
+ """
170
+ return [ _namespace_GVF1O('GVF1_0069'), _namespace_GVF1O('GVF1_0060') ]
171
+
172
+ @classmethod
173
+ def effect_properties(cls):
174
+ """Properties that are directly associated with Effect class instances.
175
+ (cls, GVF1_0070)
176
+ """
177
+ return _namespace_GVF1O('GVF1_0070')
178
+
179
+ @classmethod
180
+ def breakpoint_properties(cls):
181
+ """Either:
182
+ Properties that are directly associated with Breakpoint class instances.
183
+ (cls, GVF1_0075)
184
+ Or:
185
+ Properties that are directly associated with Breakpoint class instances.
186
+ (GVF1_0071)
187
+ """
188
+ return [ _namespace_GVF1O('GVF1_0075'), _namespace_GVF1O('GVF1_0071') ]
189
+
190
+ @classmethod
191
+ def dbxref(cls):
192
+ """A database cross-reference to associate a sequence alteration to its representation in another database.
193
+ (cls, GVF1_0078)
194
+ """
195
+ return _namespace_GVF1O('GVF1_0078')
196
+
197
+ @classmethod
198
+ def region(cls):
199
+ """Either:
200
+ FALDO "Region" instance replacement for a feature's start, stop, strand properties.
201
+ (cls, GVF1_0021)
202
+ Or:
203
+ FALDO "Region" instance replacement for a breakpoint's start, stop, strand properties.
204
+ (GVF1_0079)
205
+ """
206
+ return [ _namespace_GVF1O('GVF1_0021'), _namespace_GVF1O('GVF1_0079') ]
207
+
208
+ @classmethod
209
+ def seqid(cls):
210
+ """Either:
211
+ ID of the landmark that establishes the coordinate system for a feature.
212
+ (cls, GVF1_0004)
213
+ Or:
214
+ ID of the landmark that establishes the coordinate system for a breakpoint.
215
+ (GVF1_0072)
216
+ """
217
+ return [ _namespace_GVF1O('GVF1_0004'), _namespace_GVF1O('GVF1_0072') ]
218
+
219
+ @classmethod
220
+ def source(cls):
221
+ """A free text qualifier that describes the algorithm or operating procedure that generated this feature. For example, the name of the software that generated this feature or a database name.
222
+ (cls, GVF1_0005)
223
+ """
224
+ return _namespace_GVF1O('GVF1_0005')
225
+
226
+ @classmethod
227
+ def type(cls):
228
+ """Type of the feature, which is either a term from the "lite" version of the Sequence Ontology (cls, SOFA), a term from the full Sequence Ontology (SO) that is a child of sequence_feature (SO:0000110), or a SOFA or SO accession number.
229
+ (GVF1_0006)
230
+ """
231
+ return _namespace_GVF1O('GVF1_0006')
232
+
233
+ @classmethod
234
+ def start(cls):
235
+ """Either:
236
+ Start coordinate of the feature on the seqid landmark.
237
+ (cls, GVF1_0007)
238
+ Or:
239
+ A coordinate that defines the start of an ambiguous coordinate range.
240
+ (GVF1_0048)
241
+ Or:
242
+ Start coordinate of the feature on the seqid landmark.
243
+ (GVF1_0073)
244
+ """
245
+ return [ _namespace_GVF1O('GVF1_0007'), _namespace_GVF1O('GVF1_0048'), _namespace_GVF1O('GVF1_0073') ]
246
+
247
+ @classmethod
248
+ def end(cls):
249
+ """Either:
250
+ End coordinate of the feature on the seqid landmark.
251
+ (cls, GVF1_0008)
252
+ Or:
253
+ A coordinate that defines the end of an ambiguous coordinate range.
254
+ (GVF1_0049)
255
+ Or:
256
+ End coordinate of the feature on the seqid landmark.
257
+ (GVF1_0074)
258
+ """
259
+ return [ _namespace_GVF1O('GVF1_0008'), _namespace_GVF1O('GVF1_0049'), _namespace_GVF1O('GVF1_0074') ]
260
+
261
+ @classmethod
262
+ def score(cls):
263
+ """Score of the feature. For example, an E-value for sequence similarity features or a P-value for ab initio gene prediction features.
264
+ (cls, GVF1_0009)
265
+ """
266
+ return _namespace_GVF1O('GVF1_0009')
267
+
268
+ @classmethod
269
+ def tag(cls):
270
+ """Tag name of a feature attribute.
271
+ (cls, GVF1_0013)
272
+ """
273
+ return _namespace_GVF1O('GVF1_0013')
274
+
275
+ @classmethod
276
+ def version(cls):
277
+ """Version of the GVF specification that defines the feature set contents.
278
+ (cls, GVF1_0022)
279
+ """
280
+ return _namespace_GVF1O('GVF1_0022')
281
+
282
+ @classmethod
283
+ def build(cls):
284
+ """Name of a genome assembly build that denotes the provenance of features in a feature set. For example, 'NCBI 36' or 'FlyBase r4.1'.
285
+ (cls, GVF1_0024)
286
+ """
287
+ return _namespace_GVF1O('GVF1_0024')
288
+
289
+ @classmethod
290
+ def variant_seq(cls):
291
+ """All sequence variations at a locus -- including the reference sequence when appropriate (cls, for example, when the locus is heterozygous). If the feature is on the minus strand, then the sequence is the reverse-compliment of the reference genome for these coordinates.
292
+ (GVF1_0025)
293
+ """
294
+ return _namespace_GVF1O('GVF1_0025')
295
+
296
+ @classmethod
297
+ def id(cls):
298
+ """A unique identifier for the feature within the feature set.
299
+ (cls, GVF1_0026)
300
+ """
301
+ return _namespace_GVF1O('GVF1_0026')
302
+
303
+ @classmethod
304
+ def alias(cls):
305
+ """Secondary name of a feature, which can be HGVS/ISCN nomenclature names, but not cross-references to databases (cls, e.g. dbSNP, OMIM) which should use the dbxref property.
306
+ (GVF1_0027)
307
+ """
308
+ return _namespace_GVF1O('GVF1_0027')
309
+
310
+ @classmethod
311
+ def name(cls):
312
+ """Name of an external database. For example, "dbSNP" or "OMIM".
313
+ (cls, GVF1_0029)
314
+ """
315
+ return _namespace_GVF1O('GVF1_0029')
316
+
317
+ @classmethod
318
+ def xref(cls):
319
+ """External database identifier. For example, for dbSNP, this identifier could be "rs3131969".
320
+ (cls, GVF1_0030)
321
+ """
322
+ return _namespace_GVF1O('GVF1_0030')
323
+
324
+ @classmethod
325
+ def reference_seq(cls):
326
+ """Sequence from the reference genome.
327
+ (cls, GVF1_0031)
328
+ """
329
+ return _namespace_GVF1O('GVF1_0031')
330
+
331
+ @classmethod
332
+ def variant_reads(cls):
333
+ """Number of reads that are supporting this variant.
334
+ (cls, GVF1_0032)
335
+ """
336
+ return _namespace_GVF1O('GVF1_0032')
337
+
338
+ @classmethod
339
+ def total_reads(cls):
340
+ """Total number of reads.
341
+ (cls, GVF1_0037)
342
+ """
343
+ return _namespace_GVF1O('GVF1_0037')
344
+
345
+ @classmethod
346
+ def zygosity(cls):
347
+ """Zygosity of a feature locus.
348
+ (cls, GVF1_0038)
349
+ """
350
+ return _namespace_GVF1O('GVF1_0038')
351
+
352
+ @classmethod
353
+ def variant_freq(cls):
354
+ """Frequency of a variant in a population.
355
+ (cls, GVF1_0039)
356
+ """
357
+ return _namespace_GVF1O('GVF1_0039')
358
+
359
+ @classmethod
360
+ def start(cls):
361
+ """Either:
362
+ Start coordinate of the feature on the seqid landmark.
363
+ (cls, GVF1_0007)
364
+ Or:
365
+ A coordinate that defines the start of an ambiguous coordinate range.
366
+ (GVF1_0048)
367
+ Or:
368
+ Start coordinate of the feature on the seqid landmark.
369
+ (GVF1_0073)
370
+ """
371
+ return [ _namespace_GVF1O('GVF1_0007'), _namespace_GVF1O('GVF1_0048'), _namespace_GVF1O('GVF1_0073') ]
372
+
373
+ @classmethod
374
+ def end(cls):
375
+ """Either:
376
+ End coordinate of the feature on the seqid landmark.
377
+ (cls, GVF1_0008)
378
+ Or:
379
+ A coordinate that defines the end of an ambiguous coordinate range.
380
+ (GVF1_0049)
381
+ Or:
382
+ End coordinate of the feature on the seqid landmark.
383
+ (GVF1_0074)
384
+ """
385
+ return [ _namespace_GVF1O('GVF1_0008'), _namespace_GVF1O('GVF1_0049'), _namespace_GVF1O('GVF1_0074') ]
386
+
387
+ @classmethod
388
+ def phased(cls):
389
+ """Unclear from GVF specification.
390
+ (cls, GVF1_0050)
391
+ """
392
+ return _namespace_GVF1O('GVF1_0050')
393
+
394
+ @classmethod
395
+ def variant_codon(cls):
396
+ """Describes the codon that overlaps this variant.
397
+ (cls, GVF1_0054)
398
+ """
399
+ return _namespace_GVF1O('GVF1_0054')
400
+
401
+ @classmethod
402
+ def reference_codon(cls):
403
+ """Describes the codon from the reference sequence whose coordinates overlap with this variant.
404
+ (cls, GVF1_0055)
405
+ """
406
+ return _namespace_GVF1O('GVF1_0055')
407
+
408
+ @classmethod
409
+ def variant_aa(cls):
410
+ """Amino acid that overlaps with the variant.
411
+ (cls, GVF1_0056)
412
+ """
413
+ return _namespace_GVF1O('GVF1_0056')
414
+
415
+ @classmethod
416
+ def reference_aa(cls):
417
+ """Amino acid in the reference genome that overlaps with a variant's genome coordinates.
418
+ (cls, GVF1_0057)
419
+ """
420
+ return _namespace_GVF1O('GVF1_0057')
421
+
422
+ @classmethod
423
+ def feature_properties(cls):
424
+ """Either:
425
+ Properties that are directly associated with Feature class instances.
426
+ (cls, GVF1_0066)
427
+ Or:
428
+ Properties that are directly associated with Feature class instances.
429
+ (GVF1_0059)
430
+ """
431
+ return [ _namespace_GVF1O('GVF1_0066'), _namespace_GVF1O('GVF1_0059') ]
432
+
433
+ @classmethod
434
+ def variant_properties(cls):
435
+ """Either:
436
+ Properties that are directly associated with Variant class instances.
437
+ (cls, GVF1_0069)
438
+ Or:
439
+ Properties that are directly associated with Variant class instances.
440
+ (GVF1_0060)
441
+ """
442
+ return [ _namespace_GVF1O('GVF1_0069'), _namespace_GVF1O('GVF1_0060') ]
443
+
444
+ @classmethod
445
+ def range_properties(cls):
446
+ """Properties that are directly associated with Range class instances.
447
+ (cls, GVF1_0061)
448
+ """
449
+ return _namespace_GVF1O('GVF1_0061')
450
+
451
+ @classmethod
452
+ def dbxref_properties(cls):
453
+ """Properties that are directly associated with DBXRef class instances.
454
+ (cls, GVF1_0062)
455
+ """
456
+ return _namespace_GVF1O('GVF1_0062')
457
+
458
+ @classmethod
459
+ def set_properties(cls):
460
+ """Either:
461
+ Properties that are directly associated with Set class instances.
462
+ (cls, GVF1_0068)
463
+ Or:
464
+ Properties that are directly associated with Set class instances.
465
+ (GVF1_0063)
466
+ """
467
+ return [ _namespace_GVF1O('GVF1_0068'), _namespace_GVF1O('GVF1_0063') ]
468
+
469
+ @classmethod
470
+ def attribute_properties(cls):
471
+ """Properties that are directly associated with Attribute class instances.
472
+ (cls, GVF1_0064)
473
+ """
474
+ return _namespace_GVF1O('GVF1_0064')
475
+
476
+ @classmethod
477
+ def sequencedindividual_properties(cls):
478
+ """Either:
479
+ Properties that are directly associated with SequencedIndividual class instances.
480
+ (cls, GVF1_0067)
481
+ Or:
482
+ Properties that are directly associated with SequencedIndividual class instances.
483
+ (GVF1_0065)
484
+ """
485
+ return [ _namespace_GVF1O('GVF1_0067'), _namespace_GVF1O('GVF1_0065') ]
486
+
487
+ @classmethod
488
+ def breakpoint_properties(cls):
489
+ """Either:
490
+ Properties that are directly associated with Breakpoint class instances.
491
+ (cls, GVF1_0075)
492
+ Or:
493
+ Properties that are directly associated with Breakpoint class instances.
494
+ (GVF1_0071)
495
+ """
496
+ return [ _namespace_GVF1O('GVF1_0075'), _namespace_GVF1O('GVF1_0071') ]
497
+
498
+ @classmethod
499
+ def seqid(cls):
500
+ """Either:
501
+ ID of the landmark that establishes the coordinate system for a feature.
502
+ (cls, GVF1_0004)
503
+ Or:
504
+ ID of the landmark that establishes the coordinate system for a breakpoint.
505
+ (GVF1_0072)
506
+ """
507
+ return [ _namespace_GVF1O('GVF1_0004'), _namespace_GVF1O('GVF1_0072') ]
508
+
509
+ @classmethod
510
+ def start(cls):
511
+ """Either:
512
+ Start coordinate of the feature on the seqid landmark.
513
+ (cls, GVF1_0007)
514
+ Or:
515
+ A coordinate that defines the start of an ambiguous coordinate range.
516
+ (GVF1_0048)
517
+ Or:
518
+ Start coordinate of the feature on the seqid landmark.
519
+ (GVF1_0073)
520
+ """
521
+ return [ _namespace_GVF1O('GVF1_0007'), _namespace_GVF1O('GVF1_0048'), _namespace_GVF1O('GVF1_0073') ]
522
+
523
+ @classmethod
524
+ def end(cls):
525
+ """Either:
526
+ End coordinate of the feature on the seqid landmark.
527
+ (cls, GVF1_0008)
528
+ Or:
529
+ A coordinate that defines the end of an ambiguous coordinate range.
530
+ (GVF1_0049)
531
+ Or:
532
+ End coordinate of the feature on the seqid landmark.
533
+ (GVF1_0074)
534
+ """
535
+ return [ _namespace_GVF1O('GVF1_0008'), _namespace_GVF1O('GVF1_0049'), _namespace_GVF1O('GVF1_0074') ]
536
+
537
+ @classmethod
538
+ def a_context(cls):
539
+ """Sequence context (cls, positive strand) of a feature on the 5' end.
540
+ (GVF1_0076)
541
+ """
542
+ return _namespace_GVF1O('GVF1_0076')
543
+
544
+ @classmethod
545
+ def a_context(cls):
546
+ """Sequence context (cls, positive strand) of a feature on the 3' end.
547
+ (GVF1_0077)
548
+ """
549
+ return _namespace_GVF1O('GVF1_0077')
550
+
551
+ @classmethod
552
+ def Set(cls):
553
+ """Set of genomic sequence features, whose identifiers are unique within the set.
554
+ (cls, GVF1_0001)
555
+ """
556
+ return _namespace_GVF1O('GVF1_0001')
557
+
558
+ @classmethod
559
+ def Feature(cls):
560
+ """A genomic sequence feature.
561
+ (cls, GVF1_0002)
562
+ """
563
+ return _namespace_GVF1O('GVF1_0002')
564
+
565
+ @classmethod
566
+ def Attribute(cls):
567
+ return _namespace_GVF1O('GVF1_0003')
568
+
569
+ @classmethod
570
+ def Strand(cls):
571
+ """Class describing a genomic strand. Instances of the class (cls, individuals) are used to denote forward-/reverse-strands, etc.
572
+ (GVF1_0016)
573
+ """
574
+ return _namespace_GVF1O('GVF1_0016')
575
+
576
+ @classmethod
577
+ def DBXRef(cls):
578
+ """A class describing relationships between features and external databases.
579
+ (cls, GVF1_0028)
580
+ """
581
+ return _namespace_GVF1O('GVF1_0028')
582
+
583
+ @classmethod
584
+ def Variant(cls):
585
+ """Describing specific alterations of a feature.
586
+ (cls, GVF1_0033)
587
+ """
588
+ return _namespace_GVF1O('GVF1_0033')
589
+
590
+ @classmethod
591
+ def SequencedIndividual(cls):
592
+ """Aggregated sequencing information for a particular individual.
593
+ (cls, GVF1_0035)
594
+ """
595
+ return _namespace_GVF1O('GVF1_0035')
596
+
597
+ @classmethod
598
+ def Effect(cls):
599
+ """Describing the effect of a feature variant.
600
+ (cls, GVF1_0040)
601
+ """
602
+ return _namespace_GVF1O('GVF1_0040')
603
+
604
+ @classmethod
605
+ def Range(cls):
606
+ """Describe ambiguity in either start or end coordinates.
607
+ (cls, GVF1_0045)
608
+ """
609
+ return _namespace_GVF1O('GVF1_0045')
610
+
611
+ @classmethod
612
+ def Chromosome(cls):
613
+ """An abstract representation of a chromosome to represent ploidy.
614
+ (cls, GVF1_0052)
615
+ """
616
+ return _namespace_GVF1O('GVF1_0052')
617
+
618
+ @classmethod
619
+ def Breakpoint(cls):
620
+ """Describes the source or destination of a zero-length sequence alteration.
621
+ (cls, GVF1_0058)
622
+ """
623
+ return _namespace_GVF1O('GVF1_0058')
624
+
625
+ @classmethod
626
+ def Positive(cls):
627
+ """Location on the positive (cls, forward) strand.
628
+ (GVF1_0017)
629
+ """
630
+ return _namespace_GVF1O('GVF1_0017')
631
+
632
+ @classmethod
633
+ def Negative(cls):
634
+ """Location on the negative (cls, reverse) strand.
635
+ (GVF1_0018)
636
+ """
637
+ return _namespace_GVF1O('GVF1_0018')
638
+
639
+ @classmethod
640
+ def UnknownStrand(cls):
641
+ """Strand was not determined, which leaves it open whether the location is on the positive (cls, forward) or negative (reverse) strand.
642
+ (GVF1_0019)
643
+ """
644
+ return _namespace_GVF1O('GVF1_0019')
645
+
646
+ @classmethod
647
+ def NotStranded(cls):
648
+ """Strand is not applicable.
649
+ (cls, GVF1_0020)
650
+ """
651
+ return _namespace_GVF1O('GVF1_0020')
652
+
653
+ @classmethod
654
+ def is_object_property(cls, uri):
655
+ """Determines whether the given URI is an object property.
656
+
657
+ uri -- URI that is tested for being an object property
658
+ """
659
+ if uri == _namespace_GVF1O('GVF1_0010'):
660
+ return True
661
+ if uri == _namespace_GVF1O('GVF1_0012'):
662
+ return True
663
+ if uri == _namespace_GVF1O('GVF1_0014'):
664
+ return True
665
+ if uri == _namespace_GVF1O('GVF1_0015'):
666
+ return True
667
+ if uri == _namespace_GVF1O('GVF1_0021'):
668
+ return True
669
+ if uri == _namespace_GVF1O('GVF1_0023'):
670
+ return True
671
+ if uri == _namespace_GVF1O('GVF1_0034'):
672
+ return True
673
+ if uri == _namespace_GVF1O('GVF1_0036'):
674
+ return True
675
+ if uri == _namespace_GVF1O('GVF1_0041'):
676
+ return True
677
+ if uri == _namespace_GVF1O('GVF1_0042'):
678
+ return True
679
+ if uri == _namespace_GVF1O('GVF1_0043'):
680
+ return True
681
+ if uri == _namespace_GVF1O('GVF1_0044'):
682
+ return True
683
+ if uri == _namespace_GVF1O('GVF1_0046'):
684
+ return True
685
+ if uri == _namespace_GVF1O('GVF1_0047'):
686
+ return True
687
+ if uri == _namespace_GVF1O('GVF1_0051'):
688
+ return True
689
+ if uri == _namespace_GVF1O('GVF1_0053'):
690
+ return True
691
+ if uri == _namespace_GVF1O('GVF1_0066'):
692
+ return True
693
+ if uri == _namespace_GVF1O('GVF1_0067'):
694
+ return True
695
+ if uri == _namespace_GVF1O('GVF1_0068'):
696
+ return True
697
+ if uri == _namespace_GVF1O('GVF1_0069'):
698
+ return True
699
+ if uri == _namespace_GVF1O('GVF1_0070'):
700
+ return True
701
+ if uri == _namespace_GVF1O('GVF1_0075'):
702
+ return True
703
+ if uri == _namespace_GVF1O('GVF1_0078'):
704
+ return True
705
+ if uri == _namespace_GVF1O('GVF1_0079'):
706
+ return True
707
+ return False
708
+
709
+ @classmethod
710
+ def is_datatype_property(cls, uri):
711
+ """Determines whether the given URI is a datatype property.
712
+
713
+ uri -- URI that is tested for being a datatype property
714
+ """
715
+ if uri == _namespace_GVF1O('GVF1_0004'):
716
+ return True
717
+ if uri == _namespace_GVF1O('GVF1_0005'):
718
+ return True
719
+ if uri == _namespace_GVF1O('GVF1_0006'):
720
+ return True
721
+ if uri == _namespace_GVF1O('GVF1_0007'):
722
+ return True
723
+ if uri == _namespace_GVF1O('GVF1_0008'):
724
+ return True
725
+ if uri == _namespace_GVF1O('GVF1_0009'):
726
+ return True
727
+ if uri == _namespace_GVF1O('GVF1_0013'):
728
+ return True
729
+ if uri == _namespace_GVF1O('GVF1_0022'):
730
+ return True
731
+ if uri == _namespace_GVF1O('GVF1_0024'):
732
+ return True
733
+ if uri == _namespace_GVF1O('GVF1_0025'):
734
+ return True
735
+ if uri == _namespace_GVF1O('GVF1_0026'):
736
+ return True
737
+ if uri == _namespace_GVF1O('GVF1_0027'):
738
+ return True
739
+ if uri == _namespace_GVF1O('GVF1_0029'):
740
+ return True
741
+ if uri == _namespace_GVF1O('GVF1_0030'):
742
+ return True
743
+ if uri == _namespace_GVF1O('GVF1_0031'):
744
+ return True
745
+ if uri == _namespace_GVF1O('GVF1_0032'):
746
+ return True
747
+ if uri == _namespace_GVF1O('GVF1_0037'):
748
+ return True
749
+ if uri == _namespace_GVF1O('GVF1_0038'):
750
+ return True
751
+ if uri == _namespace_GVF1O('GVF1_0039'):
752
+ return True
753
+ if uri == _namespace_GVF1O('GVF1_0048'):
754
+ return True
755
+ if uri == _namespace_GVF1O('GVF1_0049'):
756
+ return True
757
+ if uri == _namespace_GVF1O('GVF1_0050'):
758
+ return True
759
+ if uri == _namespace_GVF1O('GVF1_0054'):
760
+ return True
761
+ if uri == _namespace_GVF1O('GVF1_0055'):
762
+ return True
763
+ if uri == _namespace_GVF1O('GVF1_0056'):
764
+ return True
765
+ if uri == _namespace_GVF1O('GVF1_0057'):
766
+ return True
767
+ if uri == _namespace_GVF1O('GVF1_0059'):
768
+ return True
769
+ if uri == _namespace_GVF1O('GVF1_0060'):
770
+ return True
771
+ if uri == _namespace_GVF1O('GVF1_0061'):
772
+ return True
773
+ if uri == _namespace_GVF1O('GVF1_0062'):
774
+ return True
775
+ if uri == _namespace_GVF1O('GVF1_0063'):
776
+ return True
777
+ if uri == _namespace_GVF1O('GVF1_0064'):
778
+ return True
779
+ if uri == _namespace_GVF1O('GVF1_0065'):
780
+ return True
781
+ if uri == _namespace_GVF1O('GVF1_0071'):
782
+ return True
783
+ if uri == _namespace_GVF1O('GVF1_0072'):
784
+ return True
785
+ if uri == _namespace_GVF1O('GVF1_0073'):
786
+ return True
787
+ if uri == _namespace_GVF1O('GVF1_0074'):
788
+ return True
789
+ if uri == _namespace_GVF1O('GVF1_0076'):
790
+ return True
791
+ if uri == _namespace_GVF1O('GVF1_0077'):
792
+ return True
793
+ return False
794
+
795
+ @classmethod
796
+ def is_class(cls, uri):
797
+ """Determines whether the given URI is a class.
798
+
799
+ uri -- URI that is tested for being a class
800
+ """
801
+ if uri == _namespace_GVF1O('GVF1_0001'):
802
+ return True
803
+ if uri == _namespace_GVF1O('GVF1_0002'):
804
+ return True
805
+ if uri == _namespace_GVF1O('GVF1_0003'):
806
+ return True
807
+ if uri == _namespace_GVF1O('GVF1_0016'):
808
+ return True
809
+ if uri == _namespace_GVF1O('GVF1_0028'):
810
+ return True
811
+ if uri == _namespace_GVF1O('GVF1_0033'):
812
+ return True
813
+ if uri == _namespace_GVF1O('GVF1_0035'):
814
+ return True
815
+ if uri == _namespace_GVF1O('GVF1_0040'):
816
+ return True
817
+ if uri == _namespace_GVF1O('GVF1_0045'):
818
+ return True
819
+ if uri == _namespace_GVF1O('GVF1_0052'):
820
+ return True
821
+ if uri == _namespace_GVF1O('GVF1_0058'):
822
+ return True
823
+ return False
824
+
825
+ @classmethod
826
+ def is_named_individual(cls, uri):
827
+ """Determines whether the given URI is a named individual.
828
+
829
+ uri -- URI that is tested for being a named individual
830
+ """
831
+ if uri == _namespace_GVF1O('GVF1_0017'):
832
+ return True
833
+ if uri == _namespace_GVF1O('GVF1_0018'):
834
+ return True
835
+ if uri == _namespace_GVF1O('GVF1_0019'):
836
+ return True
837
+ if uri == _namespace_GVF1O('GVF1_0020'):
838
+ return True
839
+ return False
840
+
841
+ @classmethod
842
+ def with_parent(cls, uris, parent):
843
+ """Returns only those URIs that fall under a designated parent URI.
844
+
845
+ uris -- Set of URIs that are tested whether they have the given parent URI.
846
+ parent -- Parent URI.
847
+ """
848
+ return filter(lambda uri: cls.has_parent(uri, parent), uris)
849
+
850
+ @classmethod
851
+ def has_parent(cls, uri, parent):
852
+ """Recursively tries to determine the parent for a given URI.
853
+
854
+ uri -- URI that is tested for whether it has the given parent URI.
855
+ parent -- Parent URI.
856
+ """
857
+ if cls.__parent_properties.has_key(uri):
858
+ if cls.__parent_properties[uri] == parent:
859
+ return True
860
+ return cls.has_parent(cls.__parent_properties[uri], parent)
861
+ return False
862
+
863
+ __parent_properties = { _namespace_GVF1O('GVF1_0010') : _namespace_GVF1O('GVF1_0075') , _namespace_GVF1O('GVF1_0012') : _namespace_GVF1O('GVF1_0066') , _namespace_GVF1O('GVF1_0014') : _namespace_GVF1O('GVF1_0066') , _namespace_GVF1O('GVF1_0015') : _namespace_GVF1O('GVF1_0068') , _namespace_GVF1O('GVF1_0021') : _namespace_GVF1O('GVF1_0066') , _namespace_GVF1O('GVF1_0023') : _namespace_GVF1O('GVF1_0068') , _namespace_GVF1O('GVF1_0034') : _namespace_GVF1O('GVF1_0066') , _namespace_GVF1O('GVF1_0036') : _namespace_GVF1O('GVF1_0066') , _namespace_GVF1O('GVF1_0041') : _namespace_GVF1O('GVF1_0069') , _namespace_GVF1O('GVF1_0042') : _namespace_GVF1O('GVF1_0070') , _namespace_GVF1O('GVF1_0043') : _namespace_GVF1O('GVF1_0070') , _namespace_GVF1O('GVF1_0044') : _namespace_GVF1O('GVF1_0070') , _namespace_GVF1O('GVF1_0046') : _namespace_GVF1O('GVF1_0070') , _namespace_GVF1O('GVF1_0047') : _namespace_GVF1O('GVF1_0070') , _namespace_GVF1O('GVF1_0051') : _namespace_GVF1O('GVF1_0067') , _namespace_GVF1O('GVF1_0053') : _namespace_GVF1O('GVF1_0069') , _namespace_GVF1O('GVF1_0078') : _namespace_GVF1O('GVF1_0066') , _namespace_GVF1O('GVF1_0079') : _namespace_GVF1O('GVF1_0075') , _namespace_GVF1O('GVF1_0004') : _namespace_GVF1O('GVF1_0059') , _namespace_GVF1O('GVF1_0005') : _namespace_GVF1O('GVF1_0059') , _namespace_GVF1O('GVF1_0006') : _namespace_GVF1O('GVF1_0059') , _namespace_GVF1O('GVF1_0007') : _namespace_GVF1O('GVF1_0059') , _namespace_GVF1O('GVF1_0008') : _namespace_GVF1O('GVF1_0059') , _namespace_GVF1O('GVF1_0009') : _namespace_GVF1O('GVF1_0059') , _namespace_GVF1O('GVF1_0013') : _namespace_GVF1O('GVF1_0064') , _namespace_GVF1O('GVF1_0022') : _namespace_GVF1O('GVF1_0063') , _namespace_GVF1O('GVF1_0024') : _namespace_GVF1O('GVF1_0063') , _namespace_GVF1O('GVF1_0025') : _namespace_GVF1O('GVF1_0060') , _namespace_GVF1O('GVF1_0026') : _namespace_GVF1O('GVF1_0059') , _namespace_GVF1O('GVF1_0027') : _namespace_GVF1O('GVF1_0059') , _namespace_GVF1O('GVF1_0029') : _namespace_GVF1O('GVF1_0062') , _namespace_GVF1O('GVF1_0030') : _namespace_GVF1O('GVF1_0062') , _namespace_GVF1O('GVF1_0031') : _namespace_GVF1O('GVF1_0059') , _namespace_GVF1O('GVF1_0032') : _namespace_GVF1O('GVF1_0060') , _namespace_GVF1O('GVF1_0037') : _namespace_GVF1O('GVF1_0065') , _namespace_GVF1O('GVF1_0038') : _namespace_GVF1O('GVF1_0059') , _namespace_GVF1O('GVF1_0039') : _namespace_GVF1O('GVF1_0060') , _namespace_GVF1O('GVF1_0048') : _namespace_GVF1O('GVF1_0061') , _namespace_GVF1O('GVF1_0049') : _namespace_GVF1O('GVF1_0061') , _namespace_GVF1O('GVF1_0050') : _namespace_GVF1O('GVF1_0060') , _namespace_GVF1O('GVF1_0054') : _namespace_GVF1O('GVF1_0060') , _namespace_GVF1O('GVF1_0055') : _namespace_GVF1O('GVF1_0060') , _namespace_GVF1O('GVF1_0056') : _namespace_GVF1O('GVF1_0060') , _namespace_GVF1O('GVF1_0057') : _namespace_GVF1O('GVF1_0060') , _namespace_GVF1O('GVF1_0072') : _namespace_GVF1O('GVF1_0071') , _namespace_GVF1O('GVF1_0073') : _namespace_GVF1O('GVF1_0071') , _namespace_GVF1O('GVF1_0074') : _namespace_GVF1O('GVF1_0071') , _namespace_GVF1O('GVF1_0076') : _namespace_GVF1O('GVF1_0059') , _namespace_GVF1O('GVF1_0077') : _namespace_GVF1O('GVF1_0059') }
864
+