From b5d23150591cd29accf3ec818389e30d5812d7ef Mon Sep 17 00:00:00 2001 From: Christoph Helma Date: Thu, 13 Aug 2009 11:12:40 +0200 Subject: description added, rdoc removed --- .gitignore | 1 + README.rdoc | 2 +- Rakefile | 2 +- rdoc/classes/OpenTox.html | 115 -------- rdoc/classes/OpenTox/Compound.html | 247 ------------------ rdoc/classes/OpenTox/Dataset.html | 331 ------------------------ rdoc/classes/OpenTox/Feature.html | 217 ---------------- rdoc/classes/OpenTox/Fminer.html | 178 ------------- rdoc/classes/OpenTox/OpenTox.html | 162 ------------ rdoc/created.rid | 1 - rdoc/files/README_rdoc.html | 140 ---------- rdoc/files/lib/opentox-ruby-api-wrapper_rb.html | 109 -------- rdoc/fr_class_index.html | 32 --- rdoc/fr_file_index.html | 28 -- rdoc/fr_method_index.html | 43 --- rdoc/index.html | 26 -- rdoc/rdoc-style.css | 208 --------------- 17 files changed, 3 insertions(+), 1839 deletions(-) delete mode 100644 rdoc/classes/OpenTox.html delete mode 100644 rdoc/classes/OpenTox/Compound.html delete mode 100644 rdoc/classes/OpenTox/Dataset.html delete mode 100644 rdoc/classes/OpenTox/Feature.html delete mode 100644 rdoc/classes/OpenTox/Fminer.html delete mode 100644 rdoc/classes/OpenTox/OpenTox.html delete mode 100644 rdoc/created.rid delete mode 100644 rdoc/files/README_rdoc.html delete mode 100644 rdoc/files/lib/opentox-ruby-api-wrapper_rb.html delete mode 100644 rdoc/fr_class_index.html delete mode 100644 rdoc/fr_file_index.html delete mode 100644 rdoc/fr_method_index.html delete mode 100644 rdoc/index.html delete mode 100644 rdoc/rdoc-style.css diff --git a/.gitignore b/.gitignore index 00278f4..00c0b86 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ *.sw? .DS_Store coverage +rdoc pkg diff --git a/README.rdoc b/README.rdoc index f33ef93..e4d8a0e 100644 --- a/README.rdoc +++ b/README.rdoc @@ -16,7 +16,7 @@ Install the gem: - set the environment variables OPENTOX_COMPOUNDS, OPENTOX_FEATURES, OPENTOX_DATASETS, OPENTOX_FMINER to the base URI of the OpenTox REST webservices - require 'opentox-ruby-api-wrapper' in your ruby application -- consult the API documentation for details +- consult the rdoc API documentation for details == Copyright diff --git a/Rakefile b/Rakefile index a1b950e..de8e703 100644 --- a/Rakefile +++ b/Rakefile @@ -6,7 +6,7 @@ begin Jeweler::Tasks.new do |gem| gem.name = "opentox-ruby-api-wrapper" gem.summary = %Q{Ruby wrapper for the OpenTox REST API} - gem.description = %Q{} + gem.description = %Q{Ruby wrapper for the OpenTox REST API (http://www.opentox.org)} gem.email = "helma@in-silico.ch" gem.homepage = "http://github.com/helma/opentox-ruby-api-wrapper" gem.authors = ["Christoph Helma"] diff --git a/rdoc/classes/OpenTox.html b/rdoc/classes/OpenTox.html deleted file mode 100644 index 21b7032..0000000 --- a/rdoc/classes/OpenTox.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - - - Module: OpenTox - - - - - - - - - - -
- - - - - - - - - - -
ModuleOpenTox
In: - - lib/opentox-ruby-api-wrapper.rb - -
-
-
- - -
- - - -
- - - -
- - -
- - - - -
- -
-

Classes and Modules

- - Class OpenTox::Compound
-Class OpenTox::Dataset
-Class OpenTox::Feature
-Class OpenTox::Fminer
-Class OpenTox::OpenTox
- -
- - - - - - - - - - -
- - -
-

[Validate]

-
- - - \ No newline at end of file diff --git a/rdoc/classes/OpenTox/Compound.html b/rdoc/classes/OpenTox/Compound.html deleted file mode 100644 index c892d0e..0000000 --- a/rdoc/classes/OpenTox/Compound.html +++ /dev/null @@ -1,247 +0,0 @@ - - - - - - Class: OpenTox::Compound - - - - - - - - - - -
- - - - - - - - - - - - - - -
ClassOpenTox::Compound
In: - - lib/opentox-ruby-api-wrapper.rb - -
-
Parent: - - OpenTox - -
-
- - -
- - - -
- - - -
- -
-

Methods

- -
- match   - match?   - new   - smiles   -
-
- -
- - - - -
- - - - - - - - - -
-

Public Class methods

- -
- - - - -
-

-Initialize with :uri => uri, :smiles => smiles or :name => name -(name can be also an InChI/InChiKey, CAS number, etc) -

-

[Source]

-
-
-# File lib/opentox-ruby-api-wrapper.rb, line 18
-                def initialize(params)
-                        if params[:uri]
-                                @uri = params[:uri].to_s
-                        elsif params[:smiles]
-                                @uri = RestClient.post ENV['OPENTOX_COMPOUNDS'] ,:smiles => uri_escape(params[:smiles])
-                        elsif params[:name]
-                                @uri = RestClient.post ENV['OPENTOX_COMPOUNDS'] ,:name => uri_escape(params[:name])
-                        end
-                end
-
-
-
-
- -

Public Instance methods

- -
- - - - -
-

-Match an array of smarts features, returns matching features -

-

[Source]

-
-
-# File lib/opentox-ruby-api-wrapper.rb, line 43
-                def match(smarts_features)
-                        smarts_features.collect{ |smarts| smarts if self.match?(smarts.name) }.compact
-                end
-
-
-
-
- -
- - - - -
-

-Matchs a smarts string -

-

[Source]

-
-
-# File lib/opentox-ruby-api-wrapper.rb, line 34
-                def match?(smarts)
-                        if RestClient.get(@uri + '/match/' + uri_escape(smarts)) == 'true'
-                                true
-                        else
-                                false
-                        end
-                end
-
-
-
-
- -
- - - - -
-

-Get the (canonical) smiles -

-

[Source]

-
-
-# File lib/opentox-ruby-api-wrapper.rb, line 29
-                def smiles
-                        RestClient.get @uri
-                end
-
-
-
-
- - -
- - -
- - -
-

[Validate]

-
- - - \ No newline at end of file diff --git a/rdoc/classes/OpenTox/Dataset.html b/rdoc/classes/OpenTox/Dataset.html deleted file mode 100644 index f6966f7..0000000 --- a/rdoc/classes/OpenTox/Dataset.html +++ /dev/null @@ -1,331 +0,0 @@ - - - - - - Class: OpenTox::Dataset - - - - - - - - - - -
- - - - - - - - - - - - - - -
ClassOpenTox::Dataset
In: - - lib/opentox-ruby-api-wrapper.rb - -
-
Parent: - - OpenTox - -
-
- - -
- - - -
- - - -
- -
-

Methods

- -
- add   - all_compounds_and_features   - all_features   - compounds   - features   - name   - new   -
-
- -
- - - - -
- - - - - - - - - -
-

Public Class methods

- -
- - - - -
-

-Initialize with :uri => uri or :name => name (creates a new dataset) -

-

[Source]

-
-
-# File lib/opentox-ruby-api-wrapper.rb, line 78
-                def initialize(params)
-                        if params[:uri]
-                                @uri = params[:uri].to_s
-                        elsif params[:name] 
-                                @uri = RestClient.post ENV['OPENTOX_DATASETS'], :name => params[:name]
-                                RestClient.delete @uri + '/associations'
-                        end
-                end
-
-
-
-
- -

Public Instance methods

- -
- - - - -
-

-Add a compound and a feature to a dataset -

-

[Source]

-
-
-# File lib/opentox-ruby-api-wrapper.rb, line 118
-                def add(compound,feature)
-                        RestClient.put @uri, :compound_uri => compound.uri, :feature_uri => feature.uri
-                end
-
-
-
-
- -
- - - - -
-

-Get all compounds and features from a dataset, returns a hash -with compound_uris as keys and arrays of features as values -

-

[Source]

-
-
-# File lib/opentox-ruby-api-wrapper.rb, line 98
-                def all_compounds_and_features
-                        compounds = {}
-                        Crack::XML.parse(RestClient.get @uri + '/compounds/features')['dataset']['compound'].each do |c|
-                                features = c['feature_uri'].collect{ |f| Feature.new :uri => f }
-                                compounds[c['uri']] = features
-                        end
-                        compounds
-                end
-
-
-
-
- -
- - - - -
-

-Get all features from a dataset -

-

[Source]

-
-
-# File lib/opentox-ruby-api-wrapper.rb, line 108
-                def all_features
-                        RestClient.get(@uri + '/features').split("\n").collect{|f| Feature.new(:uri => f)}
-                end
-
-
-
-
- -
- - - - -
-

-Get all compounds from a dataset -

-

[Source]

-
-
-# File lib/opentox-ruby-api-wrapper.rb, line 93
-                def compounds
-                        RestClient.get(@uri + '/compounds').split("\n").collect{ |c| Compound.new(:uri => c) }
-                end
-
-
-
-
- -
- - - - -
-

-Get all features for a compound -

-

[Source]

-
-
-# File lib/opentox-ruby-api-wrapper.rb, line 113
-                def features(compound)
-                        RestClient.get(@uri + '/compound/' + uri_escape(compound.uri) + '/features').split("\n").collect{|f| Feature.new(:uri => f) }
-                end
-
-
-
-
- -
- - - - -
-

-Get the dataset name -

-

[Source]

-
-
-# File lib/opentox-ruby-api-wrapper.rb, line 88
-                def name
-                        RestClient.get @uri + '/name'
-                end
-
-
-
-
- - -
- - -
- - -
-

[Validate]

-
- - - \ No newline at end of file diff --git a/rdoc/classes/OpenTox/Feature.html b/rdoc/classes/OpenTox/Feature.html deleted file mode 100644 index 5e53a12..0000000 --- a/rdoc/classes/OpenTox/Feature.html +++ /dev/null @@ -1,217 +0,0 @@ - - - - - - Class: OpenTox::Feature - - - - - - - - - - -
- - - - - - - - - - - - - - -
ClassOpenTox::Feature
In: - - lib/opentox-ruby-api-wrapper.rb - -
-
Parent: - - OpenTox - -
-
- - -
- - - -
- - - -
- -
-

Methods

- -
- name   - new   - value   -
-
- -
- - - - -
- - - - - - - - - -
-

Public Class methods

- -
- - - - -
-

-Initialize with :uri => uri, or :name => name, :values => -hash_of_property_names_and_values -

-

[Source]

-
-
-# File lib/opentox-ruby-api-wrapper.rb, line 52
-                def initialize(params)
-                        if params[:uri]
-                                @uri = params[:uri].to_s
-                        else
-                                @uri = ENV['OPENTOX_FEATURES'] + uri_escape(params[:name]) 
-                                params[:values].each do |k,v|
-                                        @uri += '/' + k.to_s + '/' + v.to_s
-                                end
-                        end
-                end
-
-
-
-
- -

Public Instance methods

- -
- - - - -
-

-Get the name of the feature -

-

[Source]

-
-
-# File lib/opentox-ruby-api-wrapper.rb, line 69
-                def name
-                        RestClient.get @uri + '/name'
-                end
-
-
-
-
- -
- - - - -
-

-Get the value of a property -

-

[Source]

-
-
-# File lib/opentox-ruby-api-wrapper.rb, line 64
-                def value(property)
-                        RestClient.get @uri + '/' + property
-                end
-
-
-
-
- - -
- - -
- - -
-

[Validate]

-
- - - \ No newline at end of file diff --git a/rdoc/classes/OpenTox/Fminer.html b/rdoc/classes/OpenTox/Fminer.html deleted file mode 100644 index 6c3b4fe..0000000 --- a/rdoc/classes/OpenTox/Fminer.html +++ /dev/null @@ -1,178 +0,0 @@ - - - - - - Class: OpenTox::Fminer - - - - - - - - - - -
- - - - - - - - - - - - - - -
ClassOpenTox::Fminer
In: - - lib/opentox-ruby-api-wrapper.rb - -
-
Parent: - - OpenTox - -
-
- - -
- - - -
- - - -
- -
-

Methods

- -
- dataset   - new   -
-
- -
- - - - -
- - - - - - - - - -
-

Public Class methods

- -
- - - - -
-

-Create a new dataset with BBRC features -

-

[Source]

-
-
-# File lib/opentox-ruby-api-wrapper.rb, line 127
-                def initialize(training_dataset)
-                        @dataset_uri = RestClient.post ENV['OPENTOX_FMINER'], :dataset_uri => training_dataset.uri
-                end
-
-
-
-
- -

Public Instance methods

- -
- - - - -
-

[Source]

-
-
-# File lib/opentox-ruby-api-wrapper.rb, line 131
-                def dataset
-                        Dataset.new(:uri => @dataset_uri)
-                end
-
-
-
-
- - -
- - -
- - -
-

[Validate]

-
- - - \ No newline at end of file diff --git a/rdoc/classes/OpenTox/OpenTox.html b/rdoc/classes/OpenTox/OpenTox.html deleted file mode 100644 index 35611f8..0000000 --- a/rdoc/classes/OpenTox/OpenTox.html +++ /dev/null @@ -1,162 +0,0 @@ - - - - - - Class: OpenTox::OpenTox - - - - - - - - - - -
- - - - - - - - - - - - - - -
ClassOpenTox::OpenTox
In: - - lib/opentox-ruby-api-wrapper.rb - -
-
Parent: - Object -
-
- - -
- - - -
- - - -
- -
-

Methods

- -
- uri_escape   -
-
- -
- - - - -
- - - - - -
-

Attributes

- -
- - - - - - -
uri [R] 
-
-
- - - - -
-

Public Instance methods

- -
- - - - -
-

-Escape all nonword characters -

-

[Source]

-
-
-# File lib/opentox-ruby-api-wrapper.rb, line 10
-                def uri_escape(string)
-                        URI.escape(string, /[^\w]/)
-                end
-
-
-
-
- - -
- - -
- - -
-

[Validate]

-
- - - \ No newline at end of file diff --git a/rdoc/created.rid b/rdoc/created.rid deleted file mode 100644 index 8dc2058..0000000 --- a/rdoc/created.rid +++ /dev/null @@ -1 +0,0 @@ -Thu, 13 Aug 2009 11:01:58 +0200 diff --git a/rdoc/files/README_rdoc.html b/rdoc/files/README_rdoc.html deleted file mode 100644 index 3342971..0000000 --- a/rdoc/files/README_rdoc.html +++ /dev/null @@ -1,140 +0,0 @@ - - - - - - File: README.rdoc - - - - - - - - - - -
-

README.rdoc

- - - - - - - - - -
Path:README.rdoc -
Last Update:Thu Aug 13 11:00:51 +0200 2009
-
- - -
- - - -
- -
-

opentox-ruby-api-wrapper

-

-Ruby wrapper for the OpenTox REST API -(www.opentox.org) -

-

Installation

-

-Run the following if you haven‘t already: -

-
-        gem sources -a http://gems.github.com
-
-

-Install the gem: -

-
-        sudo gem install helma-opentox-ruby-api-wrapper
-
-

Usage

-
    -
  • set the environment variables OPENTOX_COMPOUNDS, OPENTOX_FEATURES, -OPENTOX_DATASETS, OPENTOX_FMINER to the base URI of the OpenTox REST webservices - -
  • -
  • require ‘opentox-ruby-api-wrapper’ in your ruby application - -
  • -
  • consult the API documentation for details - -
  • -
-

Copyright

-

-Copyright (c) 2009 Christoph Helma. See LICENSE for details. -

- -
- - -
- - -
- - - - -
- - - - - - - - - - - -
- - -
-

[Validate]

-
- - - \ No newline at end of file diff --git a/rdoc/files/lib/opentox-ruby-api-wrapper_rb.html b/rdoc/files/lib/opentox-ruby-api-wrapper_rb.html deleted file mode 100644 index be6ca28..0000000 --- a/rdoc/files/lib/opentox-ruby-api-wrapper_rb.html +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - File: opentox-ruby-api-wrapper.rb - - - - - - - - - - -
-

opentox-ruby-api-wrapper.rb

- - - - - - - - - -
Path:lib/opentox-ruby-api-wrapper.rb -
Last Update:Thu Aug 13 10:44:46 +0200 2009
-
- - -
- - - -
- - -
-

Required files

- -
- rest_client   - crack/xml   -
-
- -
- - -
- - - - -
- - - - - - - - - - - -
- - -
-

[Validate]

-
- - - \ No newline at end of file diff --git a/rdoc/fr_class_index.html b/rdoc/fr_class_index.html deleted file mode 100644 index 7242f18..0000000 --- a/rdoc/fr_class_index.html +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - Classes - - - - - -
-

Classes

- -
- - \ No newline at end of file diff --git a/rdoc/fr_file_index.html b/rdoc/fr_file_index.html deleted file mode 100644 index eac1d09..0000000 --- a/rdoc/fr_file_index.html +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - Files - - - - - -
-

Files

- -
- - \ No newline at end of file diff --git a/rdoc/fr_method_index.html b/rdoc/fr_method_index.html deleted file mode 100644 index 63abf5e..0000000 --- a/rdoc/fr_method_index.html +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - Methods - - - - - -
-

Methods

- -
- - \ No newline at end of file diff --git a/rdoc/index.html b/rdoc/index.html deleted file mode 100644 index bb24624..0000000 --- a/rdoc/index.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - opentox-ruby-api-wrapper 0.1.0 - - - - - - - - - - - - \ No newline at end of file diff --git a/rdoc/rdoc-style.css b/rdoc/rdoc-style.css deleted file mode 100644 index 44c7b3d..0000000 --- a/rdoc/rdoc-style.css +++ /dev/null @@ -1,208 +0,0 @@ - -body { - font-family: Verdana,Arial,Helvetica,sans-serif; - font-size: 90%; - margin: 0; - margin-left: 40px; - padding: 0; - background: white; -} - -h1,h2,h3,h4 { margin: 0; color: #efefef; background: transparent; } -h1 { font-size: 150%; } -h2,h3,h4 { margin-top: 1em; } - -a { background: #eef; color: #039; text-decoration: none; } -a:hover { background: #039; color: #eef; } - -/* Override the base stylesheet's Anchor inside a table cell */ -td > a { - background: transparent; - color: #039; - text-decoration: none; -} - -/* and inside a section title */ -.section-title > a { - background: transparent; - color: #eee; - text-decoration: none; -} - -/* === Structural elements =================================== */ - -div#index { - margin: 0; - margin-left: -40px; - padding: 0; - font-size: 90%; -} - - -div#index a { - margin-left: 0.7em; -} - -div#index .section-bar { - margin-left: 0px; - padding-left: 0.7em; - background: #ccc; - font-size: small; -} - - -div#classHeader, div#fileHeader { - width: auto; - color: white; - padding: 0.5em 1.5em 0.5em 1.5em; - margin: 0; - margin-left: -40px; - border-bottom: 3px solid #006; -} - -div#classHeader a, div#fileHeader a { - background: inherit; - color: white; -} - -div#classHeader td, div#fileHeader td { - background: inherit; - color: white; -} - - -div#fileHeader { - background: #057; -} - -div#classHeader { - background: #048; -} - - -.class-name-in-header { - font-size: 180%; - font-weight: bold; -} - - -div#bodyContent { - padding: 0 1.5em 0 1.5em; -} - -div#description { - padding: 0.5em 1.5em; - background: #efefef; - border: 1px dotted #999; -} - -div#description h1,h2,h3,h4,h5,h6 { - color: #125;; - background: transparent; -} - -div#validator-badges { - text-align: center; -} -div#validator-badges img { border: 0; } - -div#copyright { - color: #333; - background: #efefef; - font: 0.75em sans-serif; - margin-top: 5em; - margin-bottom: 0; - padding: 0.5em 2em; -} - - -/* === Classes =================================== */ - -table.header-table { - color: white; - font-size: small; -} - -.type-note { - font-size: small; - color: #DEDEDE; -} - -.xxsection-bar { - background: #eee; - color: #333; - padding: 3px; -} - -.section-bar { - color: #333; - border-bottom: 1px solid #999; - margin-left: -20px; -} - - -.section-title { - background: #79a; - color: #eee; - padding: 3px; - margin-top: 2em; - margin-left: -30px; - border: 1px solid #999; -} - -.top-aligned-row { vertical-align: top } -.bottom-aligned-row { vertical-align: bottom } - -/* --- Context section classes ----------------------- */ - -.context-row { } -.context-item-name { font-family: monospace; font-weight: bold; color: black; } -.context-item-value { font-size: small; color: #448; } -.context-item-desc { color: #333; padding-left: 2em; } - -/* --- Method classes -------------------------- */ -.method-detail { - background: #efefef; - padding: 0; - margin-top: 0.5em; - margin-bottom: 1em; - border: 1px dotted #ccc; -} -.method-heading { - color: black; - background: #ccc; - border-bottom: 1px solid #666; - padding: 0.2em 0.5em 0 0.5em; -} -.method-signature { color: black; background: inherit; } -.method-name { font-weight: bold; } -.method-args { font-style: italic; } -.method-description { padding: 0 0.5em 0 0.5em; } - -/* --- Source code sections -------------------- */ - -a.source-toggle { font-size: 90%; } -div.method-source-code { - background: #262626; - color: #ffdead; - margin: 1em; - padding: 0.5em; - border: 1px dashed #999; - overflow: hidden; -} - -div.method-source-code pre { color: #ffdead; overflow: hidden; } - -/* --- Ruby keyword styles --------------------- */ - -.standalone-code { background: #221111; color: #ffdead; overflow: hidden; } - -.ruby-constant { color: #7fffd4; background: transparent; } -.ruby-keyword { color: #00ffff; background: transparent; } -.ruby-ivar { color: #eedd82; background: transparent; } -.ruby-operator { color: #00ffee; background: transparent; } -.ruby-identifier { color: #ffdead; background: transparent; } -.ruby-node { color: #ffa07a; background: transparent; } -.ruby-comment { color: #b22222; font-weight: bold; background: transparent; } -.ruby-regexp { color: #ffa07a; background: transparent; } -.ruby-value { color: #7fffd4; background: transparent; } \ No newline at end of file -- cgit v1.2.3