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
@@ -18,7 +18,7 @@ public class FALDO {
18
18
  * (http://biohackathon.org/resource/faldo#InBetweenPosition)
19
19
  */
20
20
  public static Resource In_between_positions() {
21
- return _namespace_FALDO("http://biohackathon.org/resource/faldo#InBetweenPosition");
21
+ return _namespace_FALDO("InBetweenPosition");
22
22
  }
23
23
 
24
24
  /**
@@ -26,7 +26,7 @@ public class FALDO {
26
26
  * (http://biohackathon.org/resource/faldo#Position)
27
27
  */
28
28
  public static Resource Position() {
29
- return _namespace_FALDO("http://biohackathon.org/resource/faldo#Position");
29
+ return _namespace_FALDO("Position");
30
30
  }
31
31
 
32
32
  /**
@@ -34,7 +34,7 @@ public class FALDO {
34
34
  * (http://biohackathon.org/resource/faldo#ExactPosition)
35
35
  */
36
36
  public static Resource Exact_position() {
37
- return _namespace_FALDO("http://biohackathon.org/resource/faldo#ExactPosition");
37
+ return _namespace_FALDO("ExactPosition");
38
38
  }
39
39
 
40
40
  /**
@@ -42,7 +42,7 @@ public class FALDO {
42
42
  * (http://biohackathon.org/resource/faldo#OneOfPosition)
43
43
  */
44
44
  public static Resource One_of_positions() {
45
- return _namespace_FALDO("http://biohackathon.org/resource/faldo#OneOfPosition");
45
+ return _namespace_FALDO("OneOfPosition");
46
46
  }
47
47
 
48
48
  /**
@@ -50,7 +50,7 @@ public class FALDO {
50
50
  * (http://biohackathon.org/resource/faldo#InRangePosition)
51
51
  */
52
52
  public static Resource Indeterminate_position_within_a_range() {
53
- return _namespace_FALDO("http://biohackathon.org/resource/faldo#InRangePosition");
53
+ return _namespace_FALDO("InRangePosition");
54
54
  }
55
55
 
56
56
  /**
@@ -58,7 +58,7 @@ public class FALDO {
58
58
  * (http://biohackathon.org/resource/faldo#StrandedPosition)
59
59
  */
60
60
  public static Resource Stranded_position() {
61
- return _namespace_FALDO("http://biohackathon.org/resource/faldo#StrandedPosition");
61
+ return _namespace_FALDO("StrandedPosition");
62
62
  }
63
63
 
64
64
  /**
@@ -66,7 +66,7 @@ public class FALDO {
66
66
  * (http://biohackathon.org/resource/faldo#FuzzyPosition)
67
67
  */
68
68
  public static Resource Fuzzy_position() {
69
- return _namespace_FALDO("http://biohackathon.org/resource/faldo#FuzzyPosition");
69
+ return _namespace_FALDO("FuzzyPosition");
70
70
  }
71
71
 
72
72
  /**
@@ -74,7 +74,7 @@ public class FALDO {
74
74
  * (http://biohackathon.org/resource/faldo#ForwardStrandPosition)
75
75
  */
76
76
  public static Resource Positive_strand() {
77
- return _namespace_FALDO("http://biohackathon.org/resource/faldo#ForwardStrandPosition");
77
+ return _namespace_FALDO("ForwardStrandPosition");
78
78
  }
79
79
 
80
80
  /**
@@ -82,7 +82,7 @@ public class FALDO {
82
82
  * (http://biohackathon.org/resource/faldo#BothStrandsPosition)
83
83
  */
84
84
  public static Resource Both_strands() {
85
- return _namespace_FALDO("http://biohackathon.org/resource/faldo#BothStrandsPosition");
85
+ return _namespace_FALDO("BothStrandsPosition");
86
86
  }
87
87
 
88
88
  /**
@@ -90,7 +90,7 @@ public class FALDO {
90
90
  * (http://biohackathon.org/resource/faldo#ReverseStrandPosition)
91
91
  */
92
92
  public static Resource Negative_strand() {
93
- return _namespace_FALDO("http://biohackathon.org/resource/faldo#ReverseStrandPosition");
93
+ return _namespace_FALDO("ReverseStrandPosition");
94
94
  }
95
95
 
96
96
  /**
@@ -98,7 +98,7 @@ public class FALDO {
98
98
  * (http://biohackathon.org/resource/faldo#Region)
99
99
  */
100
100
  public static Resource Region() {
101
- return _namespace_FALDO("http://biohackathon.org/resource/faldo#Region");
101
+ return _namespace_FALDO("Region");
102
102
  }
103
103
 
104
104
  /**
@@ -125,37 +125,37 @@ public class FALDO {
125
125
  * @param uri URI that is tested for being a class
126
126
  */
127
127
  public static boolean isClass(Resource uri) {
128
- if (uri == _namespace_FALDO("http://biohackathon.org/resource/faldo#InBetweenPosition")) {
128
+ if (uri.equals(_namespace_FALDO("InBetweenPosition"))) {
129
129
  return true;
130
130
  }
131
- if (uri == _namespace_FALDO("http://biohackathon.org/resource/faldo#Position")) {
131
+ if (uri.equals(_namespace_FALDO("Position"))) {
132
132
  return true;
133
133
  }
134
- if (uri == _namespace_FALDO("http://biohackathon.org/resource/faldo#ExactPosition")) {
134
+ if (uri.equals(_namespace_FALDO("ExactPosition"))) {
135
135
  return true;
136
136
  }
137
- if (uri == _namespace_FALDO("http://biohackathon.org/resource/faldo#OneOfPosition")) {
137
+ if (uri.equals(_namespace_FALDO("OneOfPosition"))) {
138
138
  return true;
139
139
  }
140
- if (uri == _namespace_FALDO("http://biohackathon.org/resource/faldo#InRangePosition")) {
140
+ if (uri.equals(_namespace_FALDO("InRangePosition"))) {
141
141
  return true;
142
142
  }
143
- if (uri == _namespace_FALDO("http://biohackathon.org/resource/faldo#StrandedPosition")) {
143
+ if (uri.equals(_namespace_FALDO("StrandedPosition"))) {
144
144
  return true;
145
145
  }
146
- if (uri == _namespace_FALDO("http://biohackathon.org/resource/faldo#FuzzyPosition")) {
146
+ if (uri.equals(_namespace_FALDO("FuzzyPosition"))) {
147
147
  return true;
148
148
  }
149
- if (uri == _namespace_FALDO("http://biohackathon.org/resource/faldo#ForwardStrandPosition")) {
149
+ if (uri.equals(_namespace_FALDO("ForwardStrandPosition"))) {
150
150
  return true;
151
151
  }
152
- if (uri == _namespace_FALDO("http://biohackathon.org/resource/faldo#BothStrandsPosition")) {
152
+ if (uri.equals(_namespace_FALDO("BothStrandsPosition"))) {
153
153
  return true;
154
154
  }
155
- if (uri == _namespace_FALDO("http://biohackathon.org/resource/faldo#ReverseStrandPosition")) {
155
+ if (uri.equals(_namespace_FALDO("ReverseStrandPosition"))) {
156
156
  return true;
157
157
  }
158
- if (uri == _namespace_FALDO("http://biohackathon.org/resource/faldo#Region")) {
158
+ if (uri.equals(_namespace_FALDO("Region"))) {
159
159
  return true;
160
160
  }
161
161
  return false;
@@ -188,7 +188,7 @@ public class FALDO {
188
188
  */
189
189
  public static boolean hasParent(Resource uri, Resource parent) {
190
190
  if (__parent_properties.containsKey(uri)) {
191
- if (__parent_properties.get(uri) == parent) {
191
+ if (__parent_properties.get(uri).equals(parent)) {
192
192
  return true;
193
193
  }
194
194
  return hasParent((Resource)__parent_properties.get(uri), parent);
@@ -197,11 +197,7 @@ public class FALDO {
197
197
  }
198
198
 
199
199
  private static Resource _namespace_FALDO(String accession) {
200
- if (isClass(ResourceFactory.createResource("http://biohackathon.org/resource/faldo#" + accession))) {
201
- return ResourceFactory.createResource("http://biohackathon.org/resource/faldo#" + accession);
202
- } else {
203
- return ResourceFactory.createProperty("http://biohackathon.org/resource/faldo#" + accession);
204
- }
200
+ return ResourceFactory.createResource("http://biohackathon.org/resource/faldo#" + accession);
205
201
  }
206
202
 
207
203
 
@@ -210,6 +206,12 @@ public class FALDO {
210
206
  private static Map<Resource, Resource> _init___parent_properties() {
211
207
  Map<Resource, Resource> map = new HashMap<Resource, Resource>();
212
208
 
209
+ map.put(ResourceFactory.createResource("http://biohackathon.org/resource/faldo#OneOfPosition"), ResourceFactory.createResource("http://biohackathon.org/resource/faldo#FuzzyPosition"));
210
+ map.put(ResourceFactory.createResource("http://biohackathon.org/resource/faldo#StrandedPosition"), ResourceFactory.createResource("http://biohackathon.org/resource/faldo#Position"));
211
+ map.put(ResourceFactory.createResource("http://biohackathon.org/resource/faldo#FuzzyPosition"), ResourceFactory.createResource("http://biohackathon.org/resource/faldo#Position"));
212
+ map.put(ResourceFactory.createResource("http://biohackathon.org/resource/faldo#ForwardStrandPosition"), ResourceFactory.createResource("http://biohackathon.org/resource/faldo#StrandedPosition"));
213
+ map.put(ResourceFactory.createResource("http://biohackathon.org/resource/faldo#BothStrandsPosition"), ResourceFactory.createResource("http://biohackathon.org/resource/faldo#StrandedPosition"));
214
+ map.put(ResourceFactory.createResource("http://biohackathon.org/resource/faldo#ReverseStrandPosition"), ResourceFactory.createResource("http://biohackathon.org/resource/faldo#StrandedPosition"));
213
215
 
214
216
  return map;
215
217
  }