biointerchange 0.2.2 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (55) hide show
  1. data/Gemfile +1 -0
  2. data/README.md +269 -19
  3. data/VERSION +1 -1
  4. data/examples/bininda_emonds_mammals.new +1 -0
  5. data/examples/rdfization.rb +17 -0
  6. data/examples/tree1.new +1 -0
  7. data/examples/tree2.new +1 -0
  8. data/examples/vocabulary.rb +26 -5
  9. data/generators/javaify.rb +12 -18
  10. data/generators/make_supplement_releases.rb +2 -0
  11. data/generators/pythonify.rb +21 -8
  12. data/generators/rdfxml.rb +15 -1
  13. data/lib/biointerchange/cdao.rb +2014 -0
  14. data/lib/biointerchange/core.rb +70 -77
  15. data/lib/biointerchange/genomics/gff3_rdf_ntriples.rb +16 -0
  16. data/lib/biointerchange/genomics/gff3_reader.rb +18 -4
  17. data/lib/biointerchange/genomics/gvf_reader.rb +14 -0
  18. data/lib/biointerchange/phylogenetics/cdao_rdf_ntriples.rb +108 -0
  19. data/lib/biointerchange/phylogenetics/newick_reader.rb +81 -0
  20. data/lib/biointerchange/phylogenetics/tree_set.rb +50 -0
  21. data/lib/biointerchange/registry.rb +50 -8
  22. data/lib/biointerchange/so.rb +150 -0
  23. data/lib/biointerchange/textmining/pdfx_xml_reader.rb +21 -2
  24. data/lib/biointerchange/textmining/pubannos_json_reader.rb +24 -1
  25. data/lib/biointerchange/textmining/text_mining_rdf_ntriples.rb +9 -0
  26. data/lib/biointerchange/textmining/text_mining_reader.rb +5 -5
  27. data/spec/phylogenetics_spec.rb +79 -0
  28. data/supplemental/java/biointerchange/pom.xml +1 -1
  29. data/supplemental/java/biointerchange/src/main/java/org/biointerchange/vocabulary/CDAO.java +2602 -0
  30. data/supplemental/java/biointerchange/src/main/java/org/biointerchange/vocabulary/FALDO.java +30 -28
  31. data/supplemental/java/biointerchange/src/main/java/org/biointerchange/vocabulary/GFF3O.java +136 -104
  32. data/supplemental/java/biointerchange/src/main/java/org/biointerchange/vocabulary/GVF1O.java +367 -278
  33. data/supplemental/java/biointerchange/src/main/java/org/biointerchange/vocabulary/SIO.java +4388 -3127
  34. data/supplemental/java/biointerchange/src/main/java/org/biointerchange/vocabulary/SO.java +5970 -4351
  35. data/supplemental/java/biointerchange/src/main/java/org/biointerchange/vocabulary/SOFA.java +733 -544
  36. data/supplemental/java/biointerchange/src/test/java/org/biointerchange/AppTest.java +3 -1
  37. data/supplemental/python/biointerchange/cdao.py +2021 -0
  38. data/supplemental/python/biointerchange/faldo.py +37 -38
  39. data/supplemental/python/biointerchange/gff3o.py +156 -157
  40. data/supplemental/python/biointerchange/goxref.py +172 -172
  41. data/supplemental/python/biointerchange/gvf1o.py +428 -429
  42. data/supplemental/python/biointerchange/sio.py +3133 -3134
  43. data/supplemental/python/biointerchange/so.py +6626 -6527
  44. data/supplemental/python/biointerchange/sofa.py +790 -791
  45. data/supplemental/python/example.py +23 -5
  46. data/supplemental/python/setup.py +2 -2
  47. data/web/about.html +1 -0
  48. data/web/api.html +223 -15
  49. data/web/biointerchange.js +27 -6
  50. data/web/cli.html +8 -3
  51. data/web/index.html +6 -2
  52. data/web/ontologies.html +3 -0
  53. data/web/service/rdfizer.fcgi +7 -15
  54. data/web/webservices.html +6 -2
  55. metadata +30 -3
@@ -8,79 +8,79 @@ class FALDO:
8
8
  @classmethod
9
9
  def In_between_positions(cls):
10
10
  """This denotes that a feature is in between two other positions that are both known exactly and next to eaxh other. An example is an restriction enzyme cutting site. The cut is after one nucleotide and before the next i.e. in between
11
- (cls, InBetweenPosition)
11
+ (cls, http://biohackathon.org/resource/faldo#InBetweenPosition)
12
12
  """
