summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Helma <helma@in-silico.ch>2013-07-10 14:28:24 +0200
committerChristoph Helma <helma@in-silico.ch>2013-07-10 14:28:24 +0200
commit9d1c4b70e890f1073b325fcfc86449bd8f8512ef (patch)
tree3b28f4d3f07fe4a389aa621e05ad7746a3a407d5
parent0a47ab1a55a5e9e7a5ba0e332ccb1c73db47ca80 (diff)
subjectids partially removed
-rw-r--r--compound.rb6
-rw-r--r--helper.rb2
2 files changed, 4 insertions, 4 deletions
diff --git a/compound.rb b/compound.rb
index 3373737..7ed4589 100644
--- a/compound.rb
+++ b/compound.rb
@@ -11,7 +11,7 @@ module OpenTox
# compound = OpenTox::Compound.from_smiles("c1ccccc1")
# @param [String] smiles Smiles string
# @return [OpenTox::Compound] Compound
- def self.from_smiles smiles, subjectid=nil
+ def self.from_smiles smiles
inchi = obconversion(smiles,'smi','inchi')
compound = Compound.new(File.join service_uri, inchi)
compound.inchi = inchi
@@ -22,7 +22,7 @@ module OpenTox
# Create a compound from inchi string
# @param [String] smiles InChI string
# @return [OpenTox::Compound] Compound
- def self.from_inchi inchi, subjectid=nil
+ def self.from_inchi inchi
compound = Compound.new(File.join service_uri, inchi)
compound.inchi = inchi
compound
@@ -31,7 +31,7 @@ module OpenTox
# Create a compound from sdf string
# @param [String] smiles SDF string
# @return [OpenTox::Compound] Compound
- def self.from_sdf sdf, subjectid=nil
+ def self.from_sdf sdf
inchi = obconversion(sdf,'sdf','inchi')
compound = Compound.new(File.join service_uri, inchi)
compound.inchi = inchi
diff --git a/helper.rb b/helper.rb
index 9efb0a6..54b4540 100644
--- a/helper.rb
+++ b/helper.rb
@@ -94,7 +94,7 @@ module OpenTox
metadata[RDF.type] = [ RDF::OT.NominalFeature, RDF::OT.StringFeature, RDF::OT.Feature ] # only nominal type for mixed cases
metadata[RDF::OT.acceptValue] = values
end
- feature = OpenTox::Feature.find_or_create metadata, @subjectid # AM: find or generate
+ feature = OpenTox::Feature.find_or_create metadata, @subjectid
features << feature unless feature.nil?
ntriples << "<#{feature.uri}> <#{RDF.type}> <#{RDF::OT.Feature}>."
ntriples << "<#{feature.uri}> <#{RDF::OLO.index}> #{i} ."