biointerchange 0.1.0

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 (57) hide show
  1. data/.document +5 -0
  2. data/.rspec +1 -0
  3. data/.travis.yml +12 -0
  4. data/Gemfile +17 -0
  5. data/LICENSE.txt +8 -0
  6. data/README.md +166 -0
  7. data/Rakefile +50 -0
  8. data/VERSION +1 -0
  9. data/bin/biointerchange +6 -0
  10. data/docs/exceptions_readme.txt +13 -0
  11. data/examples/BovineGenomeChrX.gff3.gz +0 -0
  12. data/examples/gb-2007-8-3-R40.xml +243 -0
  13. data/examples/pubannotation.json +1 -0
  14. data/generators/rdfxml.rb +104 -0
  15. data/lib/biointerchange/core.rb +195 -0
  16. data/lib/biointerchange/exceptions.rb +38 -0
  17. data/lib/biointerchange/genomics/gff3_feature.rb +82 -0
  18. data/lib/biointerchange/genomics/gff3_feature_set.rb +37 -0
  19. data/lib/biointerchange/genomics/gff3_rdf_ntriples.rb +107 -0
  20. data/lib/biointerchange/genomics/gff3_reader.rb +86 -0
  21. data/lib/biointerchange/gff3.rb +135 -0
  22. data/lib/biointerchange/reader.rb +25 -0
  23. data/lib/biointerchange/registry.rb +29 -0
  24. data/lib/biointerchange/sio.rb +7124 -0
  25. data/lib/biointerchange/sofa.rb +1566 -0
  26. data/lib/biointerchange/textmining/content.rb +69 -0
  27. data/lib/biointerchange/textmining/document.rb +36 -0
  28. data/lib/biointerchange/textmining/pdfx_xml_reader.rb +161 -0
  29. data/lib/biointerchange/textmining/process.rb +57 -0
  30. data/lib/biointerchange/textmining/pubannos_json_reader.rb +72 -0
  31. data/lib/biointerchange/textmining/text_mining_rdf_ntriples.rb +197 -0
  32. data/lib/biointerchange/textmining/text_mining_reader.rb +41 -0
  33. data/lib/biointerchange/writer.rb +23 -0
  34. data/lib/biointerchange.rb +3 -0
  35. data/spec/exceptions_spec.rb +27 -0
  36. data/spec/gff3_rdfwriter_spec.rb +67 -0
  37. data/spec/text_mining_pdfx_xml_reader_spec.rb +89 -0
  38. data/spec/text_mining_pubannos_json_reader_spec.rb +71 -0
  39. data/spec/text_mining_rdfwriter_spec.rb +57 -0
  40. data/web/about.html +89 -0
  41. data/web/biointerchange.js +133 -0
  42. data/web/bootstrap/css/bootstrap-responsive.css +1040 -0
  43. data/web/bootstrap/css/bootstrap-responsive.min.css +9 -0
  44. data/web/bootstrap/css/bootstrap.css +5624 -0
  45. data/web/bootstrap/css/bootstrap.min.css +9 -0
  46. data/web/bootstrap/img/glyphicons-halflings-white.png +0 -0
  47. data/web/bootstrap/img/glyphicons-halflings.png +0 -0
  48. data/web/bootstrap/js/bootstrap.js +2027 -0
  49. data/web/bootstrap/js/bootstrap.min.js +6 -0
  50. data/web/bootstrap/js/jquery-1.8.1.min.js +2 -0
  51. data/web/css/rdoc-style.css +5786 -0
  52. data/web/css/rdoc.css +716 -0
  53. data/web/images/BioInterchange300.png +0 -0
  54. data/web/index.html +109 -0
  55. data/web/service/rdfizer.fcgi +68 -0
  56. data/web/webservices.html +123 -0
  57. metadata +240 -0
@@ -0,0 +1,25 @@
1
+ module BioInterchange
2
+
3
+ # A reader takes information from an input stream and creates an object model.
4
+ #
5
+ # For example, the input stream might hold text-mining data in some format. This
6
+ # data is deserialized by the reader and turned into an object model representation,
7
+ # i.e. an instance of a Ruby class that describes the data.
8
+ class Reader
9
+
10
+ # Create a new instance of a reader. Ideally you want to provide your own initialization
11
+ # method in derived classes that takes some extra parameters for configuring/parametrizing the
12
+ # data deserialization with +deserialize+.
13
+ def initialize
14
+ end
15
+
16
+ # Reads data from the provided input stream and returns an input specific object model instance.
17
+ #
18
+ # +istream+:: input IO stream to deserialize
19
+ def deserialize(istream)
20
+ raise BioInterchange::Exceptions::ImplementationReaderError, 'You must implement this method, which reads data from an input stream and returns an object model instance.'
21
+ end
22
+
23
+ end
24
+
25
+ end
@@ -0,0 +1,29 @@
1
+ module BioInterchange
2
+
3
+ class Registry
4
+
5
+ def self.register_reader(uid, service)
6
+ @@readers[uid] = service
7
+ end
8
+
9
+ def self.register_writer(uid, service)
10
+ @@writers[uid] = service
11
+ end
12
+
13
+ def self.readers
14
+ @@readers
15
+ end
16
+
17
+ def self.writers
18
+ @@writers
19
+ end
20
+
21
+ private
22
+
23
+ @@readers = {}
24
+ @@writers = {}
25
+
26
+ end
27
+
28
+ end
29
+