13
- return _namespace_FALDO('InBetweenPosition')
13
+ return cls._namespace_FALDO('InBetweenPosition')
14
14
 
15
15
  @classmethod
16
16
  def Position(cls):
17
17
  """Superclass to group the general concept of a position on a sequence. The sequence is designated via the reference predicate.
18
- (cls, Position)
18
+ (cls, http://biohackathon.org/resource/faldo#Position)
19
19
  """
20
- return _namespace_FALDO('Position')
20
+ return cls._namespace_FALDO('Position')
21
21
 
22
22
  @classmethod
23
23
  def Exact_position(cls):
24
24
  """Use when you exactly know the position.
25
- (cls, ExactPosition)
25
+ (cls, http://biohackathon.org/resource/faldo#ExactPosition)
26
26
  """
27
- return _namespace_FALDO('ExactPosition')
27
+ return cls._namespace_FALDO('ExactPosition')
28
28
 
29
29
  @classmethod
30
30
  def One_of_positions(cls):
31
31
  """The position must be one of the more detailed Positions listed by the location predicate.
32
- (cls, OneOfPosition)
32
+ (cls, http://biohackathon.org/resource/faldo#OneOfPosition)
33
33
  """
34
- return _namespace_FALDO('OneOfPosition')
34
+ return cls._namespace_FALDO('OneOfPosition')
35
35
 
36
36
  @classmethod
37
37
  def Indeterminate_position_within_a_range(cls):
38
38
  """Use when you have an idea of the range in which you can find the position but can not be sure.
39
- (cls, InRangePosition)
39
+ (cls, http://biohackathon.org/resource/faldo#InRangePosition)
40
40
  """
41
- return _namespace_FALDO('InRangePosition')
41
+ return cls._namespace_FALDO('InRangePosition')
42
42
 
43
43
  @classmethod
44
44
  def Stranded_position(cls):
45
45
  """Part of the coordinate system is on which strand the feature can be found. If you do not yet know which stand the feature is on you should tag the position with just this class. If you know more you should use one of the subclasses. This means a region descibred with a '.' in GFF3. An GFF3 Unstranded position does not have this type in FALDO those are just a Position.
46
- (cls, StrandedPosition)
46
+ (cls, http://biohackathon.org/resource/faldo#StrandedPosition)
47
47
  """
48
- return _namespace_FALDO('StrandedPosition')
48
+ return cls._namespace_FALDO('StrandedPosition')
49
49
 
50
50
  @classmethod
51
51
  def Fuzzy_position(cls):
52
52
  """Use this class to indicate that you lack exact position data.
53
- (cls, FuzzyPosition)
53
+ (cls, http://biohackathon.org/resource/faldo#FuzzyPosition)
54
54
  """
55
- return _namespace_FALDO('FuzzyPosition')
55
+ return cls._namespace_FALDO('FuzzyPosition')
56
56
 
57
57
  @classmethod
58
58
  def Positive_strand(cls):
59
59
  """The position is on the forward (cls, positive) strand. Shown as a '+' in GFF3 and GTF
60
- (ForwardStrandPosition)
60
+ (http://biohackathon.org/resource/faldo#ForwardStrandPosition)
61
61
  """
62
- return _namespace_FALDO('ForwardStrandPosition')
62
+ return cls._namespace_FALDO('ForwardStrandPosition')
63
63
 
64
64
  @classmethod
65
65
  def Both_strands(cls):
66
66
  """The both strands position mean that the region spans both strands instead of one. In GGF3 displayed as 0. This does not mean that the position is one or the other strand but is best described as being on both.
67
- (cls, BothStrandsPosition)
67
+ (cls, http://biohackathon.org/resource/faldo#BothStrandsPosition)
68
68
  """
69
- return _namespace_FALDO('BothStrandsPosition')
69
+ return cls._namespace_FALDO('BothStrandsPosition')
70
70
 
71
71
  @classmethod
72
72
  def Negative_strand(cls):
73
73
  """The position is on the reverse (cls, complement) strand of the sequence. Shown as '-' in GTF and GFF3
74
- (ReverseStrandPosition)
74
+ (http://biohackathon.org/resource/faldo#ReverseStrandPosition)
75
75
  """
76
- return _namespace_FALDO('ReverseStrandPosition')
76
+ return cls._namespace_FALDO('ReverseStrandPosition')
77
77
 
78
78
  @classmethod
79
79
  def Region(cls):
