summaryrefslogtreecommitdiff
path: root/lib/compound.rb
diff options
context:
space:
mode:
authorChristoph Helma <helma@in-silico.ch>2013-06-03 16:37:29 +0200
committerChristoph Helma <helma@in-silico.ch>2013-06-03 16:37:29 +0200
commitb0bd56e80eedde63c9e679acb7bf5b522e7b7988 (patch)
treee2e60964dba8c87930622b1566f1b0bb55c8acf4 /lib/compound.rb
parentf2ef6216ef785656d799c880f22013f6c7e900e7 (diff)
parent962773d59d94f8d16dae11b6290fdf30aaf09d7b (diff)
Merge branch 'development' of github.com:opentox/opentox-client into development
Diffstat (limited to 'lib/compound.rb')
-rw-r--r--lib/compound.rb9
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/compound.rb b/lib/compound.rb
index be782eb..d33c48e 100644
--- a/lib/compound.rb
+++ b/lib/compound.rb
@@ -16,14 +16,14 @@ module OpenTox
end
# Create a compound from inchi string
- # @param [String] smiles InChI string
+ # @param inchi [String] smiles InChI string
# @return [OpenTox::Compound] Compound
def self.from_inchi inchi, subjectid=nil
Compound.new RestClientWrapper.post(service_uri, inchi, {:content_type => 'chemical/x-inchi', :subjectid => subjectid})
end
# Create a compound from sdf string
- # @param [String] smiles SDF string
+ # @param sdf [String] smiles SDF string
# @return [OpenTox::Compound] Compound
def self.from_sdf sdf, subjectid=nil
Compound.new RestClientWrapper.post(service_uri, sdf, {:content_type => 'chemical/x-mdl-sdfile', :subjectid => subjectid})
@@ -32,9 +32,8 @@ module OpenTox
# Create a compound from name. Relies on an external service for name lookups.
# @example
# compound = OpenTox::Compound.from_name("Benzene")
- # @param [String] name name can be also an InChI/InChiKey, CAS number, etc
+ # @param name [String] can be also an InChI/InChiKey, CAS number, etc
# @return [OpenTox::Compound] Compound
- #
def self.from_name name, subjectid=nil
@inchi = RestClientWrapper.get File.join(CACTUS_URI,URI.escape(name),"stdinchi")
Compound.new RestClientWrapper.post(service_uri, @inchi, {:content_type => 'chemical/x-inchi', :subjectid => subjectid})
@@ -190,7 +189,7 @@ module OpenTox
# Match an array of smarts strings, returns hash
# Keys: matching smarts, values: number of non-unique hits, or 1
# @param [Array] smarts_array Array with Smarts strings
- # @param [Boolean] Whether non-unique hits or 1 should be produced
+ # @param use_hits [Boolean] Whether non-unique hits or 1 should be produced
# @return [Array] Array with matching Smarts strings
# @example {
# compound = Compound.from_name("Benzene")