80
80
  """A region describes an length of sequence with a start and end position that represents a feature on a Sequence. i.e. a gene
81
- (cls, Region)
81
+ (cls, http://biohackathon.org/resource/faldo#Region)
82
82
  """
83
- return _namespace_FALDO('Region')
83
+ return cls._namespace_FALDO('Region')
84
84
 
85
85
  @classmethod
86
86
  def is_object_property(cls, uri):
@@ -104,27 +104,27 @@ class FALDO:
104
104
 
105
105
  uri -- URI that is tested for being a class
106
106
  """
107
- if uri == _namespace_FALDO('InBetweenPosition'):
107
+ if uri == cls._namespace_FALDO('InBetweenPosition'):
108
108
  return True
109
- if uri == _namespace_FALDO('Position'):
109
+ if uri == cls._namespace_FALDO('Position'):
110
110
  return True
111
- if uri == _namespace_FALDO('ExactPosition'):
111
+ if uri == cls._namespace_FALDO('ExactPosition'):
112
112
  return True
113
- if uri == _namespace_FALDO('OneOfPosition'):
113
+ if uri == cls._namespace_FALDO('OneOfPosition'):
114
114
  return True
115
- if uri == _namespace_FALDO('InRangePosition'):
115
+ if uri == cls._namespace_FALDO('InRangePosition'):
116
116
  return True
117
- if uri == _namespace_FALDO('StrandedPosition'):
117
+ if uri == cls._namespace_FALDO('StrandedPosition'):
118
118
  return True
119
- if uri == _namespace_FALDO('FuzzyPosition'):
119
+ if uri == cls._namespace_FALDO('FuzzyPosition'):
120
120
  return True
121
- if uri == _namespace_FALDO('ForwardStrandPosition'):
121
+ if uri == cls._namespace_FALDO('ForwardStrandPosition'):
122
122
  return True
123
- if uri == _namespace_FALDO('BothStrandsPosition'):
123
+ if uri == cls._namespace_FALDO('BothStrandsPosition'):
124
124
  return True
125
- if uri == _namespace_FALDO('ReverseStrandPosition'):
125
+ if uri == cls._namespace_FALDO('ReverseStrandPosition'):
126
126
  return True
127
- if uri == _namespace_FALDO('Region'):
127
+ if uri == cls._namespace_FALDO('Region'):
128
128
  return True
129
129
  return False
130
130
 
@@ -158,11 +158,10 @@ class FALDO:
158
158
  return cls.has_parent(cls.__parent_properties[uri], parent)
159
159
  return False
160
160
 
161
- __namespace_FALDO = Namespace('http://biohackathon.org/resource/faldo#')
162
-
163
- def _namespace_FALDO(accession):
164
- return __namespace_FALDO[accession]
161
+ @classmethod
162
+ def _namespace_FALDO(cls, accession):
163
+ return Namespace('http://biohackathon.org/resource/faldo#')[accession]
165
164
 
166
- __parent_properties = { _namespace_FALDO('OneOfPosition') : _namespace_FALDO('FuzzyPosition') , _namespace_FALDO('StrandedPosition') : _namespace_FALDO('Position') , _namespace_FALDO('FuzzyPosition') : _namespace_FALDO('Position') , _namespace_FALDO('ForwardStrandPosition') : _namespace_FALDO('StrandedPosition') , _namespace_FALDO('BothStrandsPosition') : _namespace_FALDO('StrandedPosition') , _namespace_FALDO('ReverseStrandPosition') : _namespace_FALDO('StrandedPosition') }
165
+ __parent_properties = { Namespace('http://biohackathon.org/resource/faldo#OneOfPosition') : Namespace('http://biohackathon.org/resource/faldo#FuzzyPosition') , Namespace('http://biohackathon.org/resource/faldo#StrandedPosition') : Namespace('http://biohackathon.org/resource/faldo#Position') , Namespace('http://biohackathon.org/resource/faldo#FuzzyPosition') : Namespace('http://biohackathon.org/resource/faldo#Position') , Namespace('http://biohackathon.org/resource/faldo#ForwardStrandPosition') : Namespace('http://biohackathon.org/resource/faldo#StrandedPosition') , Namespace('http://biohackathon.org/resource/faldo#BothStrandsPosition') : Namespace('http://biohackathon.org/resource/faldo#StrandedPosition') , Namespace('http://biohackathon.org/resource/faldo#ReverseStrandPosition') : Namespace('http://biohackathon.org/resource/faldo#StrandedPosition') }
167
166
 
168
167